Skip to content

fix(cli): progress bar overshoots count by 1 for stack updates - #16168

Merged
mergify[bot] merged 15 commits into
aws:masterfrom
HariboDev:master
Oct 4, 2021
Merged

mergify[bot] merged 15 commits into
aws:masterfrom
HariboDev:master

Conversation

@HariboDev

@HariboDev HariboDev commented Aug 22, 2021 •

Copy link
Copy Markdown
Contributor

Currently, the resourcesTotal output is one short as it doesn't account for the UPDATE_COMPLETE event emitted when updating a stack. This PR increases the resourcesTotal variable depending on whether the stack is being updated or created.

Noticed this bug when using the CDK on private projects.

This has had a minor fix previously to address the CREATE_COMPLETE event emitted when creating a stack, however this did not address the UPDATE_COMPLETE event emitted when updating a stack. This caused updated events to produce the following output:

image

To address this issue, I:

  • Added +1 to the resourcesTotal prop in packages/aws-cdk/lib/api/deploy-stack.ts for the StackActivityMonitor class depending on whether the stack being deployed already exists using the cloudFormationStack.exists boolean.

I also addressed a spacing issue between the pipe (|) and the timestamp, as seen in the image above.

Collaborators:

  • @JWK95: Provided code review & valid suggestions

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

@gitpod-io

gitpod-io Bot commented Aug 22, 2021

Copy link
Copy Markdown

@peterwoodworth peterwoodworth added p2 package/tools Related to AWS CDK Tools or CLI labels Sep 1, 2021
rix0rrr
rix0rrr previously requested changes Sep 7, 2021
@mergify
mergify Bot dismissed rix0rrr’s stale review September 11, 2021 15:26

Pull request has been modified.

@HariboDev
HariboDev requested a review from rix0rrr September 11, 2021 15:58
@rix0rrr rix0rrr changed the title fix(cli): Increased 'resourcesTotal' for UPDATE_COMPLETE events fix(cli): progress bar overshoots count by 1 for stack updates Oct 4, 2021
@mergify

mergify Bot commented Oct 4, 2021

Copy link
Copy Markdown
Contributor

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation

Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: f186f8d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
mergify Bot merged commit 0c8ecb8 into aws:master Oct 4, 2021
@mergify

mergify Bot commented Oct 4, 2021

Copy link
Copy Markdown
Contributor

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

xykkong added a commit to xykkong/aws-cdk that referenced this pull request Oct 6, 2021
* '15588' of https://github.com/xykkong/aws-cdk: (47 commits)
  chore: rollback `GenericSSMParameterImage` deprecation (backport aws#16798) (aws#16800)
  chore(deps): bump actions/setup-node from 2.4.0 to 2.4.1 (aws#16778)
  Update CHANGELOG.md
  chore(release): 1.126.0
  feat(assertions): matcher support for `templateMatches()` API (aws#16789)
  feat(stepfunctions-tasks): add step concurrency level to EmrCreateCluster (aws#15242)
  docs(s3): correct heading levels Object Ownership / Bucket deletion (aws#16790)
  chore(individual-pkg-gen): fix bug in setting alpha package visibility (aws#16787)
  fix(s3): setting `autoDeleteObjects` to `false` empties the bucket (aws#16756)
  fix(iam): `User.fromUserArn` does not work for ARNs that include a path (aws#16269)
  fix(cli): progress bar overshoots count by 1 for stack updates (aws#16168)
  fix(config): add SourceAccount condition to Lambda permission (aws#16617)
  docs(events): add a note about not using `EventPattern` with `CfnRule` (aws#16715)
  docs(core): fix reference to nonexistant enum value (aws#16716)
  chore(s3-deployments): update python version on BucketDeployment handler (aws#16771)
  chore: set response-requested length to 2 and closing-soon to 5 (aws#16763)
  fix(revert): "fix: CDK does not honor NO_PROXY settings (aws#16751)" (aws#16761)
  docs(GitHub issue templates): Upgrade to GitHub Issues v2 (aws#16592)
  chore: reset jsii-rosetta worker count to default (aws#16755)
  fix: CDK does not honor NO_PROXY settings (aws#16751)
  ...
njlynch pushed a commit that referenced this pull request Oct 11, 2021
Currently, the `resourcesTotal` output is one short as it doesn't account for the `UPDATE_COMPLETE` event emitted when updating a stack. This PR increases the `resourcesTotal` variable depending on whether the stack is being updated or created.

Noticed this bug when using the CDK on private projects.

This has had a minor fix previously to address the `CREATE_COMPLETE` event emitted when creating a stack, however this did not address the `UPDATE_COMPLETE` event emitted when updating a stack. This caused updated events to produce the following output:

![image](https://user-images.githubusercontent.com/57939433/130373537-5dfacd3c-df7d-4272-abac-a4cf7c04cc47.png)

To address this issue, I:
- Added `+1` to the `resourcesTotal` prop in `packages/aws-cdk/lib/api/deploy-stack.ts` for the `StackActivityMonitor` class depending on whether the stack being deployed already exists using the `cloudFormationStack.exists` boolean.

I also addressed a spacing issue between the pipe (`|`) and the timestamp, as seen in the image above.

Collaborators:
- @JWK95: Provided code review & valid suggestions

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
…6168)

Currently, the `resourcesTotal` output is one short as it doesn't account for the `UPDATE_COMPLETE` event emitted when updating a stack. This PR increases the `resourcesTotal` variable depending on whether the stack is being updated or created.

Noticed this bug when using the CDK on private projects.

This has had a minor fix previously to address the `CREATE_COMPLETE` event emitted when creating a stack, however this did not address the `UPDATE_COMPLETE` event emitted when updating a stack. This caused updated events to produce the following output:

![image](https://user-images.githubusercontent.com/57939433/130373537-5dfacd3c-df7d-4272-abac-a4cf7c04cc47.png)

To address this issue, I:
- Added `+1` to the `resourcesTotal` prop in `packages/aws-cdk/lib/api/deploy-stack.ts` for the `StackActivityMonitor` class depending on whether the stack being deployed already exists using the `cloudFormationStack.exists` boolean.

I also addressed a spacing issue between the pipe (`|`) and the timestamp, as seen in the image above.

Collaborators:
- @JWK95: Provided code review & valid suggestions

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
ali-n4i pushed a commit to ali-n4i/aws-cdk that referenced this pull request Jul 29, 2026
…6168)

Currently, the `resourcesTotal` output is one short as it doesn't account for the `UPDATE_COMPLETE` event emitted when updating a stack. This PR increases the `resourcesTotal` variable depending on whether the stack is being updated or created.

Noticed this bug when using the CDK on private projects.

This has had a minor fix previously to address the `CREATE_COMPLETE` event emitted when creating a stack, however this did not address the `UPDATE_COMPLETE` event emitted when updating a stack. This caused updated events to produce the following output:

![image](https://user-images.githubusercontent.com/57939433/130373537-5dfacd3c-df7d-4272-abac-a4cf7c04cc47.png)

To address this issue, I:
- Added `+1` to the `resourcesTotal` prop in `packages/aws-cdk/lib/api/deploy-stack.ts` for the `StackActivityMonitor` class depending on whether the stack being deployed already exists using the `cloudFormationStack.exists` boolean.

I also addressed a spacing issue between the pipe (`|`) and the timestamp, as seen in the image above.

Collaborators:
- @JWK95: Provided code review & valid suggestions

----

*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

p2 package/tools Related to AWS CDK Tools or CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants