mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +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
|
// 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
|
// 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.
|
// improve the Job backoff policy when parallelism > 1 and few Jobs failed but others succeed.
|
||||||
// In this case, we should clear the backoff delay.
|
// In this case, we should clear the backoff delay.
|
||||||
if job.Status.Succeeded < succeeded {
|
forget = job.Status.Succeeded < succeeded
|
||||||
forget = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if uncounted != nil {
|
if uncounted != nil {
|
||||||
needsStatusUpdate := suspendCondChanged || active != job.Status.Active || !equalReady(ready, job.Status.Ready)
|
needsStatusUpdate := suspendCondChanged || active != job.Status.Active || !equalReady(ready, job.Status.Ready)
|
||||||
|
Loading…
Reference in New Issue
Block a user