build providers: check revision before switching
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
Snapcraft was switching channels on the availability of a tracking
channel, it may be that this was incorrectly implemented or that snapd
now switched to always report a tracking-channel when installing a snap
with --dangerous after previously having installed a revision from the
Snap Store.
An additional check for revision is now enforced before setting the
switch.
LP: #1884576
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 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix enforcing a revision check before channel switching in build providers. Resolves incorrect channel switching when installing snaps with --dangerous. Closes LP: #1884576. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Added a revision check before switching channels in build providers to prevent incorrect channel changes when snapd reports a tracking channel. Resolves LP: #1884576. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3146 build providers: snap sw to channels if injecting | snapcraft | merged | 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. | |
| #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). | |
| #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. | |
| #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. | |
| #3130 build providers: don't show an error if there are no auto-refresh changes | snapcraft | merged | Merged a fix suppressing a false snap watch error when no auto-refresh changes exist. Adding a question mark to the change type ensures a success exit code. Approved by reviewers and passed CI. | |
| #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). | |
| #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. | |
| #1098 build: update craft-providers | rockcraft | merged | Merged update to the craft-providers dependency to resolve recurring snapd watch errors in spread tests. Approved by two reviewers and passed CI checks. The change modifies three files with minor adjustments. |