Skip to content

Commit 1347482

Browse files
authored
Merge branch 'main' into merge-back/2.171.1
2 parents a95560c + cf89d0f commit 1347482

File tree

229 files changed

+204831
-42865
lines changed

Some content is hidden

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

229 files changed

+204831
-42865
lines changed

.devcontainer/Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ FROM jsii/superchain:1-bookworm-slim-node20
22

33
USER root
44

5+
# Setup oh-my-zsh
6+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
7+
&& apt-get -y install --no-install-recommends zsh vim \
8+
&& rm -rf /var/lib/apt/lists/* \
9+
&& chsh -s $(which zsh) superchain
10+
11+
# Required, otherwise shell is extermly slow due the size of the aws-cdk
12+
RUN sh -c 'echo "[oh-my-zsh]\n hide-dirty = 1" > /etc/gitconfig'
13+
514
# Change uid/guid of superchain so it can work with the docker-in-docker feature
615
RUN groupmod --gid 1000 superchain \
716
&& usermod --uid 1000 --gid 1000 superchain \
@@ -10,10 +19,4 @@ RUN groupmod --gid 1000 superchain \
1019
USER superchain
1120

1221
# Setup oh-my-zsh
13-
RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \
14-
&& sudo apt-get -y install --no-install-recommends zsh vim \
15-
&& sudo rm -rf /var/lib/apt/lists/* \
16-
&& sudo chsh -s $(which zsh) $(whoami)
17-
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended \
18-
# Required, otherwise shell is extermly slow due the size of the aws-cdk
19-
&& sudo sh -c 'echo "[oh-my-zsh]\n hide-dirty = 1" > /etc/gitconfig'
22+
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended

.devcontainer/devcontainer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"build": {
44
"dockerfile": "Dockerfile"
55
},
6-
76
"customizations": {
87
"vscode": {
9-
"extensions": ["dbaeumer.vscode-eslint"]
8+
"extensions": [
9+
"dbaeumer.vscode-eslint"
10+
]
1011
}
1112
},
12-
1313
"postCreateCommand": "yarn install",
1414
"remoteUser": "superchain",
1515
"features": {
16-
"docker-in-docker": {
16+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
1717
"version": "latest",
1818
"moby": true
1919
}

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: cd packages/aws-cdk && yarn test
2929

3030
- name: Upload results to Codecov
31-
uses: codecov/codecov-action@v5
31+
uses: codecov/codecov-action@v4
3232
with:
3333
directory: packages/aws-cdk/coverage
3434
fail_ci_if_error: true
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Lambda Runtime Tests Update
2+
on:
3+
pull_request:
4+
paths:
5+
- 'packages/aws-cdk-lib/aws-lambda/lib/runtime.ts'
6+
7+
jobs:
8+
update-lambda-tests:
9+
if: github.repository == 'aws/aws-cdk'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
ref: ${{ github.event.pull_request.head.ref }}
15+
16+
- name: Set up Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "*"
20+
env:
21+
NODE_OPTIONS: "--max-old-space-size=8196 --experimental-worker ${NODE_OPTIONS:-}"
22+
23+
- name: Install dependencies
24+
run: yarn install --frozen-lockfile && cd tools/@aws-cdk/lambda-integration-test-updater && yarn build+test
25+
26+
- name: Update Lambda Runtime Tests
27+
run: |
28+
cd tools/@aws-cdk/lambda-integration-test-updater
29+
./bin/update-lambda-runtimestes-integ-testing
30+
31+
- name: Check for changes
32+
id: git-check
33+
run: |
34+
if [[ -n "$(git status --porcelain)" ]]; then
35+
echo "changes=true" >> $GITHUB_OUTPUT
36+
else
37+
echo "changes=false" >> $GITHUB_OUTPUT
38+
fi
39+
40+
- name: Commit & Push changes
41+
if: steps.git-check.outputs.changes == 'true'
42+
run: |
43+
git config --global user.name 'aws-cdk-automation'
44+
git config --global user.email '[email protected]'
45+
git add .
46+
git commit -m "chore: update lambda runtime integration tests"
47+
git push origin ${{ github.event.pull_request.head.ref }}

lerna.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"tools/@aws-cdk/spec2cdk",
2020
"tools/@aws-cdk/yarn-cling",
2121
"tools/@aws-cdk/lazify",
22+
"tools/@aws-cdk/lambda-integration-test-updater",
2223
"scripts/@aws-cdk/script-tests"
2324
],
2425
"rejectCycles": true,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"tools/@aws-cdk/spec2cdk",
8888
"tools/@aws-cdk/yarn-cling",
8989
"tools/@aws-cdk/lazify",
90+
"tools/@aws-cdk/lambda-integration-test-updater",
9091
"scripts/@aws-cdk/script-tests"
9192
],
9293
"nohoist": [

packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { existsSync, promises as fs } from 'fs';
2+
import * as querystring from 'node:querystring';
23
import * as os from 'os';
34
import * as path from 'path';
45
import {
@@ -23,6 +24,7 @@ import { PutObjectLockConfigurationCommand } from '@aws-sdk/client-s3';
2324
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
2425
import { AssumeRoleCommand, GetCallerIdentityCommand } from '@aws-sdk/client-sts';
2526
import * as mockttp from 'mockttp';
27+
import { CompletedRequest } from 'mockttp';
2628
import {
2729
cloneDirectory,
2830
integTest,
@@ -2846,10 +2848,19 @@ integTest('requests go through a proxy when configured',
28462848
});
28472849
} finally {
28482850
await fs.rm(certDir, { recursive: true, force: true });
2851+
await proxyServer.stop();
28492852
}
28502853

2851-
// Checking that there was some interaction with the proxy
2852-
const requests = await endpoint.getSeenRequests();
2853-
expect(requests.length).toBeGreaterThan(0);
2854+
const actionsUsed = actions(await endpoint.getSeenRequests());
2855+
expect(actionsUsed).toContain('AssumeRole');
2856+
expect(actionsUsed).toContain('CreateChangeSet');
28542857
}),
28552858
);
2859+
2860+
function actions(requests: CompletedRequest[]): string[] {
2861+
return [...new Set(requests
2862+
.map(req => req.body.buffer.toString('utf-8'))
2863+
.map(body => querystring.decode(body))
2864+
.map(x => x.Action as string)
2865+
.filter(action => action != null))];
2866+
}

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-cfdist.js.snapshot/asset.746da84b10e215c552e68b6d2061024e4429f0386f43a35ef5e4d2940655692e/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-cfdist.js.snapshot/asset.9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-cfdist.js.snapshot/cdk.out

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-cfdist.js.snapshot/integ-user-pool-domain-cfdist.assets.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-cfdist.js.snapshot/integ-user-pool-domain-cfdist.template.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"S3Bucket": {
149149
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
150150
},
151-
"S3Key": "746da84b10e215c552e68b6d2061024e4429f0386f43a35ef5e4d2940655692e.zip"
151+
"S3Key": "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec.zip"
152152
},
153153
"Handler": "index.handler",
154154
"Role": {
@@ -186,6 +186,14 @@
186186
"DomainDescription.CloudFrontDistribution"
187187
]
188188
}
189+
},
190+
"CloudFrontEndpoint": {
191+
"Value": {
192+
"Fn::GetAtt": [
193+
"UserPoolDomainD0EA232A",
194+
"CloudFrontDistribution"
195+
]
196+
}
189197
}
190198
},
191199
"Mappings": {

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-cfdist.js.snapshot/integ.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-cfdist.js.snapshot/manifest.json

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-cfdist.js.snapshot/tree.json

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-domain-cfdist.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ new CfnOutput(stack, 'Domain', {
2626
new CfnOutput(stack, 'CloudFrontDomainName', {
2727
value: domain.cloudFrontDomainName,
2828
});
29+
30+
new CfnOutput(stack, 'CloudFrontEndpoint', {
31+
value: domain.cloudFrontEndpoint,
32+
});

0 commit comments

Comments
 (0)