Skip to content

[DO NOT MERGE] Continuous Review: develop -> main - #6644

Draft
ctk-pr-bot wants to merge 38 commits into
mainfrom
develop
Draft

ctk-pr-bot wants to merge 38 commits into
mainfrom
develop

Conversation

@ctk-pr-bot

Copy link
Copy Markdown
Collaborator

🤖 Continuous Review Tracking PR

This is an automated dummy PR from develop into main created by ReleaseRobo.
It collects ongoing commits to develop so that daily /gemini review runs can surface code review issues ahead of release cut.

⚠️ DO NOT MERGE this pull request.

scott-nag and others added 30 commits October 30, 2026 18:05
…ions (#6604)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…6602)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…Gemma vLLM benchmark (#6427)

Co-authored-by: agrawalkhushi18 <agrawalkhushi@google.com>
Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
…template module (#6399)

Co-authored-by: AdarshK15 <adarshkullachi@google.com>
…benchmarks (#6625)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…h4d-hpc-benchmarks (#6623)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…nchmarks (#6624)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…tory with 15 updates (#6613)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/front-end/ofe with 45 updates (#6607)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…fe (#6608)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@ctk-pr-bot

Copy link
Copy Markdown
Collaborator Author

/gemini review

@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 is an automated tracking PR designed to facilitate continuous code review by aggregating changes from develop into main. It also includes significant infrastructure improvements, such as enhanced GKE template management, new telemetry capabilities for coding agent environments, and the addition of a new agentgateway-gke blueprint.

Highlights

  • Continuous Review Tracking: This PR automates the collection of ongoing commits from develop to main to facilitate daily /gemini review runs.
  • Testing Infrastructure: Added test-agentgateway and agentgateway-static to the Makefile, along with new unit tests for GKE template extraction and inspection.
  • GKE Template Management: Refactored GKE template handling to pkg/orchestrator/k8s, added long descriptions to gke-template-extract, and improved template loading logic.
  • Telemetry Enhancements: Added telemetry attribution for coding agent environments and fallback telemetry initialization on command errors.
  • New Blueprint: Added agentgateway-gke blueprint for deploying a private generative AI gateway on GKE.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/cloud-docs-drift.yml
    • .github/workflows/label-external.yml
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 introduces several new community examples and modules, including a private generative AI gateway on GKE, GKE inference benchmarks for DiffusionGemma, browser-based remote desktops for Slurm clusters, and an IAM module for Gemini prediction access. It also optimizes Slurm controller performance for large nodeset configurations, improves GKE CPU limit calculations, and adds automatic image pull secret discovery. Feedback on the changes highlights a critical bug in IsValueSet regarding boolean/numeric evaluation, a MySQL syntax error in the Slurm event table modification, a regex validation issue in the prediction IAM module, a least-privilege violation in GCS bucket permissions, and opportunities to simplify blueprint dependencies using use blocks.

Comment thread pkg/config/expand.go
Comment on lines +324 to +327
return isExpr || len(IsProductOfModuleUse(val)) > 0
}
val, _ = val.Unmark()
switch val.Type() {

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.

high

In IsValueSet, boolean and numeric values are incorrectly evaluated. Currently, cty.False returns false (meaning it is treated as unset), and 0 or negative numbers also return false. However, false and 0 are valid explicitly set values (e.g., enable_public_ips: false or threads_per_core: 0). Any known, non-null boolean or numeric value should be considered set.

	case cty.Number, cty.Bool:
		return true

"select data_type from information_schema.columns where table_schema='slurm_acct_db'"
f" and table_name='{table}' and column_name='cluster_nodes'"
)
alter = f"alter table `{table}` modify `cluster_nodes` mediumtext not null default ''"

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.

high

In MySQL, BLOB and TEXT (including MEDIUMTEXT) columns cannot have a default value in many versions (e.g., MySQL 5.7 and earlier, or MySQL 8.0 without expression defaults). Specifying default '' will raise a BLOB/TEXT column 'cluster_nodes' can't have a default value error. Since Slurm's original schema defines cluster_nodes without a default value, you should remove default '' to ensure compatibility across all MySQL and MariaDB versions.

Suggested change
alter = f"alter table `{table}` modify `cluster_nodes` mediumtext not null default ''"
alter = f"alter table `{table}` modify `cluster_nodes` mediumtext not null"

Comment on lines +110 to +116
- id: cluster
source: modules/scheduler/gke-cluster
use: [network]
settings:
version_prefix: $(vars.gke_version_prefix)
release_channel: REGULAR
service_account_email: $(node_sa.service_account_email)

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.

medium

According to the Repository Style Guide (Blueprint Authoring), the use block is preferred for module dependencies within blueprints. Explicit variable linking (e.g., service_account_email = $(node_sa.service_account_email)) should only be used when necessary to resolve ambiguity. Since node_sa outputs service_account_email and gke-cluster accepts it as an input, you can add node_sa to the use list and omit the explicit setting.

  - id: cluster
    source: modules/scheduler/gke-cluster
    use: [network, node_sa]
    settings:
      version_prefix: $(vars.gke_version_prefix)
      release_channel: REGULAR
References
  1. Ensure the use block is preferred for module dependencies within blueprints. Explicit variable linking (e.g., setting = $(module.output)) should only be used when necessary to resolve ambiguity. (link)
  2. In the Cluster Toolkit framework, leverage automatic variable wiring by matching output names from a dependency module (defined in 'use') with top-level variable names in the consuming module to avoid redundant manual wiring.

Comment on lines +98 to +103
- id: proxy_wi
source: modules/project/workload_identity_binding
settings:
service_account_email: $(proxy_sa.service_account_email)
namespace: $(vars.namespace)
k8s_service_account_name: agentgateway-proxy

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.

medium

According to the Repository Style Guide (Blueprint Authoring), the use block is preferred for module dependencies within blueprints. Explicit variable linking (e.g., service_account_email = $(proxy_sa.service_account_email)) should only be used when necessary to resolve ambiguity. Since proxy_sa outputs service_account_email and workload_identity_binding accepts it as an input, you can add proxy_sa to the use list and omit the explicit setting.

  - id: proxy_wi
    source: modules/project/workload_identity_binding
    use: [proxy_sa]
    settings:
      namespace: $(vars.namespace)
      k8s_service_account_name: agentgateway-proxy
References
  1. Ensure the use block is preferred for module dependencies within blueprints. Explicit variable linking (e.g., setting = $(module.output)) should only be used when necessary to resolve ambiguity. (link)
  2. In the Cluster Toolkit framework, leverage automatic variable wiring by matching output names from a dependency module (defined in 'use') with top-level variable names in the consuming module to avoid redundant manual wiring.

Comment on lines +105 to +108
- id: vertex_permissions
source: community/modules/project/aiplatform-predict-iam
settings:
service_account_email: $(proxy_sa.service_account_email)

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.

medium

According to the Repository Style Guide (Blueprint Authoring), the use block is preferred for module dependencies within blueprints. Explicit variable linking (e.g., service_account_email = $(proxy_sa.service_account_email)) should only be used when necessary to resolve ambiguity. Since proxy_sa outputs service_account_email and aiplatform-predict-iam accepts it as an input, you can add proxy_sa to the use list and omit the explicit setting and settings block entirely.

  - id: vertex_permissions
    source: community/modules/project/aiplatform-predict-iam
    use: [proxy_sa]
References
  1. Ensure the use block is preferred for module dependencies within blueprints. Explicit variable linking (e.g., setting = $(module.output)) should only be used when necessary to resolve ambiguity. (link)
  2. In the Cluster Toolkit framework, leverage automatic variable wiring by matching output names from a dependency module (defined in 'use') with top-level variable names in the consuming module to avoid redundant manual wiring.

Comment on lines +21 to +25
variable "deployment_name" {
validation {
condition = can(regex("^[a-zA-Z0-9_.-]{1,56}$", var.deployment_name))
error_message = "deployment_name must contain 1–56 letters, digits, underscores, periods or hyphens; the generated role ID adds _predict and replaces hyphens with underscores."
}

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.

medium

The validation regex ^[a-zA-Z0-9_.-]{1,56}$ allows deployment_name to start with a hyphen - or period .. However, the generated role ID replaces hyphens with underscores, which would result in a role ID starting with _ or .. GCP custom role IDs must start with an alphanumeric character. Tighten the regex to ensure the first character is alphanumeric.

  validation {
    condition     = can(regex("^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,55}$", var.deployment_name))
    error_message = "deployment_name must start with a letter or digit and contain 1–56 letters, digits, underscores, periods or hyphens; the generated role ID adds _predict and replaces hyphens with underscores."
  }

- monitoring.viewer
- stackdriver.resourceMetadata.writer
- storage.objectAdmin
- storage.bucketViewer

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.

security-medium medium

According to the general rules, you should use storage.objectUser (Storage Object User) instead of storage.objectAdmin to grant read/write permissions on Cloud Storage buckets in order to follow the principle of least privilege.

      - storage.objectUser
References
  1. Use the predefined role roles/storage.objectUser (Storage Object User) instead of roles/storage.objectAdmin to grant read/write permissions on Cloud Storage buckets in order to follow the principle of least privilege.

@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 several new features and modules, including the agentgateway-gke blueprint for deploying a private generative AI gateway on GKE, a catalog of GKE inference benchmarks (starting with g4-diffusiongemma-26b-a4b), and remote desktop examples using novnc-runtime and novnc-desktop modules. It also adds the aiplatform-predict-iam module, optimizes Slurm controller performance for large clusters, implements ai_assisted telemetry tracking, and upgrades various Go and Python dependencies. The review feedback correctly identifies a validation regex bug in the aiplatform-predict-iam module that incorrectly allows periods in custom role IDs, and a potential bash syntax error in the batch-submit.sh.tftpl template when gcloud is missing. Both comments provide actionable code suggestions to resolve these issues.

Comment on lines +23 to +24
condition = can(regex("^[a-zA-Z0-9_.-]{1,56}$", var.deployment_name))
error_message = "deployment_name must contain 1–56 letters, digits, underscores, periods or hyphens; the generated role ID adds _predict and replaces hyphens with underscores."

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.

high

The validation regex for deployment_name allows periods (.), but GCP custom role IDs do not support periods (only alphanumeric characters and underscores are allowed, and hyphens are replaced with underscores in main.tf). If a user provides a deployment_name with a period, the custom role creation will fail at runtime. We should restrict the allowed characters to alphanumeric, underscores, and hyphens.

    condition     = can(regex("^[a-zA-Z0-9_-]{1,56}$", var.deployment_name))
    error_message = "deployment_name must contain 1–56 letters, digits, underscores, or hyphens; the generated role ID adds _predict and replaces hyphens with underscores."
References
  1. When defining resource identifiers in Terraform (such as custom IAM role IDs), use variables known at plan time (e.g., deployment name or name prefix) rather than computed attributes to ensure a clean plan.

Comment on lines 4 to +5
GCLOUD_MAJOR_VERSION=$(gcloud --version | head -n 1 | awk '{print $NF}' | cut -f1 --delimiter=.)
if [ $((GCLOUD_MAJOR_VERSION >= 461)) ]; then
gcloud batch jobs submit ${submit_job_id} --project=${project} --location=${location} --config=${config}
if (( GCLOUD_MAJOR_VERSION >= 461 )); then

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.

medium

If gcloud is not installed or fails to run, GCLOUD_MAJOR_VERSION will be empty, which causes a bash syntax error in the arithmetic evaluation (( GCLOUD_MAJOR_VERSION >= 461 )). We should redirect stderr to /dev/null and default GCLOUD_MAJOR_VERSION to 0 if it is empty to prevent the script from crashing with a syntax error.

Suggested change
GCLOUD_MAJOR_VERSION=$(gcloud --version | head -n 1 | awk '{print $NF}' | cut -f1 --delimiter=.)
if [ $((GCLOUD_MAJOR_VERSION >= 461)) ]; then
gcloud batch jobs submit ${submit_job_id} --project=${project} --location=${location} --config=${config}
if (( GCLOUD_MAJOR_VERSION >= 461 )); then
GCLOUD_MAJOR_VERSION=$(gcloud --version 2>/dev/null | head -n 1 | awk '{print $NF}' | cut -f1 --delimiter=.)
GCLOUD_MAJOR_VERSION=$${GCLOUD_MAJOR_VERSION:-0}
if (( GCLOUD_MAJOR_VERSION >= 461 )); then

Neelabh94 and others added 4 commits November 6, 2026 14:36
…#6315)

Add a pre-flight check (wait_for_controller_nfs) on client nodes so they wait for the controller's NFS shares to be actively exported before mounting:
- Verify Exports Are Ready: Checks that port 2049 is open and confirms via showmount -e (when port 111 is reachable) that the required shares or their parent directories (for subdirectory mounts) are exported.
- Avoid DNS Boot Delays: Identifies controller mounts on client nodes using fast string checks (controller_mount_server_ip, control_host, control_addr) and a single non-retrying lookup, avoiding the 8.5-minute util.host_lookup() retry delay on external NFS servers.
- Safe Timeout Fallback: Scales the wait timeout with controller_startup_scripts_timeout (minimum 600s) and uses jittered polling. If the wait times out, logs a warning and falls back to the standard mount_fstab() retry loop so slow controller startups never fail client setup.
- Unit Tests: Added unit tests in test_setup_network_storage.py covering export checks, subdirectory mounts, port 111 fallback, DNS fast-paths, and timeout fallback.
@ctk-pr-bot

Copy link
Copy Markdown
Collaborator 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 several major features, including a private generative AI gateway on GKE (agentgateway-gke), GKE LLM inference benchmarks starting with DiffusionGemma 26B-A4B, and browser-based remote desktop modules for Slurm. It also optimizes the Slurm controller for large-scale nodesets, improves config fetching performance, and enhances GKE job submissions with ML Diagnostics sidecar injection and Shared Pathways Service (SPS) workload execution. Valuable feedback from the review highlights a missing shutil import in setup_network_storage.py, a potential index out of bounds error in the remote desktop outputs when instance_count is zero, and a regex validation gap for GCP role IDs. Additionally, suggestions were made to use idiomatic Go flag checks in submit.go and to correct a numeric sign check in expand.go to support negative values.

Comment on lines +18 to 26
from typing import Iterable, List, Optional, Set, Union

import os
import posixpath
import random
import socket
import sys
import stat
import time

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.

critical

The shutil module is used in _check_nfs_exports_showmount (via shutil.which) but is not imported in this file, which will cause a NameError at runtime. Please add import shutil to the imports.

Suggested change
from typing import Iterable, List, Optional, Set, Union
import os
import posixpath
import random
import socket
import sys
import stat
import time
from typing import Iterable, List, Optional, Set, Union
import os
import posixpath
import random
import shutil
import socket
import sys
import stat
import time

Comment thread cmd/job/submit.go
}
if pathways.RunSPSWorkload != "" && cmd != nil {
for _, name := range unsupportedRunSPSWorkloadFlags {
if f := cmd.Flags().Lookup(name); f != nil && f.Changed {

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.

medium

According to the general rules, you should use pflag.FlagSet.Changed(name) directly to check if a flag was explicitly set by the user, rather than calling Lookup(name).Changed. This is cleaner and more idiomatic.

Suggested change
if f := cmd.Flags().Lookup(name); f != nil && f.Changed {
if cmd.Flags().Changed(name) {
References
  1. Use pflag.FlagSet.Changed(name) to check if a flag was explicitly set by the user when using the github.com/spf13/pflag package in Go, as it is a valid method and does not require calling Lookup(name).Changed.


variable "deployment_name" {
validation {
condition = can(regex("^[a-zA-Z0-9_.-]{1,56}$", var.deployment_name))

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.

medium

The current regex allows var.deployment_name to start with non-alphanumeric characters (like _ or .). Since the generated role_id is derived from var.deployment_name, this can result in a custom role ID starting with a non-alphanumeric character, which is invalid in GCP and will cause a deployment failure. Update the regex to ensure it starts with an alphanumeric character.

    condition     = can(regex("^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,55}$", var.deployment_name))

output "iap_tunnel_command" {
description = "SSH command that forwards localhost:6080 to the desktop broker through IAP. Run it, then browse to http://localhost:6080/vnc.html."
value = var.instance_count > 0 ? join(" ", [
"gcloud", "compute", "ssh",

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.

medium

If var.instance_count is set to 0, module.instances.name will be an empty list, and accessing module.instances.name[0] will cause a plan-time index out of bounds error in Terraform. Use try to safely handle the empty list case.

    try(module.instances.name[0], ""),

Comment thread pkg/config/expand.go
case cty.String:
return val.AsString() != ""
case cty.Number:
return val.AsBigFloat().Sign() > 0

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.

medium

The current check Sign() > 0 only returns true for positive numbers, meaning negative numbers (which are valid non-zero values) will be incorrectly treated as unset. Use Sign() != 0 to correctly identify all non-zero numbers as set.

Suggested change
return val.AsBigFloat().Sign() > 0
return val.AsBigFloat().Sign() != 0
References
  1. Follow standard Go idioms and best practices. (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge do-not-merge Block merging of this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.