Skip to content

fix: progress is wrong for nested stacks#1474

Merged
aws-cdk-automation merged 1 commit intomainfrom
huijbers/no-nested-stack-progress
May 6, 2026
Merged

fix: progress is wrong for nested stacks#1474
aws-cdk-automation merged 1 commit intomainfrom
huijbers/no-nested-stack-progress

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented May 4, 2026

The CDK CLI prints a (current)/(total) progress.

However, the (total) counter is based off of the change set of the root stack, while the (current) counter is a count of all the stack deployment events that the CLI has seen, which includes events in nested stacks.

Be sure to only increase the progress counter for root stack events.

Pre-emptive FAQ: why not accurately reflect the total amount of changes in all nested stacks? Because we have chosen (and locked in using tests) that we are not creating change sets for nested stacks. So there's no way to predict how many changes there will be in the nested stacks before executing.


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

The CDK CLI prints a `(current)/(total)` progress.

However, the `(total)` counter is based off of the change set of the
root stack, while the `(current)` counter is a count of all the stack
deployment events that the CLI has seen, which includes events in nested
stacks.

Be sure to only increase the progress counter for root stack events.

Pre-emptive FAQ: why not accurately reflect the total amount of changes
in all nested stacks? Because we have chosen (and locked in using tests)
that we are not creating change sets for nested stacks. So there's no
way to predict how many changes there will be in the nested stacks
before executing.
@rix0rrr rix0rrr requested review from a team May 4, 2026 11:50
@github-actions github-actions Bot added the p2 label May 4, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team May 4, 2026 11:50
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.99%. Comparing base (63db541) to head (80b1d52).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1474      +/-   ##
==========================================
- Coverage   88.10%   87.99%   -0.12%     
==========================================
  Files          74       74              
  Lines       10669    10669              
  Branches     1457     1452       -5     
==========================================
- Hits         9400     9388      -12     
- Misses       1241     1253      +12     
  Partials       28       28              
Flag Coverage Δ
suite.unit 87.99% <ø> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 7a00b43 May 6, 2026
45 checks passed
@aws-cdk-automation aws-cdk-automation deleted the huijbers/no-nested-stack-progress branch May 6, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants