test: allow teardown of training and checkpoint daily test buckets - #6216
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the resource cleanup process for GKE integration tests by introducing a configurable Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new variable force_destroy_buckets (defaulting to false) across several GKE blueprints (gke-a3-ultragpu, gke-a4, gke-a4x-max-bm, and gke-a4x) and maps it to the force_destroy property of the training and checkpoint GCS buckets. Additionally, it enables this variable (force_destroy_buckets: true) in the corresponding daily integration tests to ensure proper cleanup of resources. I have no feedback to provide as the changes are correct and follow the repository's best practices.
a2249eb to
bc4d92c
Compare
38fa90f to
c92c4b4
Compare
c92c4b4 to
46dab37
Compare
There was a problem hiding this comment.
Thank you for this fix! Overriding force_destroy: true on the training and checkpoint buckets is a great operational improvement to prevent teardown failures and orphaned resources during daily integration tests.
During an audit of the other daily tests, noticed two other test suites that also deploy blueprints with training_bucket and checkpoint_bucket defaulting to force_destroy: false and could benefit from this same override:
tools/cloud-build/daily-tests/builds/gke-a4x-max-bm.yaml(usesexamples/gke-a4x-max-bm/gke-a4x-max-bm.yaml)tools/cloud-build/daily-tests/builds/gke-tpu-v6e-flex.yaml(usesexamples/gke-consumption-options/dws-flex-start/gke-tpu-v6e/gke-tpu-v6e.yaml)
Could we include these two files in this PR as well? I've also left a small suggestion on using extended regex in sed for spacing resilience.
| sed -i '/reservation/d' \$$EXAMPLE_BP | ||
|
|
||
| # Override force_destroy from false to true for training and checkpoint storage buckets | ||
| sed -i 's/force_destroy: false/force_destroy: true/g' \$$EXAMPLE_BP |
There was a problem hiding this comment.
Using extended regex (-E) with \s* ensures this substitution remains resilient if the example blueprint is formatted or adjusted with different whitespace:
sed -i -E 's/force_destroy:\s*false/force_destroy: true/g' \$$EXAMPLE_BP
This PR enforces force_destroy: true during the creation of the training and checkpoint buckets to streamline resource cleanup across daily integration tests. This ensures the buckets are successfully cleaned up during cluster teardown, regardless of objects stored within.
Submission Checklist
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.