Parse and validate component keywords in `snapcraft.yaml`
Metadata
Current evaluation
Component parsing, validation, and get_component_names() landed in 070c7e995 and shipped with core22 component support through merged PR #4654 (76e909dea).
Resolution: closed resolved
Reason: The Project model gained top-level component validation and name access in commit 070c7e995. The broader implementation was delivered by merged PR canonical/snapcraft#4654 at commit 76e909dea.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
The Project model needs to parse and validate a top-level `components` keyword containing a list of `Component` pydantic models.
The schema is:
```yaml
components:
<name>:
type: "test"
summary: ...
description: ...
version: ...
```
Rules:
- component names are unique
- component names adhere to the naming convention for namespaced partitions (lowercase alphabetical characters and hyphens, cannot start or end with a hyphen)
- component type is `test`
- summary is a string with the same naming convention as the top-level `summary` keyword
- description is a string (same as the top-level `description`)
- version is an optional field with the same naming convention as the top-level `version` keyword
Snapcraft also needs a new function in the Project module called `get_component_names() -> List[str]`. It should return a list of component names. Later, this will be used to create a list of partitions to pass to the `LifecycleManager`.
### Why it needs to get done
To support components in snapcraft
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Component parsing, validation, and get_component_names() landed in 070c7e995 and shipped with core22 component support through merged PR #4654 (76e909dea). | |
| stealth/space-bunny-alpha | — | closed resolved | Component parsing, validation, and get_component_names() landed in 070c7e995; core22 support was merged via #4654 (76e909dea). | |
| stealth/space-bunny-alpha | — | closed resolved | Component parsing, validation, and get_component_names() landed in 070c7e995 and shipped via merged PR #4654 (76e909dea). | |
| stealth/space-bunny-alpha | — | closed resolved | Component parsing and validation were added in 070c7e995 and delivered with core22 support by merged PR #4654 (76e909dea). | |
| stealth/space-bunny-alpha | — | closed resolved | Top-level component support landed in 070c7e995 and was delivered with core22 component support by merged PR #4654 (76e909dea). | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation or linked pull requests. Likely abandoned due to prolonged inactivity. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation or linked pull requests. The feature to parse and validate component keywords in snapcraft.yaml was abandoned or deferred. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation or linked pull requests. The request to parse and validate component keywords in snapcraft.yaml was abandoned or superseded. No comments or resolution details were provided. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution or implementation. The requirement to parse and validate component keywords in snapcraft.yaml was abandoned. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#4654
(confidence 99%)
Merged core22 component support, including the Project model changes tracked by #4464.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4538 Validate component names do not begin with `snap-` | snapcraft | closed | Merged PR #4566 added validation rejecting snapcraft.yaml component names beginning with the snapd-reserved prefix "snap-". |