From 69d9d0bd9efa57239cd1b469f5266d971d23d98c Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Wed, 8 Jun 2022 12:08:24 +1000 Subject: [PATCH] backport of #3168 --- services/controllerhandler/src/index.ts | 1 + tests/tests/active-standby/deploy-active-standby.yaml | 2 +- tests/tests/tasks/create-register-and-test-image-task.yaml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/services/controllerhandler/src/index.ts b/services/controllerhandler/src/index.ts index 2430d28595..9d8b0213ad 100644 --- a/services/controllerhandler/src/index.ts +++ b/services/controllerhandler/src/index.ts @@ -241,6 +241,7 @@ const messageConsumer = async function(msg) { // that we get back from the controllers case "kubernetes:route:migrate": switch (meta.jobStatus) { + case "complete": case "succeeded": try { // since the advanceddata contains a base64 encoded value, we have to decode it first diff --git a/tests/tests/active-standby/deploy-active-standby.yaml b/tests/tests/active-standby/deploy-active-standby.yaml index 8e24e0b3e2..a786b83d15 100644 --- a/tests/tests/active-standby/deploy-active-standby.yaml +++ b/tests/tests/active-standby/deploy-active-standby.yaml @@ -23,7 +23,7 @@ body_format: json body: '{ "query": "query($id: Int!) {taskById(id: $id){status}}", "variables": {"id":{{ apiresponse.json.data.switchActiveStandby.id }}}}' register: taskresult - until: taskresult.json.data is defined and (taskresult.json.data.taskById.status == "succeeded" or taskresult.json.data.taskById.status == "failed") + until: taskresult.json.data is defined and (taskresult.json.data.taskById.status == "complete" or taskresult.json.data.taskById.status == "succeeded" or taskresult.json.data.taskById.status == "failed") retries: 20 delay: 10 - name: "{{ testname }} - fail if task fails" diff --git a/tests/tests/tasks/create-register-and-test-image-task.yaml b/tests/tests/tasks/create-register-and-test-image-task.yaml index 0afa52bbca..66870cb6ca 100644 --- a/tests/tests/tasks/create-register-and-test-image-task.yaml +++ b/tests/tests/tasks/create-register-and-test-image-task.yaml @@ -46,6 +46,6 @@ body_format: json body: '{ "query": "query($taskId: Int!) {taskById(id:$taskId){status}}", "variables": {"taskId": {{ invokeRegisteredTaskApiResponse.json.data.invokeRegisteredTask.id }}}}' register: result - until: result.json.data.taskById.status == "succeeded" + until: (result.json.data.taskById.status == "complete" or result.json.data.taskById.status == "succeeded") retries: 90 delay: 20 \ No newline at end of file