Skip to content

fix: retry and sleep inmprovements - #212

Merged
jpopesculian merged 1 commit into
mainfrom
jpop/improve-retry-sleep
Sep 4, 2026
Merged

fix: retry and sleep inmprovements#212
jpopesculian merged 1 commit into
mainfrom
jpop/improve-retry-sleep

Conversation

@jpopesculian

@jpopesculian jpopesculian commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved exponential backoff to respect maximum delays, including when the initial delay exceeds the configured maximum.
    • Retry exhaustion now preserves and reports the underlying download error.
    • Retry configuration loaded from JSON now correctly uses standard builder defaults for missing values.
    • Browser-based delays now handle long durations safely and clean up timers reliably.
  • Improvements
    • Uploads now provide a warning when no retries remain.
    • Added support for clearing browser timers across supported execution environments.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 6ede6220-858e-4bca-8eb1-ffc352314f05

📥 Commits

Reviewing files that changed from the base of the PR and between 9ae4d9f and d3ce97b.

📒 Files selected for processing (8)
  • client/src/lib.rs
  • client/src/retry.rs
  • client/src/sleep.rs
  • client/src/wasm.rs
  • data-utils/src/wasm/aqora_client/retry.rs
  • data-utils/tests/web/aqora_client.rs
  • src/download.rs
  • src/upload.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Retry and timing behavior

Layer / File(s) Summary
Backoff defaults and delay limits
client/src/retry.rs, data-utils/src/wasm/aqora_client/retry.rs, data-utils/tests/web/aqora_client.rs
Backoff delays are capped, unbounded retries remain supported, and missing serialized options use builder defaults. Tests cover these behaviors.
WASM sleep lifecycle
client/src/lib.rs, client/src/sleep.rs, client/src/wasm.rs, data-utils/tests/web/aqora_client.rs
WASM sleep tracks its timeout handle, clears it on completion or drop, exposes the retry-gated module, and saturates large durations.
Range download retry flow
src/download.rs
Range retries use an explicit backoff iterator and preserve underlying S3 errors. Tests verify retry count and error preservation.
Upload retry exhaustion reporting
src/upload.rs
Exhausted upload retries suspend the progress bar and log a warning.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to d3ce9

This change bounds retry delays, preserves download failure causes, improves retry exhaustion reporting, and makes WASM sleep cleanup safer. The covered retry and timing paths show no remaining merge-blocking risk.

Sequence Diagram(s)

sequenceDiagram
  participant RangeDownloader
  participant ExponentialBackoff
  participant GraphQLClient
  participant S3
  RangeDownloader->>GraphQLClient: request S3 range
  GraphQLClient->>S3: fetch range
  S3-->>GraphQLClient: return error
  GraphQLClient-->>RangeDownloader: preserve S3 error
  RangeDownloader->>ExponentialBackoff: request next delay
  ExponentialBackoff-->>RangeDownloader: return delay or None
  RangeDownloader->>RangeDownloader: sleep before retry
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 47.83% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the main retry and sleep changes. It contains a spelling error in “inmprovements,” but the intended meaning remains clear.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jpop/improve-retry-sleep

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jpopesculian
jpopesculian merged commit 9012ebc into main Sep 4, 2026
17 checks passed
@jpopesculian
jpopesculian deleted the jpop/improve-retry-sleep branch September 4, 2026 13:29
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