Commit b7f948b
committed
fix(controller): honor scaleUpPreviewCheckPoint reset on blueGreen pod template change
When a new pod template is rolled out while the previous revision had
already completed prePromotionAnalysis (and thus set
status.blueGreen.scaleUpPreviewCheckPoint=true), the new revision
inherits that value and Argo Rollouts skips creating an AnalysisRun for
it entirely -- including the prePromotionAnalysis gate.
syncRolloutStatusBlueGreen calls resetRolloutStatus(&newStatus) on pod
template change, which clears newStatus.BlueGreen.ScaleUpPreviewCheckPoint.
The subsequent call to calculateScaleUpPreviewCheckPoint read prevValue
from c.rollout.Status (the pre-reset value) rather than the newStatus
parameter that was just reset, immediately clobbering the reset.
Read prevValue from newStatus so the reset applied earlier in the same
reconcile is honored, matching the documented behavior:
// ... gets reset to false when the pod template changes, or the
// rollout fully promotes (stableRS == newRS)
Add a regression test that fails on the old behavior and passes with
the fix.
Signed-off-by: Abizer Lokhandwala <abizer@abizer.me>1 parent 2ccdae8 commit b7f948b
2 files changed
Lines changed: 46 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
330 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
331 | 334 | | |
332 | 335 | | |
333 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
1193 | 1194 | | |
1194 | 1195 | | |
1195 | 1196 | | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1196 | 1237 | | |
1197 | 1238 | | |
1198 | 1239 | | |
| |||
0 commit comments