fix: stop creation of branch called HEAD during fetch #1250
No reviewers
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/runner!1250
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "aahlenst/runner:ambiguous-head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When cloning a repository or updating the existing clone, Forgejo Runner performs a fetch. The ref spec
HEAD:refs/heads/HEADmotivates go-git to create a local branch calledHEAD. Consequently,HEADbecomes ambiguous andgitrightfully complains about it (warning: refname 'HEAD' is ambiguous.).915b5c0a60b28f25256aI think this needs a unit test
Hm... it's a weird thing to unit test "not doing something that was always wrong". 🤔 I'm OK with merging this without a test because of that, but I'll hold onto it and let @viceice disagree if he's firm on it.
I tracked back when this was added (in act) and there was no rationale or explanation for it... I vaguely think it might have occurred because
refs/*is supported by go-git and treats the wildcard as matching a path separator, but git doesn't, so there may not have been an understanding thatrefs/*actually fetches all remote refs.I mean we should add a unit test to ensure it'll not break again
b28f25256a9b835e0a4aThe test error is environmental and unrelated, it needs a re-run https://code.forgejo.org/forgejo/runner/actions/runs/14190/jobs/2/attempt/1#jobstep-3-19
I don't see how that can be tested with certainty: the content of this list can be incorrect in ways that won't trigger an error.
9b835e0a4aefe86f5ac3There is now a test:
9b835e0a4a..efe86f5ac3ci failure seems to be an upstream docker debian apt repo issue 🤔
@viceice It looks like a DNS resolution or caching problem. I can access the repository.
The unrelated error is due to LXC caching and persists.
https://code.forgejo.org/forgejo/runner/actions/runs/14194/jobs/2/attempt/2
It will stay until the cache expires. To resolve it immediately the LXC container of this runner can be stopped and restarted. It will discard the cache.
https://code.forgejo.org/forgejo/runner/src/branch/main/examples/lxc-systemd#how-it-works
lxc_container_run $draft apt-get update -qq@limiting-factor wrote in #1250 (comment):
will restart it in a few minutes
didn't worked. it seems something between runner and docker repo is broken 🤔
# Derived from Docker's official debian installation documentation: https://docs.docker.com/engine/install/debian/#install-using-the-repository# Add Docker's official GPG key:apt-get updateapt-get install -y -qq ca-certificates curlinstall -m 0755 -d /etc/apt/keyringscurl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.ascchmod a+r /etc/apt/keyrings/docker.asc# Add the repository to Apt sources:tee /etc/apt/sources.list.d/docker.sources <<EOFTypes: debURIs: https://download.docker.com/linux/debianSuites: $(. /etc/os-release && echo "$VERSION_CODENAME")Components: stableSigned-By: /etc/apt/keyrings/docker.ascEOFapt-get updateapt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginthere is no containerd 2.2.1 at https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/
also missing on trixie https://download.docker.com/linux/debian/dists/trixie/pool/stable/amd64/
https://forums.docker.com/t/installation-issues-on-ubuntu/150736
should be back in ~20min
https://github.com/containerd/containerd/issues/12741#issuecomment-3705600052
running 🥳
cascading-pr updated at actions/setup-forgejo#804