← Back to issue list

building part with git source-commit not found in master fails

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1817907
Type
issue
State
closed
Author
~jamesh
Labels
Created
Updated
Closed

Current evaluation

Closed without resolution due to inactivity. Snapcraft fails to checkout non-master git commits without a prior fetch, leaving the issue abandoned.

Suggested action:

No scores available.

Issue body

As part of a CI build, I insert a source-commit property into a part definition corresponding to the revision under test. However, this seems to fail for revisions not in master (e.g. an auto-merge revision ID belonging to a github pull request). For example: https://gitlab.gnome.org/jamesh/gtk-common-themes/-/jobs/229568 The failed command in question here is: git -C .../parts/yaru/src checkout c324c18dc78f7b33b660b14797db993d1da852b5 I can reproduce this locally using commands roughly equivalent to what Snapcraft issues: $ git clone https://github.com/ubuntu/yaru.git ... $ cd yaru $ git checkout c324c18dc78f7b33b660b14797db993d1da852b5 fatal: reference is not a tree: c324c18dc78f7b33b660b14797db993d1da852b5 The revision in question does exist in the remote repository though, and I can retrieve it with a fetch command: $ git fetch origin c324c18dc78f7b33b660b14797db993d1da852b5 remote: Enumerating objects: 24, done. remote: Counting objects: 100% (24/24), done. remote: Compressing objects: 100% (24/24), done. remote: Total 24 (delta 9), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (24/24), done. From https://github.com/ubuntu/yaru * branch c324c18dc78f7b33b660b14797db993d1da852b5 -> FETCH_HEAD From that point, I can access the revision with "git checkout" or "git reset".

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without resolution due to inactivity. Snapcraft fails to checkout non-master git commits without a prior fetch, leaving the issue abandoned.
qwen/qwen3.6-35b-a3b Closed without resolution. Snapcraft failed to checkout git commits not in master, such as PR auto-merge revisions. No fix was implemented.
qwen/qwen3.6-35b-a3b Closed without resolution. The report describes Snapcraft failing to checkout git commits not in the default branch due to missing fetches, but no fix or discussion was recorded.
qwen3.6-35b-a3b-mtp-q6 Closed without resolution or comments, likely abandoned. Snapcraft failed to checkout non-master git commits, requiring an explicit fetch. No fix or merge details provided.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1521878 Latest snapcraft cannot compile a project in the github snapcraft (launchpad) closed Closed without comments or resolution, likely abandoned due to inactivity. The reported GitHub source pull failure remains unaddressed.
75%
#1536698 Git source doesn't support submodules snapcraft (launchpad) closed Abandoned. Snapcraft does not fetch Git submodules during source builds, and the issue was closed without resolution or implementation.
75%
#1889535 Error is shown when git version is determined in a git worktree snapcraft (launchpad) closed Closed without resolution. Reported a snapcraft git version detection failure in worktrees caused by the build VM lacking access to the parent repository. No fix was implemented.
73%
#1746784 Failing while fetching parts.snapcraft.io should be handled better snapcraft (launchpad) closed Closed without comments or resolution. No fix or merge details provided; likely abandoned or marked stale.
72%
#5840 fix(snapcraft): do not fetch git submodules during build (Fixes #5837) snapcraft closed Proposed changes to disable git submodule fetching during Snapcraft builds were closed without merging. The reviewer rejected the contribution, stating the underlying issue cannot be resolved at this time, despite successful local verification and CI passes.
72%
#1720202 the snapcore/snapcraft image doesn't have git installed snapcraft (launchpad) closed Closed without resolution or comments. The request to include git in the snapcore/snapcraft Docker image was abandoned or superseded by newer builds.
72%
#1704103 New git commits don't mark pull step dirty snapcraft (launchpad) open Snapcraft skips the pull step for git-source parts after new commits, using stale source. Reported 9 years ago with clear repro; no labels, comments, or maintainer interaction since.
72%
#1687967 git-tag does not support tags snapcraft (launchpad) closed Snapcraft incorrectly treated source tags as branches, causing clone failures. The report was closed without comments or resolution, indicating the issue was abandoned or rejected without a fix.
72%
#71 snapcraft: pack: git checkout fails when run from inside a composite action craft-actions closed A bug report detailing git checkout failures when invoking snapcraft/pack from composite actions was closed without discussion or resolution. No fix was applied.
71%