stackup icon indicating copy to clipboard operation
stackup copied to clipboard

Fails to create change sets when a stack is in the REVIEW_IN_PROGRESS state

Open amcinnes opened this issue 7 years ago • 5 comments

Using stackup 1.2.0

If I do change-set create against a stack that doesn't exist, a stack is created in the REVIEW_IN_PROGRESS state, as expected.

If I then try to create another change set, I get ERROR: no such stack.

I believe this is because stackup uses a change set type of UPDATE when the stack already exists -- but for a stack in the REVIEW_IN_PROGRESS state, it's appropriate to use a change set type of CREATE instead.

amcinnes avatar Nov 06 '17 05:11 amcinnes

(I concede that this isn't a particularly important issue, as it's always safe to delete a REVIEW_IN_PROGRESS stack and try again...)

amcinnes avatar Nov 06 '17 05:11 amcinnes

A related observation:

Normally if I update a stack that's in the ROLLBACK_COMPLETE state, stackup will automatically delete the stack and recreate it.

But if I try to create a change set for a stack that's in the ROLLBACK_COMPLETE state, stackup will say ERROR: Stack:... is in ROLLBACK_COMPLETE state and can not be updated.

I wonder if it would be appropriate to automatically delete a stack in ROLLBACK_COMPLETE (or CREATE_FAILED) before trying to create a change set for it.

amcinnes avatar Nov 06 '17 05:11 amcinnes

@amcinnes The stackup up/down command behaves like an upsert, where as the change sets are a CRUD operation. We can update the documentation to reflect this difference in behaviour. Right now we don't know when we will be supporting an upsert operation on change sets.

mbelekar avatar Nov 09 '17 00:11 mbelekar

Just ran into this one myself - requires manual intervention by someone to delete these dangling stacks - It would be awesome if stackup could cleanup these REVIEW_IN_PROGRESS stacks as part of normal operation.

stevemac007 avatar May 29 '18 23:05 stevemac007

It would make sense to be consistent with the auto-cleanup on stack creation.

mdub avatar May 30 '18 02:05 mdub