From fd1c1ca40325e724ca8f5c07921f534303a6a734 Mon Sep 17 00:00:00 2001 From: Aleksander Korzynski <89802643+akorzy-pl@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:58:29 +0100 Subject: [PATCH] Fix bug with skip-current-step (#266) --- .../Rollout/actions/skip-current-step/action.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resource_customizations/argoproj.io/Rollout/actions/skip-current-step/action.lua b/resource_customizations/argoproj.io/Rollout/actions/skip-current-step/action.lua index c55df28539206..0c320e9e26a2e 100644 --- a/resource_customizations/argoproj.io/Rollout/actions/skip-current-step/action.lua +++ b/resource_customizations/argoproj.io/Rollout/actions/skip-current-step/action.lua @@ -1,9 +1,9 @@ if obj.status ~= nil then if obj.spec.strategy.canary ~= nil and obj.spec.strategy.canary.steps ~= nil and obj.status.currentStepIndex < table.getn(obj.spec.strategy.canary.steps) then - obj.status.pauseConditions = nil - obj.spec.pause = false + if obj.status.pauseConditions ~= nil and table.getn(obj.status.pauseConditions) > 0 then + obj.status.pauseConditions = nil + end obj.status.currentStepIndex = obj.status.currentStepIndex + 1 - obj.status.controllerPause = false end end return obj