Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax validation on ReplicatedJob PodTemplates of suspended JobSets #580

Merged
merged 1 commit into from
May 28, 2024

Conversation

danielvegamyhre
Copy link
Contributor

Fixes #579

I also moved the validateFailurePolicy helper below the main exported ValidateX functions.

cc @alculquicondor @ahg-g

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 24, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danielvegamyhre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 24, 2024
@k8s-ci-robot k8s-ci-robot requested review from ahg-g and kannon92 May 24, 2024 23:19
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 24, 2024
Copy link

netlify bot commented May 24, 2024

Deploy Preview for kubernetes-sigs-jobset canceled.

Name Link
🔨 Latest commit 8bb6782
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-jobset/deploys/665521c3b393e10008885034

if ptr.Deref(oldJS.Spec.Suspend, false) {
for index := range js.Spec.ReplicatedJobs {
mungedSpec.ReplicatedJobs[index].Template.Spec.Template.Spec.NodeSelector = oldJS.Spec.ReplicatedJobs[index].Template.Spec.Template.Spec.NodeSelector
mungedSpec.ReplicatedJobs[index].Template.Spec.Template = oldJS.Spec.ReplicatedJobs[index].Template.Spec.Template
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question for @alculquicondor do Kueue/DWS require the ability to mutate any aspect of a pod template in a suspended JobSet? Or can we make this more targeted?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@danielvegamyhre danielvegamyhre May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I updated the PR to only allow the pod template and pod spec fields in the PodSetUpdate struct to be mutated on JobSet updates.

@danielvegamyhre danielvegamyhre changed the title Relax validation on replicated job pod templates Relax validation on ReplicatedJob PodTemplates of suspended JobSets May 24, 2024
@danielvegamyhre danielvegamyhre added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 25, 2024
@alculquicondor
Copy link

LGTM.
Leaving official one to @kannon92

@ahg-g
Copy link
Contributor

ahg-g commented May 28, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 28, 2024
@k8s-ci-robot k8s-ci-robot merged commit 50290eb into kubernetes-sigs:main May 28, 2024
12 checks passed
k8s-ci-robot added a commit that referenced this pull request May 29, 2024
…-#580-upstream-release-0.5

Automated cherry pick of #580: relax validation on replicated jobs
@danielvegamyhre danielvegamyhre mentioned this pull request Aug 19, 2024
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relax validation rules enforcing immutability of replicated jobs
4 participants