← Back to issue list

Add regex validator for app commands

View original Github issue

Metadata

Project
snapcraft
Number
#4999
Type
issue
State
closed
Author
mr-cal
Labels
good first issue
Created
Updated
Closed

Current evaluation

Added app command-field validation for command, stop-command, post-stop-command, reload-command, and bus-name in Snapcraft 8.5.1; release notes credit #4999.

Resolution: closed resolved

Reason: The Snapcraft 8.5.1 changelog records improved validation for all five requested fields and explicitly references #4999.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done Add a validator for `command`, `stop-command`, `reload-command`, `post-stop-command`, and `bus-name` to match `snapd`'s [validation](https://github.com/canonical/snapd/blob/0706e2d0b20ae2bf030863f142b8491b66e80bcb/snap/validate.go#L756). ### Why it needs to get done Using an `=` sign is a common mistake: ```yaml apps: my-app: command: my-app --parameter=foo ``` * A user has to run the entire lifecycle to receive an error that could have been caught when validating. * The error message from snapd isn't great.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Added app command-field validation for command, stop-command, post-stop-command, reload-command, and bus-name in Snapcraft 8.5.1; release notes credit #4999.
stealth/space-bunny-alpha — closed resolved App command-field validation was improved in Snapcraft 8.5.1; its changelog explicitly credits #4999 for all five requested fields.
stealth/space-bunny-alpha — closed stale Closed without a documented fix; the last substantive comment asked to enumerate the schema’s character restrictions.
stealth/space-bunny-alpha — closed resolved Added snapd-compatible regex validation for app command fields in PR #2627, commit 5534fe3d9.
stealth/space-bunny-alpha — closed resolved Schema synchronization added snapd-compatible validation for app command fields in snapcraft PR #2627, commit 5534fe3d9.
qwen/qwen3.6-35b-a3b — — Abandoned. The request to add regex validation for snap command fields was closed without implementation after linking to an internal Jira ticket, with no pull request or code changes submitted.
qwen/qwen3.6-35b-a3b — — Abandoned. No implementation or pull request was created. Maintainers logged the requirement as internal ticket CRAFT-3293 and noted schema character limitations, but the regex validation for app commands remains unimplemented.
qwen/qwen3.6-35b-a3b — — Closed without implementation. Superseded by internal Jira ticket CRAFT-3293. The requested regex validator for snap command fields was not merged or added to the codebase.
qwen3.6-35b-a3b-mtp-q6 — — Closed without implementation. The request to add regex validators for snap command fields was abandoned after a contributor noted existing schema character limitations. No pull request was opened.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.