← Back to issue list

Snapcraft doesn't inject itself into build VM if host rev doesn't change

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1893850
Type
issue
State
open
Author
~kyrofa
Labels
—
Created
Updated
Closed
—

Current evaluation

An old, unlabeled report says sideloaded Snapcraft snaps with identical x1 revisions can leave a stale build-VM copy; the tracker has no follow-up or confirmed hash-based fix.

Suggested action: needs triage

Reason: The body gives a concrete six-step reproduction and identifies revision-only identity as the cause, making it a credible bug report. However, the record has no labels, comments, or maintainer assessment; later injection commits #4084 and #4090 are relevant context but do not explicitly confirm hash-based handling, so current status needs triage rather than a closure claim.

Evaluated by: mr-cal-bot

Impact: 42 Quick Win: 17 Complexity: 48 Confidence: 72 Actionability: 78

Issue body

I'm developing new snapcraft features. These features require that a snapcraft snap be built (using the stable release of snapcraft). Then that new snapcraft snap needs to be installed (which changes the snapcraft revision to x1). Then I actually run it, a build VM is created, and snapcraft injects itself and continues on its merry way. Then of course I hit a bug, and go through those steps again: 1. Uninstall snapcraft 2. Install snapcraft from stable 3. Build snapcraft with bug hopefully fixed 4. Install new snapcraft (back to revision x1 again) 5. Run snapcraft on test project. 6. Notice bug is still there, as if nothing changed! That's because it didn't-- snapcraft noticed that it was still on revision x1, and didn't inject the new version, thereby continuing to use the old, buggy version in the build VM. Snapcraft should be checking hashes, not revisions (at least, when the revisions start with "x"). Now, one could point out that (1) should be `snap revert snapcraft`, but that doesn't change the fact that this is still a bug. Besides, actually removing/reinstalling snapcraft after sideloading over the top of it is the only sure-fired way to make sure I'm using the right thing.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 42
Quick Win: 17
Complexity: 48
Confidence: 72
Actionability: 78
needs triage An old, unlabeled report says sideloaded Snapcraft snaps with identical x1 revisions can leave a stale build-VM copy; the tracker has no follow-up or confirmed hash-based fix.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 17
Complexity: 30
Confidence: 70
Actionability: 80
needs triage Snapcraft fails to inject itself into build VM when sideloading over the same revision number; should compare hashes instead of revisions to detect changes.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 27
Staleness: 95
Complexity: 40
Confidence: 70
Support Request: 0
needs triage snapcraft skips injecting itself into the build VM when the host snap revision is unchanged after sideloading; reporter suggests using hashes instead of revisions for x-revisions. Unlabelled, zero comments, inactive ~6 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 75
Support Request: 10
needs triage Snapcraft fails to inject itself into build VMs when the host revision remains unchanged after sideloading. The report is unlabelled, has zero comments, and has been inactive for nearly six years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 10
close stale Snapcraft fails to inject itself into build VMs when the host revision remains unchanged after reinstalling. Unlabelled, no maintainer response, inactive for nearly 6 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 85
Support Request: 10
close stale Snapcraft fails to inject itself into build VMs if the host revision hasn't changed, despite code updates. Unlabelled, zero comments, and inactive for nearly six years with no maintainer engagement.

Update history

Date Change
created

Related work

  • Related To: snapcraft#4084 (confidence 82%)

    Commit b852f9ac8 added current-Snapcraft injection to provider instances, but no explicit reference to #1893850 or hash semantics is shown.

  • Related To: snapcraft#4090 (confidence 75%)

    Commit d680b8437 added the corresponding legacy injection path; it is relevant, though that legacy implementation was later removed.

Related issues

Issue Project State Summary Similarity
#5568 build: correctly set version of dev builds snapcraft open Updates Snapcraft's development snap versioning, but the unreviewed two-file change has been inactive for 391 days and still has failing build and OSV-scanner checks.
71%
#2104274 Snapcraft has unclear behavior when providing same build-snap from different channels snapcraft (launchpad) open Conflicting build-snap channels can install stable instead of an explicitly requested candidate; maintainers acknowledged the ambiguity, but no fix or conflict-resolution policy is recorded.
70%