Repository navigation
Fail the upload when finish_upload returns no cluster ID - #955
Merged
caglarpir merged 1 commit intoNov 18, 2026
Merged
Conversation
caglarpir
force-pushed
the
fix-finish-without-cluster-id
branch
from
November 17, 2026 13:13
01d0bc9 to
5399a21
Compare
When finish_upload answers 200 without a cluster ID, nothing was created. The server answered so for an organization that the account is not a member of, until a server fix this week; it now answers with an HTTP error. upload took such an answer as finished: it reported the files as uploaded, exited 0 and wrote them to the upload history, so later runs skipped them as already uploaded although nothing was created. A response without a cluster ID now raises HTTPContentError, as other unexpected responses do: the upload stops with exit code 17, and nothing is counted as uploaded or written to the history.
caglarpir
force-pushed
the
fix-finish-without-cluster-id
branch
from
November 18, 2026 13:48
5399a21 to
f6e8372
Compare
caglarpir
added a commit
that referenced
this pull request
Nov 18, 2026
When finish_upload answered without a cluster ID, as for an organization that the account is not a member of, upload wrote the files to the upload history with "cluster_id": null, although nothing was uploaded. #955 stops writing such records, but the ones already written still made upload skip the files as already uploaded, and check_upload_history report them so. A record whose summary has the cluster ID null is now not taken as uploaded, by the duplicate check of upload, by check_upload_history and by the lookup of images uploaded in other sequences; upload logs that it ignores it. Only an explicit null counts: records written before 0.14.0 have no cluster ID and still count as uploaded.
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.
When
finish_uploadanswers 200 without a cluster ID, nothing was created. The server answered so for an organization that the account is not a member of, until a server fix this week; it now answers with an HTTP error.uploadtook such an answer as finished: it reported the files as uploaded, exited 0 and wrote them to the upload history, so later runs skipped them as already uploaded although nothing was created.A response without a cluster ID now raises
HTTPContentError, as other unexpected responses do. The upload stops with exit code 17, nothing is counted as uploaded, and nothing is written to the upload history, so running the upload again retries it. The error reads:Tested live before the server fix: one image uploaded with
--organization_keyset to an organization the account is not a member of. Without this change it was reported as uploaded and written to the upload history; with it, the upload failed with exit code 17 and nothing was written. Unit tests check that a response without a cluster ID ({},null, or not an object) raises and emits noupload_finished(which the history and the summary hook on). They fail on main, and they fail ifupload_finishedis emitted before the error.Not changed: as for HTTP errors from
finish_upload, noupload_failedevent is emitted, only the earlierupload_endand then the exit code.