Fix deploy with long poll delay events order and stop condition#3919
Fix deploy with long poll delay events order and stop condition#3919jfuss merged 5 commits intoaws:developfrom BourgoisMickael:fix/deploy_stack_events
Conversation
Replace describe_stack as the event has the stack status Fix events order Stop loop at first not in progress
And reorder events
|
@BourgoisMickael Thanks for the quick response and pushing more fixes!
This seems reasonable. I am trying to figure out if there are any edge cases we introduce here. I assume we initially put this in place for "a reason", though not sure what that would be. So I just want to do some digging on this to see if the commit has any indications. On the ordering: |
|
Because When if a set a delay of 60s, during this time a lot of events will happen, so the |
|
@BourgoisMickael I see. So it all has to do with the polling time. Sorry I did not connect those dots initially. I hate diffs, makes changes harder to read sometimes. I see what is happening now. There is a while "stack is in progress" do thing going on. Which allows for the streaming. Or at least keeps the same thing we had before in how we "streamed". |
jfuss
left a comment
There was a problem hiding this comment.
Overall changes look good to me. We appreciate the testing you did on nightly to catch this and provide a patch to address it!
I will ping some team members tomorrow when everyone is in the office to get a second reviewer.
Which issue(s) does this change fix?
Fixes #3910
Fixes #3911
Why is this change necessary?
When using the feature from #3500 and deploy with a large
SAM_CLI_POLL_DELAYevents for each poll iterations are in reverse order. And if another process update the stack while sleeping the loop won't stop and catch events from another process.How does it address the issue?
deque(push front) to print in chronological orderDescribeStacksrequest and rely on firstnot_in_progressevent on the root stack to exit the loopDescribeStackEventsapi reverse chronological orderWhat side effects does this change have?
DescribeStackclient_sleep) in table headerMandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.