← 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 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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged fix preventing unwanted channel switches to latest/stable when injecting snaps. Ensures correct channel tracking during build provider setup, resolving snapd refresh behavior during snapcraft pull operations.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3184 build providers: check revision before switching snapcraft merged Merged a fix adding a revision check before channel switching in build providers. Resolves incorrect switching behavior caused by snapd changes. Approved by reviewer, passed CI, and merged.
86%
#2507 build providers: improve handling in snap logic snapcraft merged Merged. Improved snap provider logic by cleaning up channel warnings, removing unnecessary sudo calls, and silencing noisy refresh hold commands. Approved, passed CI, and modified 5 files (+131/-73 lines).
81%
#2773 build providers: inject snapd snap for latest feature availability snapcraft merged Merged changes that inject the snapd snap into build providers instead of core, improving feature availability and reducing size. Approved by reviewer, passed CI, and modified 4 files (+59/-12 lines).
80%
#2174 build_providers: inject snaps when running from a snap snapcraft merged Merged. Updates build providers to inject snapcraft and its base from the host when running inside the snapcraft snap, ensuring parity with non-snap environments. Approved by reviewer and passed CI checks.
79%
#2265 build providers: allow snapcraft channel selection snapcraft merged Merged: Enables snapcraft channel selection for build providers when snapcraft is not injected from the host. Adds a user warning, passes CI, and received approval. Resolves LP #1792185.
79%
#4096 meta: disallow Snap channel in default_provider snapcraft merged Merged into main after two approvals. Added validation to disallow Snap channels in default_provider, including a legacy check and unit tests. Passed CI with 100% diff coverage.
76%
#3102 build providers: prevent snap refreshing in build environment snapcraft merged Merged to prevent snap refreshing in the build environment by holding refresh for one day. Adjusted per reviewer feedback to avoid incomplete manifests and address versioning string comparisons. Approved and merged.
73%
#1692 fix: refresh build snaps if already installed craft-parts open Refreshes build snaps when already installed to reflect channel changes, fixing #496. Has 2 approvals, 1 unresolved review comment, and mostly passing CI.
72%
#2261 build providers: inject the base for classic snapcraft merged Successfully merged pull request that injects the base snap for classic confinement to configure appropriate linker paths during builds. Approved by two reviewers and passed CI checks.
72%
#4514 fix: install snapd from edge inside build environments snapcraft merged Merged. Installs snapd from the edge channel in build environments for component builds. Updated spread tests exercise the feature. Temporarily points to craft-providers main to incorporate a hotfix. Approved and passed CI.
72%