Updating from Rocky8 plain images to Rocky9#5736
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 focuses on modernizing the infrastructure by upgrading base OS images to Rocky 9 and transitioning Slurm authentication to the more secure Native Authentication standard. It also significantly expands the toolkit's capabilities by adding several new infrastructure modules and improving GKE management, telemetry reliability, and TPU topology handling. 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 Slurm Native Authentication as the new secure standard (deprecating MUNGE), integrates Google Cloud ML Diagnostics into GKE TPU blueprints, adds several new modules (including Cloud Run, Redis, and IAP Policy), and enhances GKE Cluster Autoscaling and job submission. The review identified several critical improvements to prevent runtime errors and security vulnerabilities: adding a guard against empty values in GKE node affinity match expressions, verifying that autoscaling limits are iterable to avoid panics, using safe dictionary access in mig_flex.py to prevent KeyError, wrapping shell variables in double quotes in helm-upgrade to prevent command injection, and guarding against division-by-zero when calculating cores per socket in util.py.
I am having trouble creating individual review comments. Click here to see my feedback.
pkg/orchestrator/gke/scheduling.go (111-118)
If values is empty (e.g., when isTopologyMerge is false and v is empty), appending it to MatchExpressions with NodeSelectorOpIn will generate an invalid Kubernetes manifest that will be rejected by the API server. Add a guard to skip appending if values is empty.
if len(values) == 0 {
continue
}
term.MatchExpressions = append(
term.MatchExpressions,
corev1.NodeSelectorRequirement{
Key: k,
Operator: corev1.NodeSelectorOpIn,
Values: values,
},
)pkg/config/autoscaling.go (92-94)
To prevent potential panics when parsing invalid or malformed user configurations, ensure that limitsVal is verified to be an iterable type (list, set, or tuple) before returning it for element iteration.
if !ok || limitsVal.IsNull() || !limitsVal.IsKnown() || (!limitsVal.Type().IsListType() && !limitsVal.Type().IsSetType() && !limitsVal.Type().IsTupleType()) {
return nil, cty.Value{}, false, nil
}
community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/mig_flex.py (223)
If mig_list does not contain the "items" key (e.g., when no MIGs are found), accessing mig_list["items"] directly will raise a KeyError. Use .get("items", []) to handle this case safely.
for mig in mig_list.get("items", []):
community/modules/management/helm-upgrade/main.tf (36)
To adhere to the repository's security guidelines and prevent potential command injection or shell metacharacter splitting, always wrap variables and interpolated strings in double quotes instead of single quotes when executing shell commands via local-exec.
${join(" ", [for v in var.set_values : "--set \"${v.name}=${v.value}\""])}
community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/util.py (2078)
To enforce defensive programming and prevent potential division-by-zero errors when calculating cores_per_socket, ensure that threads_per_core is guaranteed to be at least 1.
threads_per_core = max(1, getThreadsPerCore(template))
a9d48cd
into
GoogleCloudPlatform:develop
This PR upgrades the default Rocky Linux image versions from Rocky 8 to Rocky 9 for several blueprints align with the latest supported OS versions and take advantage of modern image families.
Submission Checklist
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.