Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: back off on cfn event pull #11624

Merged
merged 4 commits into from
Dec 20, 2022

Conversation

sobolk
Copy link
Member

@sobolk sobolk commented Dec 18, 2022

Description of changes

Issue #, if available

Description of how you validated changes

I injected console.log('Delay ' + delay + ' Attempt ' + readStackEventsCalls); into readStackEvents and ran one of the e2e tests. Below is outcome.
image

E2E test run.

https://app.circleci.com/pipelines/github/aws-amplify/amplify-cli/13698/workflows/634b1e55-3c58-49fe-b88e-db161cafb298

image

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sobolk sobolk marked this pull request as ready for review December 19, 2022 00:52
@sobolk sobolk requested a review from a team as a code owner December 19, 2022 00:52
@sobolk sobolk requested review from awsluja and jhockett December 19, 2022 00:55
@@ -1306,7 +1306,7 @@ commands:
source $BASH_ENV
amplify version
retry runE2eTest
no_output_timeout: 60m
no_output_timeout: 90m
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to go up until searchable migration is faster.
image

Comment on lines 157 to 170
const self = this;
let delay = CFN_POLL_TIME;
let readStackEventsCalls = 0;
let invoker = function() {
self.addToPollQueue(stackName, 3);
if (delay < CFN_POLL_TIME_MAX) {
delay = Math.min(Math.pow(2, readStackEventsCalls) * CFN_POLL_TIME, CFN_POLL_TIME_MAX);
}
self.pollForEvents = setTimeout(invoker, delay);
readStackEventsCalls++;
}

// start it off
self.pollForEvents = setTimeout(invoker, delay);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -153,7 +154,20 @@ class CloudFormation {
}

readStackEvents(stackName) {
this.pollForEvents = setInterval(() => this.addToPollQueue(stackName, 3), CFN_POLL_TIME);
const self = this;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this rename?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup.
image

sdstolworthy
sdstolworthy previously approved these changes Dec 19, 2022
@sobolk sobolk dismissed stale reviews from jhockett and sdstolworthy via e959c47 December 19, 2022 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants