build providers: allow snapcraft channel selection
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
Enabled for early testing when snapcraft is not injected from the host.
Warn the user when this is done.
LP: #1792185
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] 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: 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Enables snapcraft channel selection for build providers during early testing when not injected from the host, including a user warning. Accepted despite skipped unit tests caused by a known bionic LXD environment issue. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to enable snapcraft channel selection for build providers during early testing when snapcraft is not injected from the host. Adds a user warning and addresses LP #1792185. Reported test failures were caused by an external LXD environment issue. |
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. | |
| #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. | |
| #2938 remote build: default to snapcraft's stable channel | snapcraft | merged | Merged following reviewer approval and passing CI. Adds a test confirming snap.requestBuilds() defaults to snapcraft's stable channel. Resolved with minimal changes. | |
| #3600 remote build: use channel defaults (CRAFT-568) | snapcraft | merged | Merged changes remove hardcoded channel forcing for snapcraft and core18 in remote builds, aligning with snapcraft's core20 transition. Approved and merged with a minimal diff. Launchpad now auto-selects the correct build-base. | |
| #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. | |
| #6384 remote-build: set snapcraft's channel in the build recipe | snapcraft | open | Enhancement to set Snapcraft's channel in remote build recipes and expose an environment variable for channel selection. Triaged, from maintainer, 23 days old. | |
| #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). | |
| #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). |