Skip to content

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jan 22, 2026

Here's some nasty legacy around Stack Tags:

  • Before CDK v1.33.0, we wrote stack tags to the construct metadata, and they were written as a { Key, Value } object that got directly passed into the CloudFormation CreateChangeSet API.
  • In CDK v1.33.0 (nearly 6 years ago), we formalized the cloud assembly schema into a jsii package, so we had to type the tag object as { key, value } in memory (otherwise jsii would yell at us). For backwards compatibility with the on-disk format and the (extracted) JSONSchema Validation, we used to re-case the identifiers: just before they were written to disk we would change key → Key and just after reading from disk but before validation and we would change Key → key.
  • In CDK v1.66.0 (5 and a half years ago), we added a tags property to the CloudFormation Stack artifact in the CDK manifest, and the CLI and other tools stopped using the stack metadata to read stack tags.

Since this is to support end-of-life CDKs, in this PR I'm taking some of that complexity out; we stop converting key → Key when writing a cloud assembly manifest -- but we do still have to convert Key → key in order to pass JSONSchema validation as we read the manifest. Tags are exclusively read from the artifact properties, there will be no fallback to the metadata anymore.


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

@rix0rrr rix0rrr requested a review from a team January 22, 2026 10:34
@aws-cdk-automation aws-cdk-automation requested a review from a team January 22, 2026 10:35
@github-actions github-actions bot added the p2 label Jan 22, 2026
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.69%. Comparing base (937452b) to head (7ee1cd0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1053      +/-   ##
==========================================
- Coverage   87.70%   87.69%   -0.01%     
==========================================
  Files          72       72              
  Lines       10095    10095              
  Branches     1332     1332              
==========================================
- Hits         8854     8853       -1     
- Misses       1216     1217       +1     
  Partials       25       25              
Flag Coverage Δ
suite.unit 87.69% <ø> (-0.01%) ⬇️

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 Jan 22, 2026
Merged via the queue into main with commit 78fa807 Jan 22, 2026
31 checks passed
@aws-cdk-automation aws-cdk-automation deleted the huijbers/no-more-legacy-stack-tags branch January 22, 2026 11:46
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