Skip to content

Commit

Permalink
Merge branch 'main' into merge-back/2.171.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Nov 28, 2024
2 parents a95560c + cf89d0f commit 1347482
Show file tree
Hide file tree
Showing 229 changed files with 204,831 additions and 42,865 deletions.
17 changes: 10 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ FROM jsii/superchain:1-bookworm-slim-node20

USER root

# Setup oh-my-zsh
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends zsh vim \
&& rm -rf /var/lib/apt/lists/* \
&& chsh -s $(which zsh) superchain

# Required, otherwise shell is extermly slow due the size of the aws-cdk
RUN sh -c 'echo "[oh-my-zsh]\n hide-dirty = 1" > /etc/gitconfig'

# Change uid/guid of superchain so it can work with the docker-in-docker feature
RUN groupmod --gid 1000 superchain \
&& usermod --uid 1000 --gid 1000 superchain \
Expand All @@ -10,10 +19,4 @@ RUN groupmod --gid 1000 superchain \
USER superchain

# Setup oh-my-zsh
RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& sudo apt-get -y install --no-install-recommends zsh vim \
&& sudo rm -rf /var/lib/apt/lists/* \
&& sudo chsh -s $(which zsh) $(whoami)
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended \
# Required, otherwise shell is extermly slow due the size of the aws-cdk
&& sudo sh -c 'echo "[oh-my-zsh]\n hide-dirty = 1" > /etc/gitconfig'
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"build": {
"dockerfile": "Dockerfile"
},

"customizations": {
"vscode": {
"extensions": ["dbaeumer.vscode-eslint"]
"extensions": [
"dbaeumer.vscode-eslint"
]
}
},

"postCreateCommand": "yarn install",
"remoteUser": "superchain",
"features": {
"docker-in-docker": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"moby": true
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: cd packages/aws-cdk && yarn test

- name: Upload results to Codecov
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v4
with:
directory: packages/aws-cdk/coverage
fail_ci_if_error: true
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/lambda-runtime-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Lambda Runtime Tests Update
on:
pull_request:
paths:
- 'packages/aws-cdk-lib/aws-lambda/lib/runtime.ts'

jobs:
update-lambda-tests:
if: github.repository == 'aws/aws-cdk'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "*"
env:
NODE_OPTIONS: "--max-old-space-size=8196 --experimental-worker ${NODE_OPTIONS:-}"

- name: Install dependencies
run: yarn install --frozen-lockfile && cd tools/@aws-cdk/lambda-integration-test-updater && yarn build+test

- name: Update Lambda Runtime Tests
run: |
cd tools/@aws-cdk/lambda-integration-test-updater
./bin/update-lambda-runtimestes-integ-testing
- name: Check for changes
id: git-check
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "changes=true" >> $GITHUB_OUTPUT
else
echo "changes=false" >> $GITHUB_OUTPUT
fi
- name: Commit & Push changes
if: steps.git-check.outputs.changes == 'true'
run: |
git config --global user.name 'aws-cdk-automation'
git config --global user.email 'aws-cdk-automation@users.noreply.github.com'
git add .
git commit -m "chore: update lambda runtime integration tests"
git push origin ${{ github.event.pull_request.head.ref }}
1 change: 1 addition & 0 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"tools/@aws-cdk/spec2cdk",
"tools/@aws-cdk/yarn-cling",
"tools/@aws-cdk/lazify",
"tools/@aws-cdk/lambda-integration-test-updater",
"scripts/@aws-cdk/script-tests"
],
"rejectCycles": true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"tools/@aws-cdk/spec2cdk",
"tools/@aws-cdk/yarn-cling",
"tools/@aws-cdk/lazify",
"tools/@aws-cdk/lambda-integration-test-updater",
"scripts/@aws-cdk/script-tests"
],
"nohoist": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { existsSync, promises as fs } from 'fs';
import * as querystring from 'node:querystring';
import * as os from 'os';
import * as path from 'path';
import {
Expand All @@ -23,6 +24,7 @@ import { PutObjectLockConfigurationCommand } from '@aws-sdk/client-s3';
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
import { AssumeRoleCommand, GetCallerIdentityCommand } from '@aws-sdk/client-sts';
import * as mockttp from 'mockttp';
import { CompletedRequest } from 'mockttp';
import {
cloneDirectory,
integTest,
Expand Down Expand Up @@ -2846,10 +2848,19 @@ integTest('requests go through a proxy when configured',
});
} finally {
await fs.rm(certDir, { recursive: true, force: true });
await proxyServer.stop();
}

// Checking that there was some interaction with the proxy
const requests = await endpoint.getSeenRequests();
expect(requests.length).toBeGreaterThan(0);
const actionsUsed = actions(await endpoint.getSeenRequests());
expect(actionsUsed).toContain('AssumeRole');
expect(actionsUsed).toContain('CreateChangeSet');
}),
);

function actions(requests: CompletedRequest[]): string[] {
return [...new Set(requests
.map(req => req.body.buffer.toString('utf-8'))
.map(body => querystring.decode(body))
.map(x => x.Action as string)
.filter(action => action != null))];
}

This file was deleted.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "746da84b10e215c552e68b6d2061024e4429f0386f43a35ef5e4d2940655692e.zip"
"S3Key": "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec.zip"
},
"Handler": "index.handler",
"Role": {
Expand Down Expand Up @@ -186,6 +186,14 @@
"DomainDescription.CloudFrontDistribution"
]
}
},
"CloudFrontEndpoint": {
"Value": {
"Fn::GetAtt": [
"UserPoolDomainD0EA232A",
"CloudFrontDistribution"
]
}
}
},
"Mappings": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ new CfnOutput(stack, 'Domain', {
new CfnOutput(stack, 'CloudFrontDomainName', {
value: domain.cloudFrontDomainName,
});

new CfnOutput(stack, 'CloudFrontEndpoint', {
value: domain.cloudFrontEndpoint,
});
Loading

0 comments on commit 1347482

Please sign in to comment.