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

v1.109.0 CLI cuts off step progress and outputs misleading "Failed resources:" message #15196

Closed
severn-everett opened this issue Jun 18, 2021 · 5 comments · Fixed by #15207
Closed
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1 package/tools Related to AWS CDK Tools or CLI

Comments

@severn-everett
Copy link

severn-everett commented Jun 18, 2021

When deploying an AWS stack using v1.109.0 the CLI...

  • Outputs "Failed resources:" message even if all resources were deployed successfully.
  • Does not print finished progress of every step.

Reproduction Steps

Upgrade from 1.108.1 to 1.109.0.

What did you expect to happen?

AWS stacks should deploy as they did before.

CDK_NEW_BOOTSTRAP set, using new-style bootstrapping
 ⏳  Bootstrapping environment aws://##########/eu-west-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
AN_AWS_STACK: creating CloudFormation changeset...
 0/4 | 15:13:48 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack | AN_AWS_STACK User Initiated
 0/4 | 15:13:54 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | FilePublishingRole
 0/4 | 15:13:54 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | ImagePublishingRole
 0/4 | 15:13:55 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | DeploymentActionRole
 3/4 | 15:14:10 | UPDATE_COMPLETE      | AWS::IAM::Role        | ImagePublishingRole
 3/4 | 15:14:10 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
 3/4 | 15:14:10 | UPDATE_COMPLETE      | AWS::IAM::Role        | DeploymentActionRole
 4/4 | 15:14:15 | UPDATE_COMPLETE_CLEA | AWS::CloudFormation::Stack | AN_AWS_STACK
 4/4 | 15:14:15 | UPDATE_COMPLETE      | AWS::CloudFormation::Stack | AN_AWS_STACK
 ✅  Environment aws://##########/eu-west-1 bootstrapped.

What actually happened?

The stack deployment fails to clean up, although the stack itself does get deployed.

CDK_NEW_BOOTSTRAP set, using new-style bootstrapping
 ⏳  Bootstrapping environment aws://##########/eu-west-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
AN_AWS_STACK: creating CloudFormation changeset...
  0/4 |15:20:04 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack | AN_AWS_STACK User Initiated
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | DeploymentActionRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | FilePublishingRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | ImagePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | ImagePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | DeploymentActionRole

Failed resources:
 ✅  Environment aws://##########/eu-west-1 bootstrapped.

Notice that step 4/4 did not print.

Environment

  • **CDK CLI Version :1.109.0
  • **Framework Version:1.109.0
  • Node.js Version: 14.17.0
  • **OS :Windows 10
  • Language (Version): 4.3.2

Other


This is 🐛 Bug Report

@severn-everett severn-everett added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 18, 2021
@ryparker
Copy link
Contributor

ryparker commented Jun 18, 2021

Hello @severn-everett 👋

After investigating this I've found that the CLI output can be a little misleading. The CLI will always output Failed resources: even when there are no failed deployments (implementation). As long as all resources listed have the green checkmark emoji () this means that all resources succeeded.

You should be able to see that the stack was successfully deployed via the AWS console.

@ryparker ryparker added closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 18, 2021
@severn-everett
Copy link
Author

What about the cleanup step (4/4)? That output has disappeared in the deployments using 1.109.0 as well.

@ryparker ryparker added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 p1 and removed guidance Question that needs advice or information. closing-soon This issue will automatically close in 4 days unless further comments are made. p2 labels Jun 18, 2021
@ryparker
Copy link
Contributor

I missed that bug, sorry about that. I opened a PR to fix the misleading Failed resources: message but will need to dedicate more time into investigating the cutoff of step progress output.

I am marking this issue as p1 due to the number of users that will be impacted. It has been prioritized as important and should see attention soon. We use +1s to help us prioritize our work.

@ryparker ryparker changed the title Stack deployment fails to clean up in 1.109.0 Stack deployment cuts off step progress and outputs misleading "Failed resources:" message in v1.109.0 Jun 18, 2021
@ryparker ryparker changed the title Stack deployment cuts off step progress and outputs misleading "Failed resources:" message in v1.109.0 v1.109.0 CLI cuts off step progress and outputs misleading "Failed resources:" message Jun 18, 2021
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jun 18, 2021
@rix0rrr rix0rrr removed their assignment Jun 22, 2021
@ryparker
Copy link
Contributor

ryparker commented Jun 22, 2021

Fix for both the Failed resources: output and progress cutoff has been implemented in #15207

Waiting on review and merge 🙂

