We’re using serverless for our CI process, and a common issue we have is that if we push 2 commits to close to each other, the second one fails due to:
Stack:arn:aws:cloudformation:**** is in UPDATE_IN_PROGRESS state and can not be updated.
This is especially bad because it can happen if two people merged into a master right after another.
The workaround we do is to wait a little and then rerun the CI manually.
What I’d like is for sls deploy not to happen until the stack is ready to be overwritten. This seems like something that should be bundled.
Is there an easy way to do it?
Alternatively, is there a way to poll the stack state programmatically so I can wait before calling sls deploy?