Skip to content

Commit 4be3c1f

Browse files
authored
2 parents a4225fe + 15e174e commit 4be3c1f

File tree

1,095 files changed

+182350
-71418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,095 files changed

+182350
-71418
lines changed

.github/workflows/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ Owner: CDK support team
9292
patch file for downloading.
9393
Owner: Core CDK team
9494

95+
### Yarn Upgrader for deps needing manual work
96+
97+
[yarn-upgrade-need-manual-work.yml](yarn-upgrade-need-manual-work.yml): Upgrades specific dependencies that require manual intervention and creates a PR for review.
98+
For example, some dependency upgrades require manual updates to the integ test snapshots.
99+
Owner: Core CDK team
100+
95101
### AWS Service Spec Update
96102

97103
[spec-update.yml](spec-update.yml): Updates AWS Service Spec and related packages to their latest versions

.github/workflows/codecov-collect.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Codecov Collect
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
collect:
11+
name: Collect Coverage
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node
19+
uses: actions/setup-node@v4
20+
21+
- name: Install dependencies
22+
run: yarn install
23+
24+
- name: Build Library
25+
run: npx lerna run build --scope=aws-cdk-lib
26+
27+
- name: Run Core tests
28+
run: cd packages/aws-cdk-lib && yarn test core
29+
30+
- name: Upload Coverage and PR Info
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: coverage-artifacts
34+
path: |
35+
packages/aws-cdk-lib/coverage/cobertura-coverage.xml

.github/workflows/codecov-upload.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Codecov Upload
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Codecov Collect"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: write
11+
id-token: write
12+
actions: read
13+
14+
jobs:
15+
upload:
16+
name: Upload to Codecov
17+
runs-on: ubuntu-latest
18+
if: >
19+
github.event.workflow_run.event == 'pull_request' &&
20+
github.event.workflow_run.conclusion == 'success'
21+
22+
steps:
23+
- name: Download Artifacts
24+
uses: actions/download-artifact@v4
25+
with:
26+
name: coverage-artifacts
27+
path: ./coverage
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
repository: ${{ github.repository }}
30+
run-id: ${{ github.event.workflow_run.id }}
31+
32+
- name: Upload to Codecov
33+
uses: codecov/codecov-action@v5
34+
with:
35+
files: ./coverage/packages/aws-cdk-lib/coverage/cobertura-coverage.xml
36+
fail_ci_if_error: true
37+
flags: suite.unit
38+
use_oidc: true

.github/workflows/codecov.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/enum-static-mapping-updater.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ jobs:
5252
git checkout -b "$branchName"
5353
5454
git add . # Add all files changed
55-
git commit -m "chore: update enum static mapping"
55+
git commit -m "chore(enum-updater): update enum static mapping"
5656
git push -f origin "$branchName"
5757
58-
gh pr create --title "chore: update enum static mapping" \
58+
gh pr create --title "chore(enum-updater): update enum static mapping" \
5959
--body "This PR updates the CDK enum mapping file." \
6060
--base main \
6161
--head "$branchName" \

.github/workflows/pr-linter-exemption-labeler.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ jobs:
1010
pr_commented:
1111
name: PR Comment
1212
if: ${{ (github.event.issue.pull_request) && (github.event.issue.state == 'open') }}
13+
permissions:
14+
pull-requests: write
1315
runs-on: ubuntu-latest
1416
steps:
1517
- uses: cdklabs/pr-linter-exemption-labeler@main
1618
with:
17-
github-token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
19+
github-token: ${{ secrets.PROJEN_GITHUB_TOKEN }}

.github/workflows/request-cli-integ-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
persist-credentials: false
2020
- name: Find changed cli files
2121
id: changed-cli-files
22-
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1
22+
uses: step-security/changed-files@95b56dadb92a30ca9036f16423fd3c088a71ee94
2323
with:
2424
base_sha: ${{ github.event.pull_request.base.sha }}
2525
files_yaml: |

.github/workflows/security-guardian.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,23 @@ on:
33
pull_request: {}
44

