unbounce / iidy

iidy (Is it done yet?) -- CloudFormation with Confidence
MIT License
52 stars 7 forks source link

Waits for terminal stack status when summarizing #284

Closed Kazzer closed 5 months ago

Kazzer commented 5 months ago

For some reason, we are getting non-terminal statuses when summarizing. It's possible this is a timing issue, so we'll naïvely attempt to get the stack description again until we receive a response with a terminal status.

By the time we make this call, we already know that we'll be in a terminal status because the watcher will only stop once we've seen a terminal status. This is why the logging will always have something like:

09:46:01 GMT-07:00   Thu Jun 20 2024 16:45:57 UPDATE_COMPLETE                              AWS::IAM::Role                           
09:46:01 GMT-07:00                                                                            CloudwatchLogRole (17s)
09:46:01 GMT-07:00  - 39 seconds elapsed total. 21 since last event.
09:46:06 GMT-07:00   Thu Jun 20 2024 16:46:00 UPDATE_COMPLETE_CLEANUP_IN_PROGRESS          AWS::CloudFormation::Stack               
09:46:06 GMT-07:00                                                                            eks-etc-titan-production
09:46:06 GMT-07:00   Thu Jun 20 2024 16:46:02 UPDATE_COMPLETE                              AWS::CloudFormation::Stack               
09:46:06 GMT-07:00                                                                            eks-etc-titan-production (36s)

where the last line will be UPDATE_COMPLETE, but iidy will summarize with

09:46:08 GMT-07:00  Current Stack Status:     UPDATE_COMPLETE_CLEANUP_IN_PROGRESS 

which is clearly not the status from the last line.

gpritchi-unbounce commented 5 months ago

@tavisrudd Although it did resolve the immediate issue, there was some concern about considering UPDATE_COMPLETE_CLEANUP_IN_PROGRESS a final state, so we're actually going with this approach.