Skip to content

feat(job): Enable MTC at job submission stage#5997

Open
Neelabh94 wants to merge 8 commits into
GoogleCloudPlatform:developfrom
Neelabh94:enable_mtc
Open

feat(job): Enable MTC at job submission stage#5997
Neelabh94 wants to merge 8 commits into
GoogleCloudPlatform:developfrom
Neelabh94:enable_mtc

Conversation

@Neelabh94

@Neelabh94 Neelabh94 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This PR introduces support for Multi-Tier Checkpointing (MTC) at the job submission level and makes MTC flags globally available for all job types, rather than being restricted to Pathways workloads.

Key Changes

  • Global MTC Flags: Promoted --mtc-enabled and --mtc-ramdisk-directory to global job submission flags in submit.go, making MTC available for standard workloads.
  • Cluster Addon Validation: Added a pre-submission check in gke_job_orchestrator.go that queries the target GKE cluster to ensure the HighScaleCheckpointing add-on is enabled. Job submission will safely abort with a helpful error message if the user requests MTC on an unsupported cluster.
  • Dynamic Volume Injection: Centralized MTC CSI volume and mount configuration into storage.go. This removes the need for hardcoded MTC volume blocks in the raw Go templates.
  • Template Cleanup: Removed redundant MTC csi volume and mount definitions from pathways_jobset.tmpl to prevent duplicate volume mounting.

Testing

  • Passed all unit tests.
  • Successfully verified MTC job submission (gcluster job submit) and manifest generation on a live GKE cluster with the HighScaleCheckpointing addon enabled.

@Neelabh94 Neelabh94 self-assigned this Jul 22, 2026
@Neelabh94 Neelabh94 added the release-key-new-features Added to release notes under the "Key New Features" heading. label Jul 22, 2026
@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 enables Multi-Tier Checkpointing (MTC) at the general job submission stage, moving it out of the Pathways-specific configuration. It introduces necessary CLI flags, adds cluster-level validation to ensure the GKE environment supports MTC, and updates the manifest generation logic to correctly provision required volumes and shared memory resources.

Highlights

  • MTC Flag Refactoring: Moved Multi-Tier Checkpointing (MTC) configuration flags from Pathways-specific settings to general job submission flags, allowing broader usage.
  • Cluster Validation: Added a validation check to ensure MTC is enabled on the target GKE cluster via Stateful HA configuration before job submission.
  • Storage Orchestration: Updated storage orchestration to dynamically mount MTC cache volumes and sidecar shared memory when MTC is enabled.
  • Documentation: Updated documentation to include MTC prerequisites and usage instructions for cluster administrators and job submitters.
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 refactors Multi-Tier Checkpointing (MTC) support by promoting the CLI flags and configuration from Pathways-specific parameters to global job parameters (--mtc-enabled and --mtc-ramdisk-directory). This allows standard workloads to also leverage MTC. Feedback on the changes highlights two key issues: first, submitting a standard job with MTC enabled but without specifying a ramdisk directory results in an empty, invalid mountPath in the generated Kubernetes manifest, which needs a default fallback; second, the new global flag variables are not reset in resetSubmitCmdFlags(), which could lead to test pollution and flaky tests.

Comment thread pkg/orchestrator/gke/storage.go Outdated
Comment thread cmd/job/submit_test.go Outdated
@Neelabh94
Neelabh94 force-pushed the enable_mtc branch 2 times, most recently from 1081c1c to 842a381 Compare July 23, 2026 11:08
@Neelabh94
Neelabh94 force-pushed the enable_mtc branch 2 times, most recently from 047483f to 27ee6a6 Compare July 23, 2026 11:20
@Neelabh94

Copy link
Copy Markdown
Contributor 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 refactors Multi-Tier Checkpointing (MTC) support by promoting MTC flags (--mtc-enabled and --mtc-ramdisk-directory) from Pathways-specific configurations to global job submission flags. It updates the CLI, tests, documentation, and manifest generation logic to support this change, and introduces a validation check to ensure the HighScaleCheckpointing addon is enabled on the target GKE cluster when MTC is requested. Feedback suggests updating an error message in gke_job_orchestrator.go that still references the deprecated --pathways-mtc-enabled flag.

Comment thread pkg/orchestrator/gke/gke_job_orchestrator.go Outdated
MTC volumes are dynamically generated by storage.go and injected into VolumeMountsYAML and VolumesYAML for both pathways and non-pathways jobs. The sidecar initContainer still uses hardcoded mounts as it intentionally bypasses the global VolumeMountsYAML block.
@Neelabh94
Neelabh94 marked this pull request as ready for review July 23, 2026 11:41
@Neelabh94
Neelabh94 requested a review from a team as a code owner July 23, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-key-new-features Added to release notes under the "Key New Features" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants