fix(macrobenchmarks): retry GKE cluster deletion on failure#943
Merged
Conversation
Transient failures (e.g. FAILED_PRECONDITION) can occur during GKE cluster deletion. Retry the deletion up to 20 times with a 30-second delay to ensure resources are cleaned up. TAG=agy CONV=efac437f-9cb0-4057-a8f9-02a4b9bf8b97
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the GKE cluster cleanup script to retry deleting the cluster up to 20 times with a 30-second delay between attempts to handle transient failures. The reviewer pointed out that if the cluster does not exist, this retry loop will cause an unnecessary 10-minute delay, and suggested capturing the command output to break early if a "not found" error is encountered.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #943 +/- ##
=======================================
Coverage 89.68% 89.68%
=======================================
Files 16 16
Lines 3579 3579
=======================================
Hits 3210 3210
Misses 369 369 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
yuxin00j
approved these changes
Jun 30, 2026
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.
Transient failures (e.g. FAILED_PRECONDITION) can occur during GKE cluster deletion. Retry the deletion up to 20 times with a 30-second delay to ensure resources are cleaned up.