← Back to issue list

Improve snapcraft.yaml validation errors.

View original Github issue

Metadata

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

Current evaluation

Merged in snapcraft#296 via commit 452a91595, improving errors for missing icons, AppArmor/seccomp files, and schema properties; fixes LP #1524663.

Resolution: closed resolved

Reason: PR #296 was merged as commit 452a91595, adding clearer validation messages for snapcraft.yaml file existence, file types, and schema failures.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This PR fixes LP: [#1524663](https://bugs.launchpad.net/snapcraft/+bug/1524663) by improving YAML validation errors across the board. Specifically: - Improve error message if icon isn't a .png or .svg, or doesn't exist. Was: "'icon.png' is not an icon-path" Now: "Specified icon 'icon.png' does not exist" or "'icon' must be either a .png or a .svg" - Improve error message if apparmor or seccomp profiles don't exist. Was: "The 'migration' property does not match the required schema: {'security-policy': {'apparmor': 'path/profile', 'seccomp': 'path/profile'}, 'type': 'migration-skill'} is not valid under any of the given schemas" Now: "Specified file 'path/profile' does not exist" - Improve generic jsonschema errors to include the properties which had the error. Was: "None is not of type 'object'" Now: "The 'parts' property does not match the required schema: None is not of type 'object'"

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in snapcraft#296 via commit 452a91595, improving errors for missing icons, AppArmor/seccomp files, and schema properties; fixes LP #1524663.
stealth/space-bunny-alpha — closed resolved Merged in snapcraft#296 via commit 452a91595, improving snapcraft.yaml errors for missing icons, AppArmor/seccomp files, and schema property validation. Fixes LP #1524663.
stealth/space-bunny-alpha — closed resolved Merged PR #296 in dab07dd5, improving snapcraft.yaml errors for missing or invalid icons, AppArmor/seccomp profiles, and property-specific schema validation; resolves LP #1524663.
qwen/qwen3.6-35b-a3b — — Merged improvements to snapcraft.yaml validation error messages. Replaces cryptic jsonschema outputs with clear messages for missing or invalid icons, apparmor, and seccomp profiles. Approved by reviewers and integrated into the codebase.
qwen3.6-35b-a3b-mtp-q6 — — Merged improvements to snapcraft.yaml validation error messages for invalid icons, missing security profiles, and schema mismatches. Resolves Launchpad bug #1524663.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#419 Properly validate the schema snapcraft merged Merged PR #419 in commit 116352b7d, refactoring schema validation to remove duplicated logic from snapcraft.yaml and fixing autopackage tests.
71%
#1686557 Duplicated error message during yaml validation snapcraft (launchpad) closed Fixed duplicated YAML validation errors in snapcore/snapcraft#1347 (commit 9e8e336de) by removing an early exit and consolidating CLI error handling.
71%