Repository navigation
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
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.
Closes #4875
If a Google Drive token refresh could not claim the persisted refresh lease and no fresh cached token appeared (for instance after an integration row was removed),
refreshGoogleDriveAccessTokenrecursed indefinitely after every lease wait instead of failing.Bound the lease retry to one follow-up claim attempt after waiting out a peer's lease, failing with
Storage.StorageErrorif the lease still cannot be acquired and no cached token was stored. A normal peer lease expiry still succeeds on the second attempt.Before / After
claimRefreshLeasealways returnsfalseand cache stays empty across 125s (TestClock)Storage.StorageErrorafter 2 lease claim attemptsfresh-token)Verification
bun run --cwd apps/web vitest run __tests__/unit/google-drive-storage.test.ts(90/90 passed, including both lease retry tests)bun run biome check packages/web-backend/src/Storage/GoogleDrive.ts apps/web/__tests__/unit/google-drive-storage.test.tsnode scripts/test-lint/run.mjsConfidence Score: 5/5

The PR appears safe to merge.Summary
Bounds Google Drive token refresh to two lease claims instead of retrying forever.
Reviews (1) · Last reviewed commit: "fix(storage): bound Google Drive token r..." · Reviewed by Greptile