← Back to issue list

Return different error codes for `snapcraft upload` responses

View original Github issue

Metadata

Project
snapcraft
Number
#6081
Type
issue
State
open
Author
mr-cal
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed
—

Current evaluation

Enhancement to give snapcraft upload stable, documented exit codes per Store processing status, especially manual review; triaged and open, with exact nonstandard values still undecided.

Suggested action: keep open

Reason: The Status: Triaged and Type: Enhancement labels confirm maintainer assessment, and the current notify_upload loop treats every processed status without errors as success, including need_manual_review. The statuses, implementation location, documentation requirement, and CI use case are explicit; although exact values remain open, @Jehan explicitly accepted any stable, documented values.

Evaluated by: mr-cal-bot

Impact: 55 Quick Win: 28 Complexity: 40 Confidence: 95 Actionability: 86

Issue body

### Check existing issues - [x] I've verified that this request isn't described by any existing issues. ### Request Return different error codes based on the store response from `snapcraft upload`: - `ready_to_release` -> 0 - `being_processed` -> ? - `need_manual_review` -> ? - `processing_upload_delta_error` -> ? - `processing_error` -> ? - all other errors unrelated to the store response -> 1 The error codes should be added to the command's reference documentation. The implementation should be as straightforward as getting `status[code]` and raising the appropriate error code [here](https://github.com/canonical/snapcraft/blob/603626051f05b64f19b683fc3d5ea3edca1b8628/snapcraft/store/client.py#L471-L478). ### The problem it solves This allows CI workflows to programmatically handle the result of `snapcraft upload`. Fixes #6076

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 55
Quick Win: 28
Complexity: 40
Confidence: 95
Actionability: 86
keep open Enhancement to give snapcraft upload stable, documented exit codes per Store processing status, especially manual review; triaged and open, with exact nonstandard values still undecided.
stealth/space-bunny-alpha
Impact: 57
Quick Win: 26
Complexity: 42
Confidence: 92
Actionability: 80
keep open Enhancement requests stable, documented exit codes for five snapcraft upload Store statuses; it is triaged and remains unimplemented.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 19
Complexity: 20
Confidence: 80
Actionability: 80
keep open Enhancement to return specific exit codes for `snapcraft upload` based on store response status to enable CI programmatic handling. Triaged, open, no implementation yet.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 26
Staleness: 50
Complexity: 35
Confidence: 82
Support Request: 5
keep open Enhancement to make `snapcraft upload` return distinct exit codes per store processing status (ready_to_release, being_processed, need_manual_review, processing errors) so CI workflows can handle results programmatically. Triaged, acknowledged by a maintainer, not yet implemented in client.py.
qwen/qwen3.6-35b-a3b
Staleness: 50
Complexity: 15
Confidence: 85
Support Request: 5
keep open Enhancement to return specific error codes from snapcraft upload for CI programmatic handling. Triaged and acknowledged by maintainers, currently awaiting implementation or assignment after ~4.5 months of inactivity.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 20
Confidence: 95
Support Request: 5
keep open Enhancement to assign distinct exit codes to snapcraft upload responses for CI automation. Triaged by maintainer, awaiting implementation.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#6076 (confidence 99%)

    Explicitly identified as fixed by this broader exit-code enhancement and requests distinguishing manual review from errors.

  • Related To: snapcraft (launchpad)#1743587 (confidence 94%)

    Launchpad report describing the same manual-review status being treated as a successful upload.

Related issues

No related issues found above the similarity threshold.