← Back to issue list

Modifying a build-snap doesn't trigger a change

View original Github issue

Metadata

Project
snapcraft
Number
#5734
Type
issue
State
open
Author
dilyn-corner
Labels
Type: Bug
Created
Updated
Closed

Current evaluation

Changing a build-snap channel (e.g. node/12/stable to node/18/stable) does not trigger a rebuild of the part in snapcraft 8.11.1. A maintainer commented that craft-parts should be tracking this, but the issue remains open with no fix or follow-up.

Suggested action: needs triage

Reason: The issue has a single maintainer comment from 2025-09-02 stating 'Changing the build snaps should trigger a rebuild. Craft parts should be tracking this,' but no further action, labels, or fix has followed. The issue is ~12 months old with no resolution. The bug is real and reproducible, but requires investigation into whether craft-parts' build state tracking actually captures build-snap channel changes or if snapcraft is not passing them through correctly.

Impact: 55 Quick Win: 33.0 Staleness: 70 Complexity: 40 Confidence: 65 Support Request: 0

Issue body

### Bug Description If the channel of a specific build snap is modified, a rebuild of the specific part will not be triggered. ### To Reproduce Create a snap with a part declaring a build-snap as so: ``` build-snaps: [foo/bar/baz] ``` Build the snap and then modify `bar/baz` to some other valid track/risk for the `foo` snap. Rerun the build and notice that the build step for the part is not retriggered. ### Environment Ubuntu 25.04, building with snapcraft 8.11.1 and LXD latest/edge. ### snapcraft.yaml ```yaml name: test # you probably want to 'snapcraft register <name>' base: core24 # the base snap is the execution environment for this snap version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' summary: Single-line elevator pitch for your amazing snap # 79 char long summary description: | This is my-snap's description. You have a paragraph or two to tell the most important story about your snap. Keep it under 100 words though, we live in tweetspace and your description wants to look good in the snap store. grade: devel # must be 'stable' to release into candidate/stable channels confinement: devmode # use 'strict' once you have the right plugs and slots parts: my-part: # See 'snapcraft plugins' plugin: nil build-environment: - FOO: bar # Get past the point where build-snaps are installed in the env and change 12 to e.g. 22, do another build build-snaps: [node/12/stable] ``` ### Relevant log output ```shell  snapcraft pull --shell Starting snapcraft, version 8.11.1.post53 Logging execution to '/home/dilyn/.local/state/snapcraft/log/snapcraft-20250828-141221.610376.log' Launching managed ubuntu 24.04 instance... Starting instance Starting snapcraft, version 8.11.1.post53 Logging execution to '/tmp/snapcraft.log' Initialising lifecycle Installing build-packages Installing build-snapssn Launching shell on build environment... snapcraft-test-amd64-4235994 ../project# snap list Name Version Rev Tracking Publisher Notes core 16-2.61.4-20250626 17247 latest/stable canonical✓ core core24 20250618 1055 - canonical✓ base node 12.22.12 6195 12/stable iojs✓ classic snapcraft 8.11.1.post53 x1 - - classic snapd 2.71 25202 latest/stable canonical✓ snapd snapcraft-test-amd64-4235994 ../project# exit ``` ### Additional context Noticed this when working around an issue where I needed to update the version of node in my build environment. I was using node from 12/stable but needed at least node from 18/stable. `s/12/18/` was insufficienet to resolve the issue, because the modified snap channel was not considered when validating the build environment.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 55
Quick Win: 33.0
Staleness: 70
Complexity: 40
Confidence: 65
Support Request: 0
needs triage Changing a build-snap channel (e.g. node/12/stable to node/18/stable) does not trigger a rebuild of the part in snapcraft 8.11.1. A maintainer commented that craft-parts should be tracking this, but the issue remains open with no fix or follow-up.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 45
Confidence: 80
Support Request: 5
keep open Bug where changing a build-snap channel in snapcraft.yaml does not trigger a part rebuild. Acknowledged by a maintainer as a craft-parts tracking issue, but inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 70
Complexity: 45
Confidence: 70
Support Request: 5
keep open Changing a build-snap channel in snapcraft.yaml fails to invalidate the build cache and trigger a rebuild. Acknowledged by a maintainer as a craft-parts tracking issue, currently inactive.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 30
Confidence: 80
Support Request: 10
keep open Changing a build-snap channel in snapcraft.yaml fails to trigger a part rebuild. Maintainer confirmed craft-parts should track these changes to enable automatic rebuilds. Issue remains open and awaiting implementation.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5735 Modifying a part's `build-environment` doesn't trigger a rebuild snapcraft open Bug report: modifying a part's build-environment in snapcraft.yaml does not trigger a rebuild. Maintainer mr-cal commented it is the same as #5734 and that craft-parts should manage this. Issue is open, unlabelled beyond Type: Bug, and inactive for ~1 year.
78%
#496 part `build-snaps` channel change doesn't work without a `clean` craft-parts open Changing the build-snaps channel in charmcraft.yaml is ignored on subsequent charmcraft pack runs unless a clean is performed first. Triaged as a craft-parts bug (snap not refreshed when channel changes); transferred to craft-parts with a related charmcraft hotfix bug.
73%
#2104274 Snapcraft has unclear behavior when providing same build-snap from different channels snapcraft (launchpad) open Bug report: snapcraft resolves build-snap from wrong channel (stable vs candidate). Untriaged, no maintainer response in 527 days.
70%