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(AWS Deploy): Correctly identify "no updates" error during deploy #9248

Conversation

pgrzesik
Copy link
Contributor

@pgrzesik pgrzesik commented Apr 6, 2021

Closes: #9241

@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #9248 (97cc6d2) into master (c8ef7ce) will decrease coverage by 0.01%.
The diff coverage is 65.00%.

❗ Current head 97cc6d2 differs from pull request most recent head 5e55e29. Consider uploading reports for the commit 5e55e29 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9248      +/-   ##
==========================================
- Coverage   86.96%   86.94%   -0.02%     
==========================================
  Files         315      315              
  Lines       11707    11721      +14     
==========================================
+ Hits        10181    10191      +10     
- Misses       1526     1530       +4     
Impacted Files Coverage Δ
scripts/serverless.js 49.78% <33.33%> (+0.22%) ⬆️
lib/plugins/aws/lib/updateStack.js 98.55% <83.33%> (+0.02%) ⬆️
lib/configuration/resolve-provider-name.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8ef7ce...5e55e29. Read the comment docs.

@pgrzesik pgrzesik requested a review from medikoo April 6, 2021 09:27
Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

@pgrzesik Looks good, I've just proposed one improvement, that should clean up our logic

const cfData = await this.provider.request('CloudFormation', 'updateStack', params);
await this.monitorStack('update', cfData);
} catch (e) {
if (!e.message.includes(NO_UPDATE_MESSAGE)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this error may happen only on CloudFormation.updateStack call right?

In such case, I'd wrap with try/catch only provider.request invocation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch - that's correct 👍

@pgrzesik pgrzesik force-pushed the correctly-identify-no-updates-aws-error-during-deployment-without-changes branch from 71ac694 to 440deb7 Compare April 6, 2021 11:46
@pgrzesik pgrzesik force-pushed the correctly-identify-no-updates-aws-error-during-deployment-without-changes branch from 440deb7 to 5e55e29 Compare April 6, 2021 11:56
@pgrzesik pgrzesik requested a review from medikoo April 6, 2021 12:05
Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

Looks great 👍

@pgrzesik pgrzesik merged commit 0e6a1ce into master Apr 6, 2021
@pgrzesik pgrzesik deleted the correctly-identify-no-updates-aws-error-during-deployment-without-changes branch April 6, 2021 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: No updates are to be performed
2 participants