Skip to content

Add CHS integration to daily tests for A3, A4, and TPU machine types - #6260

Open
simrankaurb wants to merge 12 commits into
GoogleCloudPlatform:developfrom
simrankaurb:add-chs-support
Open

Add CHS integration to daily tests for A3, A4, and TPU machine types#6260
simrankaurb wants to merge 12 commits into
GoogleCloudPlatform:developfrom
simrankaurb:add-chs-support

Conversation

@simrankaurb

@simrankaurb simrankaurb commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

This PR integrates the CHS into the daily integration testing pipeline for several GPU and TPU topologies across both GKE and Slurm environments.

Key Changes:

  • Test Definitions: Added test-validation/test-chs.yml to the post_deploy_tests for A3 Mega, A3 Ultra, A4, A4X, A4X Max, TPU v6e, and TPU v7x daily tests.
  • Targeting Logic:
    • Introduced chs_nodepools string variable for GKE test definitions to ensure CHS runs specifically on GPU/TPU machine pools (using the --nodepools flag).
    • Introduced chs_partitions string variable for Slurm test definitions to correctly target Slurm partitions (using the --partitions flag).
  • CHS Playbook Refactoring: Updated the CHS run command in test-chs.yml to include the -y flag and cleanly handle the conditional targeting logic (target_flag, target_val, chs_target) depending on the scheduler type.
  • Cloud Build Updates: Updated the Cloud Build YAML files for the affected machine types to expose and pass the CHS_REPO secret to the ansible playbooks.

Affected Topologies:

  • A3 Mega: gke-a3-megagpu-onspot, ml-a3-megagpu-onspot-slurm-ubuntu
  • A3 Ultra: gke-a3-ultragpu-onspot, ml-a3-ultragpu-onspot-slurm
  • A4 / A4X: gke-a4-onspot, gke-a4x, gke-a4x-max-bm, ml-a4-highgpu-onspot-slurm, ml-a4x-highgpu-slurm
  • TPU: gke-tpu-7x, gke-tpu-v6e, gke-tpu-v6e-flex

… flex

Add Cluster Health Scanner (CHS) integration to daily tests for machine types:
- A3 Mega: gke-a3-megagpu-onspot, ml-a3-megagpu-onspot-slurm-ubuntu
- A3 Ultra: ml-a3-ultragpu-onspot-jbvms
- A4X / A4X Max: gke-a4x, ml-a4x-highgpu-slurm
- TPU v6e: gke-tpu-v6e-flex

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
…nodepools parameter

- Add -y flag to chs run command in test-chs.yml
- Add support for conditional --nodepools parameter if chs_nodepools is specified
- Add missing scheduler and instance_type variables in daily test configs

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
Specify chs_nodepools in GKE test definitions to ensure CHS runs only on GPU/TPU machine nodepools.

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
…artitions for Slurm

- Simplify chs_nodepools in test-chs.yml to a single string value using --nodepools
- Add chs_partitions string support for Slurm scheduler using --partitions
- Set chs_partitions for Slurm test definitions

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
…st-chs.yml

Extract target_flag, target_val, and chs_target into task vars for improved readability and maintainability.

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
Ensure --partitions is only applied when scheduler == 'slurm'.

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
…tions

Remove instance_type from test definition files as it is no longer required by CHS playbooks.

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 daily integration testing suite by incorporating the Cluster Health Scanner (CHS) for various GPU and TPU topologies. By standardizing the targeting logic and updating the build configurations to handle necessary secrets, the changes ensure that cluster health validation is consistently performed across both GKE and Slurm environments, improving overall test coverage and reliability.

Highlights

  • CHS Integration: Integrated the Cluster Health Scanner (CHS) into the daily integration testing pipeline for A3, A4, and TPU machine types across GKE and Slurm environments.
  • Targeting Logic: Introduced dynamic targeting variables (chs_nodepools for GKE and chs_partitions for Slurm) to ensure CHS runs on the correct infrastructure.
  • Playbook Updates: Refactored the CHS ansible playbook to support conditional execution flags and automated targeting based on the scheduler type.
  • Cloud Build Configuration: Updated multiple Cloud Build YAML files to expose and pass the CHS_REPO secret, enabling secure access for the integration tests.
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 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 .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 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

  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 integrates the Cluster Health Scanner (CHS) into various daily integration tests for GKE and Slurm by adding the CHS_REPO secret, defining scheduler and target variables in test configurations, and running the CHS test suite post-deployment. Feedback from the reviewer highlights potential AnsibleUndefinedVariable errors in test-chs.yml due to missing default filters for the new variables, and warns about premature variable expansion of CHS_REPO in several Cloud Build YAML files if they are generated within unquoted bash heredocs.

Comment thread tools/cloud-build/daily-tests/builds/gke-a3-megagpu-onspot.yaml
Comment thread tools/cloud-build/daily-tests/builds/gke-a4x.yaml
Comment thread tools/cloud-build/daily-tests/builds/ml-a3-ultragpu-onspot-jbvms.yaml Outdated
Comment thread tools/cloud-build/daily-tests/builds/ml-a4x-highgpu-slurm.yaml
…step

Ensure CHS_REPO listed under availableSecrets is explicitly declared in secretEnv array for the generate-job-manifest build step across daily test build configs.

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
CHS does not support jbvms test setups.

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
…aform resource names

Update chs_nodepools in gke-a4x, gke-a4x-max-bm, gke-tpu-v6e, gke-tpu-v6e-flex, and gke-tpu-7x to match exact nodepool names generated by gcluster/terraform.

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
…names

Fix GKE nodepool names in gke-a3-ultragpu-onspot, gke-a4-onspot, gke-a4x, and gke-a4x-max-bm to preserve hyphens from internal_ghpc_module_id as evaluated by Terraform.

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
@simrankaurb simrankaurb added release-chore To not include into release notes test-enhancement Tests enhancement or coverage improvement labels Sep 3, 2026
Comment thread tools/cloud-build/daily-tests/tests/gke-tpu-v6e.yml
Revert CHS configuration from gke-tpu-v6e-flex build and test configs.

TAG=agy
CONV=263b561f-39e1-4d78-b006-3af7fe2ddfc5
@simrankaurb
simrankaurb marked this pull request as ready for review September 4, 2026 07:34
@simrankaurb
simrankaurb requested a review from a team as a code owner September 4, 2026 07:34
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 test-enhancement Tests enhancement or coverage improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants