feat(snap_config): add snap_config model and utilities
Metadata
Current evaluation
Merged PR #239 as commit 21393ee7, adding generic snap_config models and utilities imported from Snapcraft for CRAFT-2477 build-mode support.
Resolution: closed resolved
Reason: PR #239 was merged as commit 21393ee7. Follow-up PR canonical/craft-application#242 later consumed the new utilities to select a build provider and handle host execution.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `tox`?
-----
This is the first of 3 commits for setting the build mode:
- a PR to import `snap_config` (this PR)
- a PR to determine which provider to use
- a PR to determine whether to run on the host or in a provider)
Inside this PR are 2 commits:
- import the `snap_config` model and utilities from snapcraft unmodified
- updates them to `craft-application` coding standards and make the code generic
The `snap-helpers` package is a required library but applications are not required to run as a snap or have a snap config. I will ensure this behavior in the next PR where I will use the model.
(CRAFT-2477)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #239 as commit 21393ee7, adding generic snap_config models and utilities imported from Snapcraft for CRAFT-2477 build-mode support. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #239 as commit 21393ee7, adding generic snap_config models and utilities imported from Snapcraft as the first step toward build-mode support. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged snap_config model and utilities into craft-application. Imported from snapcraft, updated to coding standards, and made generic. Approved by two reviewers, passed CI, and initiates a three-part series for build mode configuration. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-application#242
(confidence 99%)
Follow-up CRAFT-2477 PR that used snap_config for provider selection and host-versus-provider execution.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3898 config: add snap config model | snapcraft | merged | Merged into main via snapcore/snapcraft#3898 (d8db11e16), adding a snap configuration model to parse `snap set snapcraft key=value` data. | |
| #3893 config: add snap config model | snapcraft | closed | PR #3893 (snap config model, CRAFT-1321) closed unmerged by author mr-cal on 2022-08-31; superseded by #3898, which added a snaphelpers-based config model and merged as d8db11e16. | |
| #1518 project: introduce build-snaps | snapcraft | merged | Merged PR #1518 as commit 69dceb848, adding a project-level and part-level `build-snaps` keyword with advanced grammar support (+902/-10, 24 files). Implements the design in snapcraft#1442; the feature remains in current snapcraft. | |
| #6427 perf: avoid heavy imports in snap config model | snapcraft | merged | Merged PR #6427 to make snap_config.py lightweight, avoiding heavy imports in the configure hook. Replaces CraftBaseModel with pydantic.BaseModel and inlines helper functions. Fixes #6422. |