From f6ff85283b97b305e390f13f97bb0fa72c93e628 Mon Sep 17 00:00:00 2001 From: Yurii Popivniak Date: Fri, 4 Oct 2024 21:29:31 +0300 Subject: [PATCH] fix: prevent promotion on inconclusive background run Signed-off-by: Yurii Popivniak --- rollout/analysis.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rollout/analysis.go b/rollout/analysis.go index f23f680ce0..5f167c9ca1 100644 --- a/rollout/analysis.go +++ b/rollout/analysis.go @@ -170,7 +170,10 @@ func needsNewAnalysisRun(currentAr *v1alpha1.AnalysisRun, rollout *v1alpha1.Roll // There is an additional check for the BlueGreen Pause because the prepromotion analysis always has the BlueGreen // Pause and that causes controllerPause to be set. The extra check for the BlueGreen Pause ensures that a new Analysis // Run is created only when the previous AnalysisRun is inconclusive - if rollout.Status.ControllerPause && getPauseCondition(rollout, v1alpha1.PauseReasonBlueGreenPause) == nil { + if rollout.Status.ControllerPause && + getPauseCondition(rollout, v1alpha1.PauseReasonCanaryPauseStep) == nil && + getPauseCondition(rollout, v1alpha1.PauseReasonBlueGreenPause) == nil { + return currentAr.Status.Phase == v1alpha1.AnalysisPhaseInconclusive } return rollout.Status.AbortedAt != nil