55
jobs:
6-
run-security-guardian:
6+
log-skip:
7+
if: |
8+
startsWith(github.event.pull_request.title, 'chore(release):') ||
9+
startsWith(github.event.pull_request.title, 'chore(merge-back):')
710
runs-on: ubuntu-latest
811
steps:
12+
- run: echo "Skipping Security Guardian for release/merge-back PR"
13+
run-security-guardian:
14+
if: |
15+
!startsWith(github.event.pull_request.title, 'chore(release):') &&
16+
!startsWith(github.event.pull_request.title, 'chore(merge-back):')
17+
runs-on: ubuntu-latest
18+
steps:
919
- name: Checkout
1020
uses: actions/checkout@v4
1121
with:
12-
fetch-depth: 0 # Required to enable full git diff
22+
fetch-depth: 0
1323

1424
- name: Install cfn-guard
1525
run: |
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Yarn Upgrade Dependencies Requiring Intervention
2+
# This workflow upgrade npm dependencies that will require manual work. For example, `@aws-cdk/asset-awscli-v1` upgrade always require manually updating snapshots.
3+
# When adding deps in this workflow, we must also exclude them in the Yarn Upgrade workflow. This is so that the PR from that workflow can be kept clean (i.e. does not need manual update).
4+
# See this line on how to exclude deps: https://github.com/aws/aws-cdk/blob/ce7b30775f354c7de774f73c5f8dedd9ce7530d3/.github/workflows/yarn-upgrade.yml#L61
5+
# If this proves to be too cumbersome, we can refactor both workflow to reference the deps list from a single place.
6+
7+
on:
8+
schedule:
9+
# Every wednesday at 13:37 UTC
10+
- cron: 37 13 * * 3
11+
workflow_dispatch: {}
12+
13+
# For multiple dependencies, do `DEPS_TO_UPGRADE:"p1 p2 p3"`
14+
env:
15+
DEPS_TO_UPGRADE: "@aws-cdk/asset-awscli-v1"
16+
17+
jobs:
18+
upgrade:
19+
name: Yarn Upgrade
20+
permissions:
21+
contents: read
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Check Out
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Node
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: "*"
31+
env:
32+
NODE_OPTIONS: "--max-old-space-size=8196 --experimental-worker ${NODE_OPTIONS:-}"
33+
34+
- name: Locate Yarn cache
35+
id: yarn-cache
36+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
37+
38+
- name: Restore Yarn cache
39+
uses: actions/cache@v4
40+
with:
41+
path: ${{ steps.yarn-cache.outputs.dir }}
42+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
43+
restore-keys: |-
44+
${{ runner.os }}-yarn-
45+
- name: Yarn Install
46+
run: yarn install --frozen-lockfile
47+
- name: Install Tools
48+
run: |-
49+
npm -g install lerna npm-check-updates
50+
- name: Run "ncu -u"
51+
run: |-
52+
# Convert space-separated string to comma-separated string for the filter
53+
FILTER=$(echo "$DEPS_TO_UPGRADE" | tr ' ' ',')
54+
lerna exec --parallel ncu -- --upgrade --filter="$FILTER" --target=minor
55+
56+
- name: Run "yarn upgrade"
57+
run: |
58+
echo "Upgrading dependencies: $DEPS_TO_UPGRADE"
59+
yarn upgrade $DEPS_TO_UPGRADE --exact
60+
61+
# Next, create and upload the changes as a patch file. This will later be downloaded to create a pull request
62+
# Creating a pull request requires write permissions and it's best to keep write privileges isolated.
63+
- name: Create Patch
64+
run: |-
65+
git add .
66+
git diff --binary --patch --staged > ${{ runner.temp }}/upgrade.patch
67+
68+
- name: Upload Patch
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: upgrade.patch
72+
path: ${{ runner.temp }}/upgrade.patch
73+
74+
pr:
75+
name: Create Pull Request
76+
needs: upgrade
77+
permissions:
78+
contents: write
79+
pull-requests: write
80+
runs-on: ubuntu-latest
81+
steps:
82+
- name: Check Out
83+
uses: actions/checkout@v4
84+
85+
- name: Download patch
86+
uses: actions/download-artifact@v4
87+
with:
88+
name: upgrade.patch
89+
path: ${{ runner.temp }}
90+
91+
- name: Apply patch
92+
run: '[ -s ${{ runner.temp }}/upgrade.patch ] && git apply --binary ${{ runner.temp
93+
}}/upgrade.patch || echo "Empty patch. Skipping."'
94+
95+
- name: Make Pull Request
96+
uses: peter-evans/create-pull-request@v7
97+
with:
98+
# Git commit details
99+
branch: automation/yarn-upgrade-dependencies-requiring-intervention
100+
author: aws-cdk-automation <[email protected]>
101+
commit-message: |-
102+
chore: npm-check-updates && yarn upgrade
103+
Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.
104+
# Pull Request details
105+
title: 'chore: yarn upgrade dependencies requiring intervention'
106+
body: |-
107+
Ran npm-check-updates and yarn upgrade for the following dependencies:
108+
```
109+
${{ env.DEPS_TO_UPGRADE }}
110+
```
111+
Checkout this branch and run integration tests locally to update snapshots.
112+
```
113+
(cd packages/@aws-cdk-testing/framework-integ && yarn integ --update-on-failed)
114+
```
115+
See https://www.npmjs.com/package/@aws-cdk/integ-runner for more integ runner options.
116+
labels: contribution/core,dependencies
117+
team-reviewers: aws-cdk-team
118+
# Github prevents further Github actions to be run if the default Github token is used.
119+
# Instead use a privileged token here, so further GH actions can be triggered on this PR.
120+
token: ${{ secrets.PROJEN_GITHUB_TOKEN }}

