test(drive): retry transient async cleanup contention - #2397
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review. 📝 WalkthroughWalkthroughDrive deletion cleanup now retries recognized transient backend failures with capped exponential backoff. Slide screenshot cleanup delegates drive deletion and verification to the shared helper. ChangesDrive cleanup
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change adds bounded retries for a narrowly defined transient cleanup failure while preserving fatal handling for unrelated errors. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant SlideScreenshotWorkflow
participant DeleteDriveResourceAndVerify
participant CLI
participant DriveAPI
SlideScreenshotWorkflow->>DeleteDriveResourceAndVerify: delete and verify drive resource
DeleteDriveResourceAndVerify->>CLI: execute drive deletion
CLI->>DriveAPI: request drive deletion
DriveAPI-->>CLI: deletion result
CLI-->>DeleteDriveResourceAndVerify: command output
DeleteDriveResourceAndVerify->>CLI: retry transient failure with capped backoff
DeleteDriveResourceAndVerify-->>SlideScreenshotWorkflow: cleanup result
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
Stabilize Drive-backed E2E cleanup when concurrent deletes under the same folder make an asynchronous delete task report
server_error: drive task failed.Changes
drive.DeleteDriveResourceAndVerifyso Slides, Docs, Sheets, Base, Wiki, and Drive cleanups share one policy.api/server_error/drive task failedenvelope, with five attempts and 2s/4s/8s/8s bounded backoff.Impact
CLI behavior is unchanged. Live E2E teardown becomes more resilient to the backend's same-folder delete lock while preserving bounded failure behavior.
Root Cause
Live E2E jobs and Go packages run concurrently against the same test bot. Drive serializes deletes within a folder, so overlapping cleanup tasks can collide and one async task may terminate with
drive task failed.Test Plan
gofmtgit diff --checkgo vet ./tests/cli_e2e/drive ./tests/cli_e2e/slidesTestSlidesScreenshotAliasesLiveE2Ein Docker with the fixed E2E app credentials: presentation creation and shared-helper cleanup succeeded; screenshot execution is blocked because that app lacksslides:presentation:screenshotRelated Issues
codex/tofix/; GitHub automatically closed the cross-fork PR during the branch rename.Summary by CodeRabbit