← Back to issue list

many: add snapcraftctl set-grade

View original Github issue

Metadata

Project
snapcraft
Number
#2067
Type
pull request
State
merged
Author
kyrofa
Labels
Created
Updated
Closed

Current evaluation

Merged. Introduces snapcraftctl set-grade for scriptlet-based snap grade configuration and adds final YAML validation before snap.yaml generation. Resolves #2064. Approved, passed CI, and modified 20 files.

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] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- This PR resolves #2064 by adding the ability to set the snap grade from a scriptlet using `snapcraftctl set-grade <grade>`. It also begins validating final YAML before generating the `snap.yaml`, catching both extracted and scriptlet metadata (such as grade) that doesn't match the schema.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Introduces snapcraftctl set-grade for scriptlet-based snap grade configuration and adds final YAML validation before snap.yaml generation. Resolves #2064. Approved, passed CI, and modified 20 files.
qwen3.6-35b-a3b-mtp-q6 Merged. Resolves #2064 by adding snapcraftctl set-grade to configure snap grades via scriptlets. Includes final YAML validation before snap.yaml generation to catch metadata schema mismatches.
qwen3.6-35b-a3b-mtp-q6 Merged. Introduces snapcraftctl set-grade to configure snap grades via scriptlets, resolving #2064. Adds pre-generation YAML validation to catch metadata and schema mismatches in extracted and scriptlet-defined fields.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#764 Implementing 'grade' support in snapcraft.yaml snapcraft merged Implemented grade support in snapcraft.yaml to assert snap quality. Resolved merge conflicts and a failing test by updating the branch. Passed CI checks and was merged into the main branch.
78%
#2002 many: add snapcraftctl command for scriptlets snapcraft merged Merged. Adds snapcraftctl CLI for scriptlet-to-Snapcraft communication. Introduces snapcraftctl build for override-build, resolving #1675 and LP: #1751749. Approved with passing CI across 28 files.
76%
#2230 snap: use set-version and set-grade snapcraft merged Merged updates to snap handling that implement set-version and set-grade commands, resolving Launchpad bug #1789695. Approved by reviewer, passed CI, and increased test coverage by 0.01%.
74%
#3325 snapcraftctl: add checks for empty string for set-version & set-grade snapcraft merged Merged validation checks for empty strings in snapcraftctl set-version and set-grade. Empty inputs previously caused cryptic metadata errors. The change now explicitly rejects invalid values with clear error messages. Approved and merged.
73%
#2063 many: add snapcraftctl set-version snapcraft merged Merged. Adds snapcraftctl set-version to configure snap versions from scriptlets, resolving issue 1676. Provides reusable infrastructure for future setter commands. Approved by reviewer and passed CI checks.
72%
#427 build: set snap grade based on version rockcraft merged Merged a one-line update to set the snap grade based on the version in rockcraft, resolving a parity gap with charmcraft. Approved by two reviewers and passed CI checks.
71%