Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
mimowo committed Jul 26, 2024
1 parent e1917f9 commit f02353d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/webhooks/jobset_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ func (j *jobSetWebhook) ValidateUpdate(ctx context.Context, old, newObj runtime.
// runnable and would not be deleted if we unsuspend the JobSet.
if !ptr.Deref(js.Spec.Suspend, false) {
rStatus := js.Status.ReplicatedJobsStatus
if len(rStatus) > index && (rStatus[index].Active > 0 || rStatus[index].Suspended > 0) {
// Don't allow to mutate PodTemplate on unsuspending if there
// are still active or suspended jobs from the previous run
if len(rStatus) <= index || rStatus[index].Active > 0 || rStatus[index].Suspended > 0 {
munge = false
}
}
Expand Down

0 comments on commit f02353d

Please sign in to comment.