The error when trying to release a revision that's not a integer is ugly
Metadata
Current evaluation
Invalid release revisions now produce a formatted user-facing StoreReleaseError; the fix merged in canonical/snapcraft#1599 (c7adb25f7) and shipped in Snapcraft 2.35.
Resolution: closed resolved
Reason: PR #1599 was merged as commit c7adb25f7, formatting Store BAD REQUEST errors and adding invalid-revision test coverage. The change was released in Snapcraft 2.35.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The error returned when I try to release to a revision that's not an integer I get an error that's not formatted for a user.
$ snapcraft release u1test20160920 notanumber edge
{'revision': ['This field must be an integer.']}
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Invalid release revisions now produce a formatted user-facing StoreReleaseError; the fix merged in canonical/snapcraft#1599 (c7adb25f7) and shipped in Snapcraft 2.35. | |
| stealth/space-bunny-alpha | — | closed resolved | Store BAD REQUEST errors from `snapcraft release` (e.g. non-integer revision) printed raw dicts; fixed in PR #1599 (commit c7adb25f7), released in 2.35, which formats them into user-friendly messages. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed the raw validation error for non-integer release revisions by formatting Store BAD REQUEST responses. Merged in canonical/snapcraft#1599 (c7adb25f7). | |
| stealth/space-bunny-alpha | — | closed resolved | Invalid release revisions produced an unfriendly raw validation error. Fixing StoreReleaseError’s BAD REQUEST formatting was addressed by snapcraft#1599 (commit c7adb25f7). | |
| qwen/qwen3.6-35b-a3b | — | — | Closed with no comments or resolution. The unformatted revision validation error was likely addressed in later snapcraft releases or abandoned due to inactivity. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. The unformatted error message for non-integer revisions in snapcraft release was fixed. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#1599
(confidence 100%)
Merged resolving PR, committed as c7adb25f7.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2059787 inaccurate error output in snapcraft release if given invalid revision | snapcraft (launchpad) | open | Valid CLI parsing bug: an invalid revision makes snapcraft release claim the release command does not exist; current code still uses type=int, and an exact duplicate remains open. | |
| #1604810 try to snapcraft release an unexisting revision shows the wrong error | snapcraft (launchpad) | open | Maintainer-confirmed misleading error when releasing a nonexistent revision; store-specific behavior still needs clarification before implementation. | |
| #1599 Fixed StoreReleaseError format for BAD REQUEST error | snapcraft | merged | Merged PR #1599 as c7adb25f7, formatting Store BAD REQUEST errors for users and adding invalid-revision test coverage; released in Snapcraft 2.35. | |
| #1999038 "snapcraft release" chokes given an invalid revision value | snapcraft (launchpad) | open | Confirmed parser bug: `snapcraft release mysnap fubar` reports "No such command 'release'" instead of a bad-revision error. Reproduced by mr-cal on 7.2.9, labeled craft-1532, still open with no fix. | |
| #1664704 snapcraft release gives misleading error when revision does not exist | snapcraft (launchpad) | open | The legacy snapcraft release error wrongly advised registering an already-registered snap; that obsolete code path was removed in ffb164b7a, and current releases use craft-store. | |
| #4401 misleading error message on "release" if mandatory arguments are missing | snapcraft | closed | `snapcraft release` now reports missing required arguments or invalid revision types instead of falsely claiming the release command does not exist. |