Commit a26ff21
committed
fix: respect cleanPodPolicy when job exceeds backoffLimit
Move UpdateJobConditions(JobFailed) before DeletePodsAndServices in
the jobExceedsLimit block so that IsFinished() returns true and the
cleanPodPolicy: None guard is not bypassed.
Previously, DeletePodsAndServices was called before the JobFailed
condition was set, causing all pods to be unconditionally deleted
regardless of cleanPodPolicy when a job exceeded its backoffLimit.
Tested on live cluster: pods now preserved after backoffLimit failure
with cleanPodPolicy: None.
Fixes: #3419
Signed-off-by: Aviad Hayumi <aviad.hayumi@run.ai>1 parent 9121e6a commit a26ff21
2 files changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
225 | 229 | | |
226 | 230 | | |
227 | 231 | | |
| |||
240 | 244 | | |
241 | 245 | | |
242 | 246 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| |||
0 commit comments