← Back to issue list

fix: snapcraft try error shows effective base

View original Github issue

Metadata

Project
snapcraft
Number
#6193
Type
pull request
State
merged
Author
vedantdaterao
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #6193 fixed `snapcraft try` to report the project's effective base via `get_effective_base()`, with core24 and core26 test coverage, in commit bcae1c3ed.

Resolution: closed resolved

Reason: PR #6193 was approved and merged as commit bcae1c3ed, resolving issue #6186 by resolving and displaying the configured effective base in the error message.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Fixes #6186 Use `get_effective_base()` to resolve the effective base before constructing the error message. ### Changes - `snapcraft/commands/lifecycle.py`: use `get_effective_base()` in `TryCommand.run()` - `tests/unit/commands/test_lifecycle.py`: add tests for `core24` and `core26` using pytest.mark.paramterize This change reads the project's base field via the project service so the error message accurately reports effective base the user configured. --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [ ] I've successfully run `make lint && make test`. - [ ] I've added or updated any relevant documentation. - [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #6193 fixed `snapcraft try` to report the project's effective base via `get_effective_base()`, with core24 and core26 test coverage, in commit bcae1c3ed.
stealth/space-bunny-alpha — closed resolved Merged PR #6193 fixed snapcraft try to report the effective project base. Commit bcae1c3ed added get_effective_base() handling and tests for core24 and core26.
qwen/qwen3.6-35b-a3b — — Merged fix for #6186 that updates the snapcraft try error message to accurately display the effective base using get_effective_base(). Approved by reviewers and merged with added unit tests for core24 and core26.
qwen3.6-35b-a3b-mtp-q6 — — Merged fix for snapcraft try error reporting. TryCommand.run now calls get_effective_base() to accurately display the configured base in error messages. Includes unit tests for core24 and core26. Resolves #6186.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#6186 (confidence 100%)

    The outdated `snapcraft try` base error reported in this issue was fixed by PR #6193.

Related issues

Issue Project State Summary Similarity
#6186 `snapcraft try` error is outdated snapcraft closed Fixed by merged PR #6193 (commit bcae1c3ed): snapcraft try now reports the effective project base, with core24 and core26 test coverage.
87%
#6187 Fix snapcraft try error to show actual base snapcraft closed Closed unmerged over contribution-guideline concerns; PR #6193 later fixed #6186 by using the effective project base in commit bcae1c3ed.
79%
#6499 fix: parse build-base for snapcraftctl validation snapcraft merged Fixed a validator bug preventing core22/core24 snaps without a `base` key from using `snapcraftctl`. Merged as #6499, resolving #6336.
78%
#2309 snap: improve early base detection logic snapcraft merged Merged PR #2309 (commit 3565ed2e7), fixing early base detection when Snapcraft runs in a build provider outside the project directory (LP #1795501).
74%
#3579 snap: move base to core20 (CRAFT-509) snapcraft merged Merged PR #3579 via ed2baf8bd, moving Snapcraft's own snap to the core20 base; implementation commit 18a974e01.
74%
#4118 init: use core22 base for `snapcraft init` snapcraft merged Merged PR #4118 (mr-cal, CRAFT-1670): snapcraft init now scaffolds core22 as the default base instead of core20, with the command moved from snapcraft_legacy/ to snapcraft/ and a spread test added. Squash-merged as 4afc9e4c9.
74%
#5388 fix: don't fail when checking the base snapcraft merged Merged PR #5388 in commit 5c43d861c, deferring base-check failures so invalid base definitions reach Snapcraft's user-friendly validation errors (SNAPCRAFT-313).
73%
#4850 fix: allow coreXX-desktop bases snapcraft merged Merged PR #4850 in commit 61efc790d, adding support for core22-desktop and core24-desktop bases and fixing the Snapcraft 8.x build regression.
73%
#3014 meta: migrate get_build_base to Snap snapcraft merged Merged in snapcraft#3014 via commit 09be6bb53, moving get_build_base from Projectinfo to Snap and simplifying tests to use Snap metadata instead of self.project.info.
73%
#6224 fix(test): correct match string in try test snapcraft merged Merged PR #6224 in commit 78ef8569b, correcting the snapcraft try test match string after #6193 changed the effective-base output.
73%