Repository navigation
feat(mtc): replace Pathways MTC volume substring check with structural PodSpec validation - #6515
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 enhances the reliability and configuration of Multi-Tier Checkpointing (MTC) for GKE jobs. It moves away from fragile string-based manifest checks toward robust structural validation of PodSpecs. Additionally, it streamlines MTC deployment by introducing a dedicated configuration resource in the Cluster Toolkit and improves safety by adding comprehensive pre-submission checks for flag consistency and mount conflicts. 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 refactors and enhances the Multi-Tier Checkpointing (MTC) feature integration for GKE. Key changes include migrating from a legacy Workload Identity annotation model to a direct IAM principal binding, introducing a structured checkpoint_configuration setting in the kubectl-apply module to manage the CheckpointConfiguration CRD, and adding robust pre-flight validations (such as checking DaemonSet readiness, taint/toleration compatibility, and volume mount collisions with built-in Pathways paths). Additionally, the Pathways job template was updated to natively define MTC and colocated sidecar volumes on worker pods, and corresponding documentation, examples, and integration tests were updated. I have no feedback to provide as no review comments were submitted.
d3c311f to
43314f2
Compare
43314f2 to
e899f1a
Compare
shubpal07
left a comment
There was a problem hiding this comment.
LGTM overall! Replacing the substring check with structured PodSpec validation is a much cleaner and safer approach.
Left some inline non-blocking suggestions.
e899f1a to
1041fd0
Compare
…l PodSpec validation
1041fd0 to
15160cc
Compare
34bda12
into
GoogleCloudPlatform:develop
Summary
Replaces the raw substring check (
requirePathwaysMTCVolume) inGeneratePathwaysManifestwith structural KubernetesPodSpecvolume and mount validation (validatePathwaysMTCManifestandvalidatePodSpecVolumes).Problems Addressed
multitier-checkpoint.csi.storage.gke.ioin the renderedpathways_jobset.tmplmanifest passes even if:cacheCSI volume is declared inspec.volumeswithout a matchingvolumeMountsentry at--gke-mtc-ramdisk-diron the worker container (orcolocated-python-sidecarwhen--pathways-colocated-python-sidecar-imageis set), orpathways-head, which runs on CPU nodes and gets stuck inFailedMount.ValidateJobSetManifestonly checkedrestartPolicyonJobSetandJobmanifests: Custom templates with duplicate volume names, duplicate containervolumeMountspaths, orvolumeMountsreferencing undefined volumes passed client-side manifest validation.Changes
pkg/orchestrator/gke/manifest_generator.go:corev1.PodSpecinValidateJobSetManifestand runvalidatePodSpecVolumesacross allJobSetreplicatedJobsandJobdocuments to catch duplicate volume names, undefined volume mounts, and duplicatemountPaths per container.requirePathwaysMTCVolumeinGeneratePathwaysManifestwithvalidatePathwaysMTCManifest(jobSet, opts):pathways-headif it declares amultitier-checkpoint.csi.storage.gke.ioCSI volume.workerreplicatedJobwhosePodSpecdeclares a CSI volume withdriver: multitier-checkpoint.csi.storage.gke.ioand mounts that volume atopts.GKEMTCRamdiskDirectoryinpathways-worker(and incolocated-python-sidecarwhen--pathways-colocated-python-sidecar-imageis set).pkg/orchestrator/gke/manifest_generator_test.go:TestGeneratePathwaysManifest_MTCRejectsStaleCustomTemplateto cover missingworkerreplicatedJob, comment-only driver mention, MTC volume declared onpathways-head, missingvolumeMountsonpathways-worker, mismatchedmountPath, and missingvolumeMountsoncolocated-python-sidecar.TestValidateJobSetManifest_PodSpecVolumescovering duplicate volumes and undefined volume references incontainersandinitContainers, plusTestValidateJobSetManifest_DuplicateMountPathNormalizedandTestValidatePathwaysMTCManifest_CleansMountPathfor normalizedmountPathcomparison.Testing
go test ./pkg/orchestrator/gke/...TestGeneratePathwaysManifest_MTCRejectsStaleCustomTemplateTestValidateJobSetManifest_PodSpecVolumes,TestValidateJobSetManifest_DuplicateMountPathNormalized,TestValidatePathwaysMTCManifest_CleansMountPath