Skip to content

Fix the network name#5315

Merged
LAVEEN merged 7 commits into
GoogleCloudPlatform:developfrom
LAVEEN:fixnetworkname
Mar 16, 2026
Merged

Fix the network name#5315
LAVEEN merged 7 commits into
GoogleCloudPlatform:developfrom
LAVEEN:fixnetworkname

Conversation

@LAVEEN

@LAVEEN LAVEEN commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

This PR introduces static network names to be used for all the tests to avoid filestore limit

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, 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 addresses an issue with network naming within the daily test Cloud Build configurations. It introduces a standardized approach to name networks by dynamically applying a 'pr' or 'daily' prefix based on the test type. This ensures consistent and predictable network names across different testing environments, preventing potential conflicts or misconfigurations that could arise from variable network naming.

Highlights

  • Standardized Network Naming: Implemented a consistent network naming convention for daily tests by introducing a NET_PREFIX variable.
  • Dynamic Prefix Application: The NET_PREFIX is dynamically set to 'pr' for pull requests and 'daily' for daily tests, ensuring environment-specific naming.
  • Blueprint Variable Replacement: Modified Cloud Build YAML files to use 'sed' to replace blueprint network name variables with the new prefixed static names.
Changelog
  • tools/cloud-build/daily-tests/builds/h4d-vm.yaml
    • Introduced NET_PREFIX variable to dynamically set network prefix based on _TEST_PREFIX.
    • Modified the blueprint to replace $(vars.base_network_name) with ${NET_PREFIX}-h4d.
  • tools/cloud-build/daily-tests/builds/ml-a3-highgpu-slurm.yaml
    • Introduced NET_PREFIX variable to dynamically set network prefix based on _TEST_PREFIX.
    • Modified the blueprint to replace $(vars.deployment_name)-net-0 with ${NET_PREFIX}-a3high-net-0.
  • tools/cloud-build/daily-tests/builds/ml-a3-megagpu-slurm-ubuntu.yaml
    • Introduced NET_PREFIX variable to dynamically set network prefix based on _TEST_PREFIX.
    • Modified the blueprint to replace $(vars.network_name_system) with ${NET_PREFIX}-a3mega-net-0.
  • tools/cloud-build/daily-tests/builds/ml-a3-ultragpu-slurm.yaml
    • Introduced NET_PREFIX variable to dynamically set network prefix based on _TEST_PREFIX.
    • Modified the blueprint to replace $(vars.base_network_name) with ${NET_PREFIX}-a3ultra.
  • tools/cloud-build/daily-tests/builds/ml-a4-highgpu-slurm.yaml
    • Introduced NET_PREFIX variable to dynamically set network prefix based on _TEST_PREFIX.
    • Modified the blueprint to replace $(vars.base_network_name) with ${NET_PREFIX}-a4high.
Activity
  • No human activity has been recorded on this pull request yet.
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 introduces a command injection vulnerability in several daily test build configurations due to the direct use of the _TEST_PREFIX substitution variable within inline shell script blocks. This allows for arbitrary command execution if _TEST_PREFIX is manipulated. Furthermore, the logic for determining network prefixes and updating blueprints is duplicated across five files. It is recommended to refactor this complex, duplicated logic into a shared script to improve maintainability and address the security vulnerability by properly sanitizing or passing substitution variables as environment variables, as per repository guidelines on inline shell scripts.

Comment thread tools/cloud-build/daily-tests/builds/h4d-vm.yaml Outdated
Comment thread tools/cloud-build/daily-tests/builds/ml-a3-highgpu-slurm.yaml Outdated
Comment thread tools/cloud-build/daily-tests/builds/ml-a3-megagpu-slurm-ubuntu.yaml Outdated
Comment thread tools/cloud-build/daily-tests/builds/ml-a3-ultragpu-slurm.yaml Outdated
Comment thread tools/cloud-build/daily-tests/builds/ml-a4-highgpu-slurm.yaml Outdated
@LAVEEN LAVEEN added the release-chore To not include into release notes label Mar 16, 2026
Comment thread tools/cloud-build/daily-tests/builds/ml-a3-ultragpu-custom-blueprint-test.yaml Outdated
Comment thread tools/cloud-build/daily-tests/builds/ml-a4-highgpu-custom-blueprint-test.yaml Outdated
@LAVEEN LAVEEN requested a review from saara-tyagi27 March 16, 2026 12:26
@LAVEEN

LAVEEN commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator Author

PR-test-gke-tpu-v6e-flex is failing earlier too. This change won't have any affect and doesn't resolve the ongoing issue.

@LAVEEN LAVEEN marked this pull request as ready for review March 16, 2026 14:09
@LAVEEN LAVEEN requested review from a team and samskillman as code owners March 16, 2026 14:09
@LAVEEN LAVEEN enabled auto-merge (squash) March 16, 2026 14:10
@LAVEEN LAVEEN merged commit 8f07f2d into GoogleCloudPlatform:develop Mar 16, 2026
18 of 78 checks passed
Neelabh94 pushed a commit to Neelabh94/cluster-toolkit that referenced this pull request Mar 18, 2026
Co-authored-by: laveen <laveenekka@google.com>
LAVEEN pushed a commit to LAVEEN/cluster-toolkit that referenced this pull request Mar 26, 2026
LAVEEN pushed a commit to LAVEEN/cluster-toolkit that referenced this pull request Mar 26, 2026
- Revert 'Fix the network name (GoogleCloudPlatform#5315)'
- Apply python logic and fixes from GoogleCloudPlatform#5385
- Apply modify_vpc.py across all filestore integration tests
LAVEEN pushed a commit to LAVEEN/cluster-toolkit that referenced this pull request Mar 26, 2026
- Revert 'Fix the network name (GoogleCloudPlatform#5315)'
- Apply python logic and fixes from GoogleCloudPlatform#5385
- Apply modify_vpc.py across all filestore integration tests
@LAVEEN LAVEEN mentioned this pull request Apr 22, 2026
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.

3 participants