Repository navigation
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 improves the reliability of the dry-run manifest generation process in the GKE orchestrator. By bypassing the job conflict check during dry-run operations, users can now generate manifests locally without being blocked by existing job states on the cluster, aligning the behavior with other existing validation guards. 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 updates the GKE job orchestrator to skip the job conflict validation check during a dry-run (when DryRunManifest is set). Additionally, it introduces unit tests to verify that dry-runs succeed when a job with the same name already exists, whereas normal submissions correctly fail. I have no feedback to provide as the implementation is clean and well-tested.
|
/gcbrun |
64b74d0 to
d820681
Compare
|
/gcbrun |
418d40a
into
GoogleCloudPlatform:develop
Summary
Skip
validateJobConflictsinGKEOrchestrator.SubmitJobwhenjob.DryRunManifest != ""(--dry-run-out).When
gcluster job submit --dry-run-out <path>is invoked, the CLI only renders and saves the Kubernetes JobSet manifest locally and does not submit the workload to the cluster. Previously,SubmitJobstill ranvalidateJobConflicts(job.WorkloadName, ...)before generating the manifest, causing dry-run manifest generation to fail withjob with name '<name>' already exists in state '<state>'whenever a previous or active JobSet with the same name existed on the cluster (for example during post-run inspection or cleanup workflows).All other cluster-state validations and side effects in
SubmitJob(ValidateClusterState,verifyCheckpointConfigurationCR,ensureMTCWorkloadIdentity,RunStorageProfilePreflight,printConsoleLinks, andawaitJobCompletion) already checkjob.DryRunManifest == "". GuardingvalidateJobConflictswithif job.DryRunManifest == ""makes dry-run behavior consistent.Testing
TestSubmitJob_SkipsConflictCheckOnDryRuninpkg/orchestrator/gke/gke_job_orchestrator_test.goverifying that:SubmitJobwithDryRunManifestset succeeds and writes the manifest even when a JobSet with the same name already exists on the cluster.SubmitJobwithoutDryRunManifestcontinues to fail with the job conflict error when a JobSet with the same name already exists.