fix(store): raise error when upload processing status is 'error' - #6310
Open
Tejas-Raj01 wants to merge 3 commits into
Open
fix(store): raise error when upload processing status is 'error'#6310Tejas-Raj01 wants to merge 3 commits into
Tejas-Raj01 wants to merge 3 commits into
Conversation
Contributor
Author
|
Hi @mr-cal, The PR is ready and all the relevant checks (lint, fast tests, slow tests) have passed successfully. The spread test failures appear to be unrelated infrastructure issues. Could you please review this when you have a moment? Thanks! |
Contributor
Author
|
Hi @mr-cal, Just a quick follow-up on this PR. All relevant unit tests and lint checks have passed successfully. The failing spread tests appear to be caused by unrelated infrastructure issues on the Ubuntu 26.04 runners. Could you please review the changes when you have a chance? Thanks! |
Ensure the CLI raises a SnapcraftError and aborts the process if the store processing review returns an 'error' code, preventing silent failures and misleading success messages. Fixes canonical#6299
Tejas-Raj01
force-pushed
the
fix-upload-review-error
branch
from
July 21, 2026 07:41
da82c90 to
4396eda
Compare
Signed-off-by: Tejas <rajtejas.xyz@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context:
Currently, when running
snapcraft upload --release, the CLI polls the store API for the upload processing status. If the store's automated review fails, the API sometimes returns a status withcode: "error"but an emptyerrorslist. Because the existing logic only raised an exception if theerrorslist was populated, the CLI silently bypassed the error, broke out of the polling loop, and returned a revision number—falsely reporting a successful release to the user when it was actually rejected.Changes in this PR:
notify_uploadmethod insnapcraft/store/client.pyto explicitly check ifstatus.get("code") == "error". If this condition is met, the CLI now properly aborts the process and raises aSnapcraftError.test_notify_upload_error_status_raises_errorintests/unit/store/test_client.pyto ensure regressions are prevented.Fixes #6299
make lint && make test.