← Back to issue list

build providers: snap sw to channels if injecting

View original Github issue

Metadata

Project
snapcraft
Number
#3146
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #3146 as commit c15f0623d, preventing revision-asserted injected snaps from being switched to latest/stable and preserving their intended tracking channels.

Resolution: closed resolved

Reason: PR #3146 was approved with no unresolved review comments and merged as commit c15f0623d, updating build-provider snap injection to avoid unwanted channel switching.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Avoid refreshing to "latest/stable" which is set to the default channel to track in snapd when installing a snap that has a revision assertion. The results: ``` $ snapcraft pull --use-lxd --shell ... snapd 2.44.3 from Canonical✓ installed "snapd" switched to the "latest/stable" channel core18 20200427 from Canonical✓ installed "core18" switched to the "latest/stable" channel snapcraft 4.0.3 installed "snapcraft" switched to the "latest/edge" channel ubuntu # snap list Name Version Rev Tracking Publisher Notes core18 20200427 1754 latest/stable canonical✓ base snapcraft 4.0.3 x1 latest/edge - classic snapd 2.44.3 7264 latest/stable canonical✓ snapd ``` Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #3146 as commit c15f0623d, preventing revision-asserted injected snaps from being switched to latest/stable and preserving their intended tracking channels.
stealth/space-bunny-alpha — closed resolved Merged snapcraft PR #3146 in commit c15f0623d, fixing build-provider snap injection to avoid switching revision-asserted snaps to latest/stable and use the appropriate channel.
qwen/qwen3.6-35b-a3b — — Merged fix that prevents automatic channel switching to latest/stable when injecting snaps with revision assertions during build provider setup. Approved by reviewer, passed CI, and integrated.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix preventing injected snaps from defaulting to latest/stable when a revision assertion is present. The change ensures accurate channel tracking during build provider injection.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2265 build providers: allow snapcraft channel selection snapcraft merged Merged build-provider Snapcraft channel selection for non-host-injected early testing, with a user warning, in commit 6a3d2d3cd (#2265).
74%
#2773 build providers: inject snapd snap for latest feature availability snapcraft merged Merged PR #2773 in commit 3740c61bc, replacing injected core snaps with the smaller snapd snap for current build features without requiring core18.
74%
#1792185 allow overriding the channel used when injection not possible snapcraft (launchpad) closed Added a Snapcraft channel override for build providers when host injection is unavailable; fixed by merged PR canonical/snapcraft#2265 in commit 6a3d2d3cd.
73%
#3184 build providers: check revision before switching snapcraft merged Merged #3184 as 2616ab456, adding a revision check before build providers switch channels and preventing unintended channel switches.
73%
#1884576 locally built snapcraft switches channels in the container snapcraft (launchpad) closed Locally built Snapcraft was forced onto latest/candidate inside LXD build containers, hiding untested changes. Fixed by merged PR snapcore/snapcraft#3184 (commit 2616ab456), which checks the installed revision before providers switch channels.
72%
#4096 meta: disallow Snap channel in default_provider snapcraft merged Merged PR #4096 (commit 603e1499b), rejecting channel-qualified Snap providers in default_provider, including legacy validation and unit tests.
71%