← Back to issue list

extensions: use pydantic to validate yaml before expanding

View original Github issue

Metadata

Project
snapcraft
Number
#3814
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged updates implementing pydantic validation for snapcraft.yaml prior to expansion and correcting an underscore-to-hyphen alias mapping. Approved by two reviewers with passing CI checks, advancing core22 architecture support.

Suggested action:

No scores available.

Issue body

- [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] Have you successfully run `make lint`? - [X] Have you successfully run `pytest tests/unit`? ----- Part 3 of supporting architectures for `core22`. Full code change is proposed [here](https://github.com/snapcore/snapcraft/pull/3712). 2 changes: - Convert underscores to hyphens (missing `by_alias=True`) - Validate snapcraft.yaml with pydantic (CRAFT-1165)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged updates implementing pydantic validation for snapcraft.yaml prior to expansion and correcting an underscore-to-hyphen alias mapping. Approved by two reviewers with passing CI checks, advancing core22 architecture support.
qwen3.6-35b-a3b-mtp-q6 Merged changes adding Pydantic validation for snapcraft.yaml before extension expansion and fixing underscore-to-hyphen conversion. Part of core22 architecture support.
qwen3.6-35b-a3b-mtp-q6 Merged. Implemented pydantic validation for YAML before expansion and fixed underscore-to-hyphen conversion in extensions to support core22 architecture handling.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4110 extensions: parse snapcraft.yaml before expanding extensions snapcraft merged Merged fix for the expand-extensions command to parse snapcraft.yaml before expanding extensions. Resolves core22 parsing issues with parse-info and advanced grammar keywords. Approved, passed CI, and merged into main.
80%
#3526 project: validate snapcraft yaml before using it (CRAFT-55) snapcraft closed Merged into master. Moves snapcraft YAML validation to get_project() to prevent errors during extension application and JSON schema checks. Approved by two reviewers.
74%
#3654 projects: add grammar validation snapcraft merged Merged after review and CI approval. Adds pydantic validation for snapcraft.yaml grammar using craft-grammar models. A follow-up update was noted to align with a craft-grammar version change that switched grammar entries to lists.
72%