← Back to issue list

refactor: migrate validate command

View original Github issue

Metadata

Project
snapcraft
Number
#6208
Type
pull request
State
merged
Author
mr-cal
Labels
PR: Squash
Created
Updated
Closed

Current evaluation

Merged via squash. Refactored the gated command and migrated the validate command from legacy to modern Snapcraft, implementing a new Pydantic model for validation assertions across 21 files.

Suggested action:

No scores available.

Issue body

2 refactors: 1. Re-organize the `gated` command from `snapcraft/commands/validation_sets` to `snapcraft/commands/validations`. This fixes a misorganization I made in #6145. 2. Migrate the `validate` command from `snapcraft_legacy`. Doing this properly required a new Pydantic model. Validation assertions fit in nicely with the other assertion code in modern Snapcraft. ### Background Because it's not very clear in the code or docs, this table explains what the gated and validate commands do compared to the other assertions we work with in Snapcraft: | assertion type | list command | edit command | | - | - | - | | validation sets | `validation-sets` | `edit-validation-sets` | | confdb schemas | `confdb-schemas` | `edit-confdb-schemas` | | validations | `gated` | `validate` | (SNAPCRAFT-1318) --- - [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/). - [x] 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
qwen/qwen3.6-35b-a3b Merged via squash. Refactored the gated command and migrated the validate command from legacy to modern Snapcraft, implementing a new Pydantic model for validation assertions across 21 files.
qwen3.6-35b-a3b-mtp-q6 Merged a squashed pull request migrating the validate command from snapcraft_legacy to modern Snapcraft using a new Pydantic model. Also reorganizes the gated command to the correct directory, resolving a prior misplacement.
qwen3.6-35b-a3b-mtp-q6 Merged a squash commit that reorganized the gated command directory and migrated the validate command from snapcraft_legacy to modern Snapcraft using a new Pydantic model. Resolves SNAPCRAFT-1318.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#6145 refactor: migrate gated command snapcraft merged Merged the refactoring that migrates the gated command from snapcraft_legacy. Approved by two reviewers and passed most CI checks. Resolves SNAPCRAFT-1314.
76%
#6236 refactor: migrate release models snapcraft merged Merged after two approvals. Refactored Revision, Release, and Releases models from snapcraft_legacy to Pydantic, simplifying implementation. Unrelated spread test failures were noted but did not block the merge.
70%