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): Handle error for abnormal CloudFormation stack state during AWS deployment #11863

Merged
merged 7 commits into from Mar 29, 2023

Conversation

archepro84
Copy link
Contributor

스크린샷 2023-03-27 오후 8 39 18

An error that occurs when Serverless Deploy is forcibly terminated has been corrected.
When the status of the CloudFormation Stack is, REVIREW_IN_PROGRESS the code is configured to output an error message as discussed in the issue.

Closes: #11852

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.

@archepro84 thanks for addressing this. Before we take it, let's clarify few things:

What is the behavior currently (before this change), where exactly we crash, and what exactly is the error we receive?

@archepro84
Copy link
Contributor Author

스크린샷 2023-03-27 오후 9 13 20
@medikoo

  1. The corresponding code causes an error when the number of Stacks is less than 1 and there is an abnormal Stack, such as REVIEW_IN_PROGRESS, during the retrieval of CloudFormation's describeStacks in the serverless deploy command.
  2. This error recognizes that the CloudFormation Stack already exists, and the ensureValidBucketExists method is executed.
    At this point, when attempting to retrieve the describeStackResource of CloudFormation using provider.request, the 'Error [ValidationError]: Resource ServerlessDeploymentBucket does not exist for stack' occurs, and normal business logic does not proceed.

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.

@archepro84, thanks for the additional explanations! Your proposal looks very good, please check my suggestions

lib/plugins/aws/deploy/lib/create-stack.js Outdated Show resolved Hide resolved
lib/plugins/aws/deploy/lib/create-stack.js Outdated Show resolved Hide resolved
lib/plugins/aws/deploy/lib/create-stack.js Outdated Show resolved Hide resolved
@archepro84 archepro84 requested a review from medikoo March 28, 2023 06:05
Copy link
Contributor Author

@archepro84 archepro84 left a comment

Choose a reason for hiding this comment

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

Thanks for your suggestions, @medikoo. I have reviewed all of your suggestions and left comments where necessary.

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.

Thank you @archepro84 ! We're getting closer

lib/plugins/aws/deploy/lib/create-stack.js Outdated Show resolved Hide resolved
lib/plugins/aws/deploy/lib/create-stack.js Outdated Show resolved Hide resolved
lib/plugins/aws/deploy/lib/create-stack.js Outdated Show resolved Hide resolved
@archepro84 archepro84 requested a review from medikoo March 29, 2023 08:14
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.

Thank you 👍

@medikoo medikoo merged commit 0d850fc into serverless:main Mar 29, 2023
5 checks passed
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.

Problems that occur when Serverless deploy is forcibly terminated
2 participants