Skip to content

Add ttl labels to gke integration tests#5292

Merged
saara-tyagi27 merged 4 commits into
GoogleCloudPlatform:developfrom
saara-tyagi27:add-labels-gke
Mar 10, 2026
Merged

Add ttl labels to gke integration tests#5292
saara-tyagi27 merged 4 commits into
GoogleCloudPlatform:developfrom
saara-tyagi27:add-labels-gke

Conversation

@saara-tyagi27

@saara-tyagi27 saara-tyagi27 commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Add time-to-live labels to gke focused integration tests

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @saara-tyagi27, 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 resource management for GKE integration tests by systematically applying Time-To-Live (TTL) labels to the blueprints used in Cloud Build daily test runs. This ensures that test-provisioned resources are automatically cleaned up after a set duration, preventing orphaned resources and optimizing cloud costs.

Highlights

  • TTL Labeling Integration: Integrated the add_ttl_label.sh script into numerous Cloud Build daily test configurations to automatically apply Time-To-Live (TTL) labels to deployed resources.
  • Expanded Coverage: Extended TTL labeling to a wide range of GKE integration tests, including various GPU configurations (A2, A3, A4, G4, H4D), TPU tests (7x, v6e, v6e-flex), and other GKE-related tests (storage, managed hyperdisk, managed lustre, inactive reservation).
  • Blueprint Modification Step: Added a dedicated step in gcluster-dockerfile.yaml to explicitly modify blueprints with the add_ttl_label.sh script, ensuring the labeling is applied before deployment.
Changelog
  • tools/cloud-build/daily-tests/builds/ansible-vm.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the blueprint.
  • tools/cloud-build/daily-tests/builds/batch-mpi.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/chrome-remote-desktop-ubuntu.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the blueprint.
  • tools/cloud-build/daily-tests/builds/chrome-remote-desktop.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the blueprint.
  • tools/cloud-build/daily-tests/builds/cloud-batch.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the blueprint.
  • tools/cloud-build/daily-tests/builds/e2e.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the blueprint.
    • Updated the gcluster deploy command to use the labeled blueprint.
  • tools/cloud-build/daily-tests/builds/gcluster-dockerfile.yaml
    • Added a new build step to modify the blueprint using add_ttl_label.sh.
  • tools/cloud-build/daily-tests/builds/gke-a2-highgpu-kueue-onspot.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a2-highgpu-kueue.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a3-highgpu-onspot.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a3-highgpu.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a3-megagpu-onspot.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a3-megagpu.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a3-ultragpu-onspot.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a3-ultragpu.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a4-onspot.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a4.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-a4x.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-g4.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-h4d-onspot.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-h4d.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-inactive-reservation.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-managed-hyperdisk.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-managed-lustre.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-storage.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-tpu-7x.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-tpu-v6e-flex.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke-tpu-v6e.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
  • tools/cloud-build/daily-tests/builds/gke.yaml
    • Invoked add_ttl_label.sh to apply TTL labels to the example blueprint.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a time-to-live label to various integration test blueprints to facilitate automatic resource cleanup. The changes are mostly correct, but I've identified a critical bug due to a variable name mismatch in one of the test files and a likely incorrect blueprint path in another. Please address these points to ensure the tests run correctly.

Comment thread tools/cloud-build/daily-tests/builds/gke-managed-hyperdisk.yaml Outdated
Comment thread tools/cloud-build/daily-tests/builds/cloud-batch.yaml Outdated
@saara-tyagi27

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a time-to-live label to various integration test blueprints to automatically clean up resources after a set duration. This is achieved by adding a call to the add_ttl_label.sh script within the Cloud Build configurations. The changes are applied consistently across a large number of test files. My review identifies a minor inconsistency where shell variables are not always quoted. I've added comments with suggestions to quote these variables for improved script robustness and consistency with the other changes in this PR. All comments have been retained as they align with existing practices and do not contradict any provided rules.

Comment thread tools/cloud-build/daily-tests/builds/chrome-remote-desktop.yaml
Comment thread tools/cloud-build/daily-tests/builds/cloud-batch.yaml
@saara-tyagi27 saara-tyagi27 added the release-chore To not include into release notes label Mar 3, 2026
@saara-tyagi27 saara-tyagi27 marked this pull request as ready for review March 9, 2026 06:12
@saara-tyagi27 saara-tyagi27 requested review from a team and samskillman as code owners March 9, 2026 06:12
@saara-tyagi27 saara-tyagi27 requested a review from LAVEEN March 10, 2026 04:56
@saara-tyagi27

Copy link
Copy Markdown
Contributor Author

ml-a4-high-custom blueprint is failing due to deep learning image not found.

@saara-tyagi27 saara-tyagi27 merged commit 7951f79 into GoogleCloudPlatform:develop Mar 10, 2026
47 of 80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-chore To not include into release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants