Skip retries in retryOperation for non-retriable storage errors#90971
Draft
elirangoshen wants to merge 2 commits into
Draft
Skip retries in retryOperation for non-retriable storage errors#90971elirangoshen wants to merge 2 commits into
elirangoshen wants to merge 2 commits into
Conversation
…age errors fix Bumps the react-native-onyx dependency to the head SHA of the draft library PR that adds NON_RETRIABLE_ERRORS classification and short-circuits retryOperation for the "Internal error opening backing store" error class (Expensify#90633). Drops the patches/react-native-onyx directory, mirroring the approach used on the parallel 90632 draft branch — the 3.0.71 patch does not apply to 3.0.74, and patch restoration is tracked under the upstream replacement Expensify/react-native-onyx#785. Library PR: Expensify/react-native-onyx#786 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
|
…neration) Tracks the library PR's auto-generated API docs fix. Runtime behavior identical to previous pin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Explanation of Change
Pins
react-native-onyxto the head SHA of the companion library draft PR Expensify/react-native-onyx#786, which adds aNON_RETRIABLE_ERRORSclassification and short-circuitsretryOperationfor storage errors where retrying is provably futile — specificallyUnknownError: Internal error opening backing store for indexedDB.open(the LevelDB backing-store class analyzed in #87862).Today, every non-capacity storage error retries 5× with no delay then silently resolves. For this error class — 884,955 occurrences, ~26% of all storage failures — that produces ~6× the log/Sentry volume of the underlying event rate. The healing path (#90636) is responsible for recovery;
retryOperationshould defer to it, not compete with it.This PR also drops the
patches/react-native-onyx/directory, mirroring the approach used on the parallel 90632 draft branch — the 3.0.71 patch does not apply to 3.0.74, and patch restoration is tracked under the upstream replacement Expensify/react-native-onyx#785.Fixed Issues
$ #90633
PROPOSAL: N/A (Task-labelled issue with explicit solution from #87862 analysis)
Tests
Storage.setItemto reject with the target error:Failed to save to storage. Error: ... retryAttempt: 0/5log (not six).Storage operation skipped retry for non-retriable error. Error: ... onyxMethod: setWithRetry.alert.Storage operation failed after 5 retries...alert.target.setItem = origSet;and confirm normal operation resumes (no further errors).Offline tests
The change is purely a logging short-circuit on an error path that already silently swallows the failure. Offline behavior is unchanged —
Onyx.setcallers still see the same observable outcome (cache absorbs the write; promise resolves), exactly as today. No offline-specific verification needed beyond confirming the App still functions normally with the network disabled.QA Steps
This is a logging-only change with no UI impact, so there are no user-visible behaviors to QA on staging. The production signal will come from VictoriaLogs:
After deploy, query:
Failed to save to storage. Error: ...Internal error opening backing store...— volume should drop by ~5–6×.Query:
Storage operation skipped retry for non-retriable error— should appear at roughly 1× the underlying event rate (was previously hidden behind 6 retries).Verify that no errors appear in the JS console
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari