fix(remote): fallback to legacy snapcraft if under shallow git clone
Metadata
Current evaluation
Merged as 1e285148e: remote builds under shallow Git clones fall back to legacy Snapcraft on core20/core22; unsupported bases and devel report an error.
Resolution: closed resolved
Reason: PR #4498 was merged as commit 1e285148e, adding a shallow-clone detection path that uses the legacy remote-build workaround for core20/core22 and rejects unsupported environments.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Git shallow clone is not pushable by design. Fallback to legacy remote build which has workaround. This only support core20 and core22. Any other bases and devel will report error.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as 1e285148e: remote builds under shallow Git clones fall back to legacy Snapcraft on core20/core22; unsupported bases and devel report an error. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged as commit 1e285148e ("fix(remote-build): check for shallowly cloned git repos (#4498)"), adding a fallback to the legacy remote builder for shallow clones on core20/core22, shipped in 8.0.1; later superseded by an outright failure in 8.2.0. | |
| stealth/space-bunny-alpha | — | closed resolved | PR #4498 merged as commit 1e285148e, adding a legacy remote-build fallback for shallow Git clones on core20/core22; other bases and devel report errors. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #4498 to make remote builds fall back to legacy Snapcraft under shallow Git clones, limited to core20 and core22. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix falling back to legacy remote builds for shallow git clones, which cannot be pushed by design. Supports only core20 and core22 bases. Approved by two reviewers, passed CI, and modified 8 files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix falling back to legacy snapcraft for remote builds when using shallow git clones, which cannot be pushed by design. Supports only core20 and core22 bases; others report errors. Tests passed with maintained coverage. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#4479
(confidence 100%)
This PR fixed the shallow-clone remote-build failure reported in issue #4479.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4479 remote-build broken with shallow clones | snapcraft | closed | Fixed in Snapcraft 8.0.1 by PR #4498 (commit 1e285148e), which falls back to the legacy remote builder for shallow Git clones on core20/core22. | |
| #4895 fix(remotebuild): require core20 snaps to use the legacy remote builder | snapcraft | merged | Merged in #4895 (d9c8781a1), requiring core20 remote builds to use the legacy builder because the new builder could not parse core20 snapcraft.yaml files; fixes #4886. | |
| #4144 remote build: legacy builder cannot parse core22 snapcraft.yaml syntax | snapcraft | closed | Marked won't fix: legacy-builder schema support was descoped in favor of the new remote builder, which accepts build-for; legacy support was removed by PR #5994 in Snapcraft 9. | |
| #300 Remote-build: use craft-application for core22 | craft-application | closed | Core22 remote builds moved to craft-application in merged Snapcraft PR #4724 (commit 9905f2831), removing the legacy core22 build path. | |
| #1862256 snapcraft should complain loudly when building base: core20 snap on i386 | snapcraft (launchpad) | closed | Closed as superseded: improved architecture parsing rejects unsupported core20/i386 builds, making a dedicated check unnecessary; snapcraft#4392 improved this handling. | |
| #4353 feat(remote-build): check SNAPCRAFT_REMOTE_BUILD_STRATEGY envvar | snapcraft | merged | Merged PR #4353 (commit 2eddbfe6c) added handling of SNAPCRAFT_REMOTE_BUILD_STRATEGY (disable-fallback/force-fallback) for core22-and-older bases, closing issue #4319 (CRAFT-1974). | |
| #5676 remote build: remove legacy remote builder | snapcraft | closed | Fixed in merged PR #5994 (commit b08f1a66e) for Snapcraft 9.0 by removing the legacy remote builder, selection logic, strategy env var, and legacy credential support. | |
| #4365 remote-build: legacy builder complains about the wrong part name | snapcraft | closed | Core22 snaps hit a bogus schema error in the legacy remote-build fallback. Closed as "won't fix" by mr-cal on 2026-01-27; the legacy remote builder was removed in #5994 and #6010 for Snapcraft 9. | |
| #1793261 Vendor legacy snapcraft to maintain backward compatibility | snapcraft (launchpad) | closed | Legacy Snapcraft was vendored into the snapcraft snap, dispatching projects without bases to it. Delivered via merged PRs canonical/snapcraft#2283 (commit f9592939a, override-build refactor) and #2285 (commit 5c1ee3b88). |