Exit wait_for_stack_does_not_exist if the status is delete failed

The current implementation waits for 10 minutes, regardless of the stack
status. This will exit earlier and fail the workflow, triggering the
error handling in the delete_stack workflow.

Change-Id: I1c38e9c4f1c8e5a7be8a354549ebfdcbd2e822cd
Closes-Bug: #1777074
This commit is contained in:
Dougal Matthews 2018-08-01 14:11:55 +01:00
parent 4b7f886e7f
commit 5399657bdd
1 changed files with 5 additions and 1 deletions

View File

@ -91,10 +91,14 @@ workflows:
input:
queue_name: <% $.queue_name %>
timeout: <% $.timeout %>
publish:
stack_status: <% let(stack => $.stack) -> task().result.stacks.where($.stack_name = $stack).first().stack_status %>
retry:
delay: 15
count: <% $.timeout / 15 %>
continue-on: <% $.stack in task().result.stacks.select([$.stack_name, $.id]).flatten() %>
continue-on: <% $.stack_status = 'DELETE_FAILED' or $.stack in task().result.stacks.select([$.stack_name, $.id]).flatten() %>
on-complete:
fail: <% $.stack_status = 'DELETE_FAILED' %>
delete_stack:
input: