Modifying a build-snap doesn't trigger a change
Metadata
Current evaluation
Build-snap channel changes are not invalidating cached part state, so affected build steps may not rerun; the bug is acknowledged and remains unresolved.
Suggested action: keep open
Reason: The maintainer explicitly confirmed that changing build snaps should trigger a rebuild and that craft-parts should track this. The underlying behavior is tracked in open craft-parts#496, whose diagnosis matches the missing build-snaps property in BuildState.properties_of_interest.
Evaluated by: mr-cal-bot
Impact:
52
Quick Win:
25
Complexity:
43
Confidence:
95
Actionability:
86
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
52
Quick Win:
25
Complexity:
43
Confidence:
95
Actionability:
86
|
keep open | Build-snap channel changes are not invalidating cached part state, so affected build steps may not rerun; the bug is acknowledged and remains unresolved. | |
| stealth/space-bunny-alpha |
Impact:
52
Quick Win:
34
Complexity:
28
Confidence:
96
Actionability:
92
|
keep open | Valid, acknowledged bug: changing a part's build-snap channel leaves lifecycle state clean, so the part is not rebuilt; the fix is required in craft-parts. | |
| qwen/qwen3.6-35b-a3b |
Impact:
45
Quick Win:
27
Complexity:
25
Confidence:
75
Actionability:
80
|
keep open | Changing build-snap channels doesn't trigger part rebuild because build-snaps is missing from properties_of_interest in craft-parts step states. | |
| qwen/qwen3.8-27b |
Impact:
55
Quick Win:
33
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. |
Update history
No update history recorded yet.
Related work
-
Blocked By:
craft-parts#496
(confidence 97%)
Open upstream issue for the same build-snaps channel-change invalidation bug; fix ownership is in craft-parts state tracking.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #496 part `build-snaps` channel change doesn't work without a `clean` | craft-parts | open | Triaged bug: changing a build-snaps channel leaves the installed snap unchanged unless clean is run; open PR #1692 addresses snap refresh and rebuild invalidation. |