← 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 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.

Suggested action: keep open

Reason: The issue is triaged (Status: Triaged, Type: Enhancement labels), authored by a maintainer, and acknowledged by Jehan (2026-03-05) who endorsed the approach as long as codes are 'well documented and stable'. I verified the code in snapcraft/store/client.py notify_upload() still raises a generic SnapcraftError with no per-status exit codes, and no commit implements this, so the request remains valid and actionable.

Impact: 40 Quick Win: 26.0 Staleness: 50 Complexity: 35 Confidence: 82 Support Request: 5

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
qwen/qwen3.8-27b
Impact: 40
Quick Win: 26.0
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 20
Confidence: 85
Support Request: 0
keep open Assign distinct exit codes to snapcraft upload responses for CI automation. Triaged as an enhancement, with maintainers discussing specific values. Awaiting implementation and assignment.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: canonical/snapcraft#6076 (confidence 85%)

    This issue explicitly states 'Fixes #6076', which requests a distinct exit code for the manual-review status in snapcraft upload; #6076 is still open and this is the broader superset implementation.

Related issues

Issue Project State Summary Similarity
#6076 Differentiate “need manual review” status in "snapcraft upload" from errors snapcraft open Feature request to differentiate 'need manual review' exit code from errors in snapcraft upload for CI pipelines. Maintainer acknowledged with two proposed solutions (distinct exit codes via #6081, and --format json). No implementation yet.
71%