@ryparker ryparker added the in-progress This issue is being actively worked on. label Jun 22, 2021
@mergify mergify bot closed this as completed in #15207 Jul 5, 2021
mergify bot pushed a commit that referenced this issue Jul 5, 2021
…port all progress steps (#15207)

### Summary

This PR changes the CLI output to:

- Prevent output of "Failed resources:" message when all resources were deployed successfully.
- Fixes an issue where some steps were not being reported.

See related issue: #15196

Before:

```shell
CDK_NEW_BOOTSTRAP set, using new-style bootstrapping
 ⏳  Bootstrapping environment aws://##########/eu-west-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
AN_AWS_STACK: creating CloudFormation changeset...
  0/4 |15:20:04 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack | AN_AWS_STACK User Initiated
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | DeploymentActionRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | FilePublishingRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | ImagePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE_CLEA | AWS::IAM::Role        | ImagePublishingRole

Failed resources:
 ✅  Environment aws://##########/eu-west-1 bootstrapped.
```

After:

```shell
CDK_NEW_BOOTSTRAP set, using new-style bootstrapping
 ⏳  Bootstrapping environment aws://##########/eu-west-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
AN_AWS_STACK: creating CloudFormation changeset...
  0/4 |15:20:04 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack | AN_AWS_STACK User Initiated
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | DeploymentActionRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | FilePublishingRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | ImagePublishingRole
  1/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  2/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE_CLEA | AWS::IAM::Role        | ImagePublishingRole
  4/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | DeploymentActionRole

 ✅  Environment aws://##########/eu-west-1 bootstrapped.
```

### TODO

- [x] Prevent output of "Failed resources:" if there are no failures present.
- [x] Report all steps before exiting.
- [x] Add tests for changes.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Jul 5, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

upparekh pushed a commit to upparekh/aws-cdk that referenced this issue Jul 8, 2021
…port all progress steps (aws#15207)

### Summary

This PR changes the CLI output to:

- Prevent output of "Failed resources:" message when all resources were deployed successfully.
- Fixes an issue where some steps were not being reported.

See related issue: aws#15196

Before:

```shell
CDK_NEW_BOOTSTRAP set, using new-style bootstrapping
 ⏳  Bootstrapping environment aws://##########/eu-west-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
AN_AWS_STACK: creating CloudFormation changeset...
  0/4 |15:20:04 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack | AN_AWS_STACK User Initiated
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | DeploymentActionRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | FilePublishingRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | ImagePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE_CLEA | AWS::IAM::Role        | ImagePublishingRole

Failed resources:
 ✅  Environment aws://##########/eu-west-1 bootstrapped.
```

After:

```shell
CDK_NEW_BOOTSTRAP set, using new-style bootstrapping
 ⏳  Bootstrapping environment aws://##########/eu-west-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
AN_AWS_STACK: creating CloudFormation changeset...
  0/4 |15:20:04 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack | AN_AWS_STACK User Initiated
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | DeploymentActionRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | FilePublishingRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | ImagePublishingRole
  1/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  2/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE_CLEA | AWS::IAM::Role        | ImagePublishingRole
  4/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | DeploymentActionRole

 ✅  Environment aws://##########/eu-west-1 bootstrapped.
```

### TODO

- [x] Prevent output of "Failed resources:" if there are no failures present.
- [x] Report all steps before exiting.
- [x] Add tests for changes.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
…port all progress steps (aws#15207)

### Summary

This PR changes the CLI output to:

- Prevent output of "Failed resources:" message when all resources were deployed successfully.
- Fixes an issue where some steps were not being reported.

See related issue: aws#15196

Before:

```shell
CDK_NEW_BOOTSTRAP set, using new-style bootstrapping
 ⏳  Bootstrapping environment aws://##########/eu-west-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
AN_AWS_STACK: creating CloudFormation changeset...
  0/4 |15:20:04 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack | AN_AWS_STACK User Initiated
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | DeploymentActionRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | FilePublishingRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | ImagePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE_CLEA | AWS::IAM::Role        | ImagePublishingRole

Failed resources:
 ✅  Environment aws://##########/eu-west-1 bootstrapped.
```

After:

```shell
CDK_NEW_BOOTSTRAP set, using new-style bootstrapping
 ⏳  Bootstrapping environment aws://##########/eu-west-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
AN_AWS_STACK: creating CloudFormation changeset...
  0/4 |15:20:04 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack | AN_AWS_STACK User Initiated
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | DeploymentActionRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | FilePublishingRole
  0/4 |15:20:11 | UPDATE_IN_PROGRESS   | AWS::IAM::Role        | ImagePublishingRole
  1/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  2/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | FilePublishingRole
  3/4 |15:20:28 | UPDATE_COMPLETE_CLEA | AWS::IAM::Role        | ImagePublishingRole
  4/4 |15:20:28 | UPDATE_COMPLETE      | AWS::IAM::Role        | DeploymentActionRole

 ✅  Environment aws://##########/eu-west-1 bootstrapped.
```

### TODO

- [x] Prevent output of "Failed resources:" if there are no failures present.
- [x] Report all steps before exiting.
- [x] Add tests for changes.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
3 participants