.github/workflows/yarn-upgrade.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
ncu --upgrade --reject=@types/node,@types/prettier,constructs,jsii,jsii-rosetta,typescript --target=minor
5959
# Upgrade all the packages
6060
lerna exec --parallel ncu -- --upgrade --filter=jsii,jsii-rosetta,typescript --target=patch
61-
lerna exec --parallel ncu -- --upgrade --reject='@types/conventional-commits-parser,@types/node,@types/prettier,constructs,jsii,jsii-rosetta,typescript,aws-sdk-mock,@aws-sdk/*,@aws-cdk/aws-service-spec,@aws-cdk/service-spec-types,${{ steps.list-packages.outputs.list }}' --target=minor
61+
lerna exec --parallel ncu -- --upgrade --reject='@aws-cdk/asset-awscli-v1,@types/conventional-commits-parser,@types/node,@types/prettier,constructs,jsii,jsii-rosetta,typescript,aws-sdk-mock,@aws-sdk/*,@aws-cdk/aws-service-spec,@aws-cdk/service-spec-types,${{ steps.list-packages.outputs.list }}' --target=minor
6262
# Upgrade package.json files in init templates
6363
for pj in $(find packages/aws-cdk/lib/init-templates -name package.json); do
6464
(cd $(dirname $pj) && ncu --upgrade --reject='constructs,${{ steps.list-packages.outputs.list }}')

CHANGELOG.v2.alpha.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.196.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.195.0-alpha.0...v2.196.0-alpha.0) (2025-05-15)
6+
7+
8+
### Features
9+
10+
* **msk:** support Kafka versions 3.9.x and 3.9.x Kraft ([#34213](https://github.com/aws/aws-cdk/issues/34213)) ([a1226db](https://github.com/aws/aws-cdk/commit/a1226db3164f885ab1bbf13a18697831cfde74d0))
11+
* **pipes-targets:** add SNS ([#34159](https://github.com/aws/aws-cdk/issues/34159)) ([2f846b3](https://github.com/aws/aws-cdk/commit/2f846b395cc5061363bd6def946a04740ac0139b))
12+
* **s3tables:** server-side encryption by customer managed KMS key ([#34229](https://github.com/aws/aws-cdk/issues/34229)) ([488f0db](https://github.com/aws/aws-cdk/commit/488f0db714c20fcaf5dbdf682277a70c6a938d3f))
13+
14+
15+
### Bug Fixes
16+
17+
* **ec2:** dual-stack vpc without private subnets creates EgressOnlyInternetGateway (under feature flag) ([#34437](https://github.com/aws/aws-cdk/issues/34437)) ([35e818b](https://github.com/aws/aws-cdk/commit/35e818b4f86638b5fe6074705511d1eee16266d2)), closes [#30981](https://github.com/aws/aws-cdk/issues/30981)
18+
* **ec2-alpha:** fix resource id references and tags for migration behind feature flag ([#34377](https://github.com/aws/aws-cdk/issues/34377)) ([aa73534](https://github.com/aws/aws-cdk/commit/aa735341a8e95224a14241b5e1c5c5ba71de5022))
19+
520
## [2.195.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.194.0-alpha.0...v2.195.0-alpha.0) (2025-05-07)
621

722

0 commit comments

Comments
 (0)