Skip to content

Fix annotation upload retries and exhausted retry counts - #528

Open
mstevens843 wants to merge 1 commit into
roboflow:mainfrom
mstevens843:fix/annotation-upload-retries
Open

mstevens843 wants to merge 1 commit into
roboflow:mainfrom
mstevens843:fix/annotation-upload-retries

Conversation

@mstevens843

@mstevens843 mstevens843 commented Sep 16, 2026

Copy link
Copy Markdown

Summary

Project.save_annotation() constructs a Retry object but calls the adapter directly, so num_retry_uploads is ignored when saving annotations.

This routes annotation saves through the existing retry helper. It also fixes exhausted retry counts in both annotation and image uploads: the exception handlers now read the live counter instead of a value only updated after success.

This follows up on the retry behavior introduced in #362. Default retry budgets, retryable exception types, and argument forwarding remain unchanged.

Tests

Added 12 regression tests covering:

  • Immediate success, transient failures, and exhausted retries.
  • Zero retry budgets and non-retryable exceptions.
  • Argument preservation across retries, including non-default values.
  • Retry-budget forwarding through the public upload path.

Local validation:

  • Full unittest suite: 1049 passed, 1 skipped.
  • Ruff formatting and lint checks passed.
  • Mypy passed.

HTTP responses are mocked and retry sleeps are patched, so the tests do not depend on network availability or backoff timing.

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.

1 participant