mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Merge pull request #103868 from qingsenLi/210723-forget
Merge conditional assignment into variable declaration
This commit is contained in:
commit
8e37a3b324
@ -800,14 +800,11 @@ func (jm *Controller) syncJob(key string) (forget bool, rErr error) {
|
||||
}
|
||||
}
|
||||
|
||||
forget = false
|
||||
// Check if the number of jobs succeeded increased since the last check. If yes "forget" should be true
|
||||
// This logic is linked to the issue: https://github.com/kubernetes/kubernetes/issues/56853 that aims to
|
||||
// improve the Job backoff policy when parallelism > 1 and few Jobs failed but others succeed.
|
||||
// In this case, we should clear the backoff delay.
|
||||
if job.Status.Succeeded < succeeded {
|
||||
forget = true
|
||||
}
|
||||
forget = job.Status.Succeeded < succeeded
|
||||
|
||||
if uncounted != nil {
|
||||
needsStatusUpdate := suspendCondChanged || active != job.Status.Active || !equalReady(ready, job.Status.Ready)
|
||||
|
Loading…
Reference in New Issue
Block a user