Skip to content

fix: recognize completed large files after finish errors - #264

Open
pcbeingused333 wants to merge 1 commit into
Backblaze:masterfrom
pcbeingused333:fix/c3447-finish-large-file
Open

pcbeingused333 wants to merge 1 commit into
Backblaze:masterfrom
pcbeingused333:fix/c3447-finish-large-file

Conversation

@pcbeingused333

Copy link
Copy Markdown

Fixes #41

A lost response from b2_finish_large_file can cause a retry to return HTTP 400 even though the file was completed. Check b2_get_file_info after a bad request and return the file version when its action is upload. If the file is unfinished or its info cannot be retrieved, preserve the original finish error.

The service now waits for an in-progress finish before returning 400, so this check can reliably confirm completion. The change applies to all existing finish callers without changing retry policy or public APIs.

Testing and validation

Result: main with regression tests has 1 failure out of 61; the fix passes all 61. check_code passes for production sources and both changed files when run with host Python. Running it over the entire test tree reports 30 pre-existing license/layering errors outside the changed files.

Regression tests cover a completed upload, an unfinished file, and a failed file-info request. The existing finish request test remains unchanged.

This change and its regression tests were prepared with AI assistance (Codex).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better retry of b2_finish_large_file

1 participant