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

(cli): progress bar goes over 100% #11805

Closed
moltar opened this issue Dec 1, 2020 · 4 comments · Fixed by #20067
Closed

(cli): progress bar goes over 100% #11805

moltar opened this issue Dec 1, 2020 · 4 comments · Fixed by #20067
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p2 package/tools Related to AWS CDK Tools or CLI

Comments

@moltar
Copy link
Contributor

moltar commented Dec 1, 2020

Shows: 121/101

image

Reproduction Steps

Not sure how, maybe it is because of Nested Stacks?

What did you expect to happen?

The completed count should be <= total number.

What actually happened?

The completed count is higher than total count.

Environment

  • CDK CLI Version : 1.75.0
  • Framework Version: 1.75.0
  • Node.js Version: v12.18.4
  • OS : macOS
  • Language (Version): TypeScript

Other


This is 🐛 Bug Report

@moltar moltar added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 1, 2020
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Dec 1, 2020
@moltar
Copy link
Contributor Author

moltar commented Dec 1, 2020

This also might be related to Custom Resource that runs on deployment. E.g. log managing lambdas.

@rix0rrr rix0rrr added effort/large Large work item – several weeks of effort p2 labels Dec 7, 2020
@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Dec 7, 2020
@rix0rrr rix0rrr removed their assignment Jun 3, 2021
@SamStephens
Copy link
Contributor

I'm seeing this too:

[██████████████████████████████████████████████████████████] (158/101)

Interestingly, my denominator is also 101. Is there a bug that prevents the total number going above 101? Or is that just a coincidence?

@RomainMuller
Copy link
Contributor

This is because the change count is derived from DescribeCHangeSet but the CLI only ever looks at the first page (so up to 100 changes, plus 1 for the stack itself). I submitted a PR to address this.

@RomainMuller RomainMuller added effort/small Small work item – less than a day of effort and removed effort/large Large work item – several weeks of effort labels Apr 25, 2022
@mergify mergify bot closed this as completed in #20067 Apr 25, 2022
mergify bot pushed a commit that referenced this issue Apr 25, 2022
The deployment monitor failed to account for the fact the
`DescribeChangeSet` operation returns a paginated output, and only
represents up to 100 changes per pages.

Since only the first page was considered, the progress bar would always
start with a value of 101 (or less), instead of the correct count.

This aggregates the `Changes` arrays from all pages of the change set
description so the count is correct.

Fixes #11805

----

### All Submissions:

* [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*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

⚠️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.

StevePotter pushed a commit to StevePotter/aws-cdk that referenced this issue Apr 27, 2022
The deployment monitor failed to account for the fact the
`DescribeChangeSet` operation returns a paginated output, and only
represents up to 100 changes per pages.

Since only the first page was considered, the progress bar would always
start with a value of 101 (or less), instead of the correct count.

This aggregates the `Changes` arrays from all pages of the change set
description so the count is correct.

Fixes aws#11805

----

### All Submissions:

* [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*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 p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants