Repository navigation
feat(web): add Connect-RPC retry interceptor and resilient polling/upload/download - #923
Merged
Merged
Conversation
…load/download - Introduce createRetryInterceptor with exponential backoff and jitter for idempotent unary RPCs - Support automatic retry on transient errors (HTTP 502/503/504, connection failures) - Enhance chunked-uploader with per-chunk retry up to 10 attempts - Add chunk download retry up to 10 attempts in backend-api.service - Enhance legacy polling interceptor with consecutive transient error tolerance - Provide comprehensive unit tests covering retry logic, non-retryable errors, and cancellation
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
August 28, 2026 06:45
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a robust retry mechanism with exponential backoff and jitter for transient errors (such as 502, 503, 504, and network drops) across the frontend API layer, including chunked uploads/downloads, legacy polling, and idempotent unary RPCs via a new Connect-RPC interceptor. The feedback recommends throwing a custom CancellationError instead of propagating transient errors when a request is aborted, importing CancellationError via an absolute path, and correctly capping the backoff delay at maxDelayMs when jitter is applied.
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.
Summary
Adds automatic retry mechanisms across Connect-RPC unary calls, chunked file upload/download, and legacy polling to handle transient failures (HTTP 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout, and network connection drops).
Key Changes
retry.interceptor.ts):createRetryInterceptorwith exponential backoff and jitter.Code.Unavailableand fetch errors).chunked-uploader.ts):DEFAULT_CHUNK_MAX_RETRIES = 10) with backoff.backend-api.service.ts):getInspectionDataChunkdownloads up to 10 attempts (DEFAULT_CHUNK_MAX_RETRIES = 10) using RxJSretryand exponential backoff.legacy-polling.interceptor.ts):delayWithSignalutility.OpenWorkbenchandFilterTimelinepolling before giving up.Verification
make test-web: All 1,048 tests passed (TOTAL: 1048 SUCCESS).make lint-web: 0 issues.make build-storybook: Succeeded.make build-web: Succeeded.make pre-commit: Succeeded with 0 issues.