test(drive): retry transient async cleanup contention - #2396
Closed
yxzhaao wants to merge 3 commits into
Closed
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe shared drive cleanup helper now retries recognized transient deletion-task failures with bounded exponential backoff. The slides screenshot workflow uses this helper for presentation cleanup and retains failure reporting. ChangesDrive cleanup behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant SlidesScreenshotWorkflow
participant DeleteDriveResourceAndVerify
participant CLI
participant API
SlidesScreenshotWorkflow->>DeleteDriveResourceAndVerify: delete presentation drive resource
DeleteDriveResourceAndVerify->>CLI: run drive deletion
CLI->>API: execute deletion task
API-->>CLI: return deletion result
DeleteDriveResourceAndVerify->>DeleteDriveResourceAndVerify: retry recognized transient failures
DeleteDriveResourceAndVerify-->>SlidesScreenshotWorkflow: return cleanup result and error
Suggested reviewers: ✨ 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 |
yxzhaao
marked this pull request as ready for review
August 18, 2026 15:36
5 tasks
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
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/slidesRelated Issues
Summary by CodeRabbit