Skip to content

Commit

Permalink
fix: prevent promotion on inconclusive background run
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Popivniak <[email protected]>
  • Loading branch information
ypopivniak-cg committed Oct 7, 2024
1 parent ec03c7e commit 6070c29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rollout/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6070c29

Please sign in to comment.