← Back to issue list

part `build-snaps` channel change doesn't work without a `clean`

View original Github issue

Metadata

Project
craft-parts
Number
#496
Type
issue
State
open
Author
jugmac00
Labels
Status: Triaged Type: Bug
Created
Updated
Closed
—

Current evaluation

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.

Suggested action: keep open

Reason: The reporter provided an exact two-pack reproducer, and the maintainer explicitly transferred the report to craft-parts as a library bug. Craft-parts currently skips installing an already-installed snap rather than refreshing its channel, while BuildState does not include build-snaps in properties of interest; open PR canonical/craft-parts#1692 addresses both behaviors but remains unmerged with review and CI work unresolved.

Evaluated by: mr-cal-bot

Impact: 48 Quick Win: 27 Complexity: 38 Confidence: 96 Actionability: 90

Issue body

### Bug Description In my `charmcraft.yaml` file I updated the charm version via the `build-snaps` directive, and then a `charmcraft pack` but the changes were not reflected, ie no new charm version was installed. Only when I ran `charmcraft clean` and another `charmcraft pack` it worked as intended and used the new charm version from the `charmcraft.yaml` configuration. ### To Reproduce - create a simple `charmcraft.yaml` with e.g. `build-snaps: [charm/2.x/stable]` - run `charmcraft pack` (which creates a container) - update `charmcraft.yaml` to `build-snaps: [charm]` - run `charmcraft pack` - the new charm version is not used (I noticed that as I added an option which is only available with the new charm version). ### Environment - Ubuntu 20.04 - charmcraft -> version 2.3.0 - using lxd containers ### charmcraft.yaml ```shell see above ``` ### Relevant log output ```shell none ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 48
Quick Win: 27
Complexity: 38
Confidence: 96
Actionability: 90
keep 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.
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 39
Complexity: 30
Confidence: 90
Actionability: 80
keep open build-snaps channel changes don't trigger part rebuilds in craft-parts because build-snaps is missing from properties_of_interest in step states.
qwen/qwen3.8-27b
Impact: 55
Quick Win: 25
Staleness: 45
Complexity: 55
Confidence: 70
Support Request: 5
keep 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.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 35
Confidence: 85
Support Request: 5
keep open Changing build-snaps channel in charmcraft.yaml doesn't take effect without running clean first. Triaged and identified as a craft-parts dependency bug with an internal ticket created.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Updating build-snaps channel in charmcraft.yaml requires a clean to take effect. Maintainer noted it belongs in craft-parts and transferred it in July 2023.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/craft-parts#1692 (confidence 96%)

    Open, approved PR titled "fix: refresh build snaps if already installed"; it refreshes snaps to the requested channel and records them in build state to invalidate affected steps.

Related issues

Issue Project State Summary Similarity
#5734 Modifying a build-snap doesn't trigger a change snapcraft 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.
74%