← Back to issue list

snap: improve early base detection logic

View original Github issue

Metadata

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

Current evaluation

Merged. Resolved early base detection failure in build providers by updating logic to account for snapcraft's non-project directory execution. Approved by reviewer, passed CI, and merged with minimal changes.

Suggested action:

No scores available.

Issue body

The current logic missed the detection when running inside a build provider given that by default snapcraft does not run within the project directory. LP: #1795501 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/)? - [ ] 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)? - [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [ ] 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. Resolved early base detection failure in build providers by updating logic to account for snapcraft's non-project directory execution. Approved by reviewer, passed CI, and merged with minimal changes.
qwen3.6-35b-a3b-mtp-q6 Merged fix for early base detection logic that previously failed when running inside a build provider due to snapcraft not executing in the project directory. Resolves LP: #1795501.
qwen3.6-35b-a3b-mtp-q6 Merged update to snapcraft's early base detection logic. Resolves LP: #1795501 by fixing detection failures inside build providers, where execution outside the project directory previously prevented accurate base identification.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5388 fix: don't fail when checking the base snapcraft merged Merged a fix preventing snapcraft from failing early during base checks. Enables user-friendly error reporting for incorrect bases. Approved by two reviewers and merged with 10 additions and 30 deletions across three files.
80%
#3631 parts: add early base parsing (CRAFT-766) snapcraft merged Merged into snapcraft/7.0. Adds early base parsing for lifecycle commands, verifying the base entry via project YAML and falling back to legacy handlers if not core22. Approved, passed CI, +0.81% coverage.
76%
#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).
76%
#4580 fix: do not propagate build-base to snap.yaml snapcraft merged Merged a fix preventing build-base from propagating to snap.yaml. The pull request received two approvals, passed CI checks and code coverage, and was successfully integrated.
76%
#3039 build providers: setup initial apt source configuration snapcraft merged Merged refactoring centralizing snapcraft initialization in the base provider and adding apt source configuration via environment flags. Fixed a file permission error and streamlined installation. Approved and merged after CI checks.
75%
#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.
75%
#3180 build providers: nice message on bad base snapcraft merged Merged implementation adding a new exception to handle invalid bases in LXD build providers, providing clearer error messages. Resolves SNAPCRAFT-1H2. Approved by one reviewer, passed CI, and modified 4 files (+77/-14).
75%
#4755 tests: fix devel base snap test snapcraft merged Merged a fix for the devel base snap test. The update ensures snapcraft correctly creates and utilizes the devel base. Approved by two reviewers, passed CI checks, and applied with a minimal one-file change.
74%
#3579 snap: move base to core20 (CRAFT-509) snapcraft merged Merged updates the snap base to core20. Approved by two reviewers with passing CI checks. Changes affect 13 files, increase coverage by 0.07%, and update initialization templates to core20.
74%
#2394 build providers: fix osx non base and injection snapcraft merged Merged fix for macOS build provider non-base and injection issues. Approved by one reviewer, passed CI, and updated five files to resolve SNAPCRAFT-78, SNAPCRAFT-7A, and Launchpad bug 1801965.
73%