← Back to issue list

remote_build: handle git push in detached head state

View original Github issue

Metadata

Project
snapcraft
Number
#2564
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged fix for remote_build that resolves a detached HEAD exception by returning HEAD instead of failing branch name retrieval. Approved by reviewer and passed CI checks.

Suggested action:

No scores available.

Issue body

When dispatching a remote build job using --git and we're currently in detached head state, branch name retrieval raises an exception. Fix that by returning HEAD if detached head is detected. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged fix for remote_build that resolves a detached HEAD exception by returning HEAD instead of failing branch name retrieval. Approved by reviewer and passed CI checks.
qwen3.6-35b-a3b-mtp-q6 Merged a fix resolving a branch name retrieval exception during remote builds in a detached HEAD state. The change returns HEAD instead of raising an error. Resolved after rebase and maintainer approval.
qwen3.6-35b-a3b-mtp-q6 Merged after rebase. Resolves remote build failures in detached HEAD state by returning HEAD instead of raising an exception during branch name retrieval.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4432 fix(remote-build): improve logging and catch exceptions snapcraft merged Merged pull request improving remote build logging and exception handling. Approved by reviewers, passed CI checks, and resolves issue #4399.
75%
#2837 remote-build: gpg-signing and usability fixes snapcraft merged Merged changes disabling GPG signing for git commits to fix remote-build failures. Improves error messaging and commit formatting. Approved by reviewer, passed CI, and integrated into the codebase.
74%
#310 fix(remote-build): enable git repo check craft-application merged Successfully merged the fix enabling the git repository check for remote builds. Approved by two reviewers, the update modifies two files with 18 additions and 1 deletion, resolving the build configuration issue.
73%
#2642 remote-build: detect early build errors snapcraft merged Merged. Improved remote build error detection to distinguish between pending builders and actual failures like missing config or timeouts. Approved by reviewer, passed CI, and modified 3 files (+131/-47 lines). Minor import fix applied.
72%
#4480 fix(remote): return error when remote build failed snapcraft merged Successfully merged fix for remote build failures that returns proper errors, resolving issue #4142. Approved by three reviewers with maintained code coverage across 13 files.
71%
#4368 feat(remote-build): add GitRepo class snapcraft merged Merged into main, introducing a GitRepo class for remote builds to resolve #4320. Approved by two reviewers with passing CI and 100% diff coverage. An unrelated spread failure was noted for later investigation.
71%
#3056 remote-build: package up local sources with source-type 'git' snapcraft merged Merged after approval. Implements remote-build packaging for local sources with source-type 'git'. Approved by one reviewer with zero unresolved comments. Changes modify 2 files (+10/-3 lines).
71%
#1546 feat: remote build command charmcraft merged Merged the remote build command feature. Approved by two reviewers and passing CI, the PR rebases prior work and adds remote build functionality. Follow-up issues were created to resolve related build-id recovery and dependency bugs.
70%
#4460 fix: push tags for remote-build snapcraft merged Merged after approval from two reviewers. The fix enables pushing tags for remote-build, maintaining 89.18% overall test coverage with 100% on modified lines. Changes span four files, adding 57 lines and removing 5.
70%