Skip to content

Commit 36deb38

Browse files
authored
Merge branch 'main' into issue_8307
2 parents f5066af + f4c19c7 commit 36deb38

File tree

1,757 files changed

+316420
-1646
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,757 files changed

+316420
-1646
lines changed

.devcontainer/Dockerfile

+10-7
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

+4-4
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

+1-1
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

CHANGELOG.v2.alpha.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
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.171.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.171.0-alpha.0...v2.171.1-alpha.0) (2024-11-27)
6+
57
## [2.171.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.170.0-alpha.0...v2.171.0-alpha.0) (2024-11-25)
68

79
## [2.170.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.169.0-alpha.0...v2.170.0-alpha.0) (2024-11-22)
@@ -80,7 +82,7 @@ All notable changes to this project will be documented in this file. See [standa
8082

8183
### Bug Fixes
8284

83-
* **location:** remove base class from PlaceIndex class ([#31287](https://github.com/aws/aws-cdk/issues/31287)) ([bc67866](https://github.com/aws/aws-cdk/commit/bc67866f579c401556d427eb150bcd118d69bd17)), closes [#30711](https://github.com/aws/aws-cdk/issues/30711) [#30682](https://github.com/aws/aws-cdk/issues/30682)
85+
* **location:** remove base class from PlaceIndex class ([#31287](https://github.com/aws/aws-cdk/issues/31287)) ([bc67866](https://github.com/aws/aws-cdk/commit/bc67866f579c401556d427eb150bcd118d69bd17)), closes [#30711](https://github.com/aws/aws-cdk/issues/30711) [#30682](https://github.com/aws/aws-cdk/issues/30682)
8486
* **scheduler-alpha:** scheduler input always get transformed to string with extra double quotes ([#31894](https://github.com/aws/aws-cdk/issues/31894)) ([186b8ab](https://github.com/aws/aws-cdk/commit/186b8abfab8452b31cba13b56998242f63c43159))
8587
* **scheduler-alpha:** too many KMS permissions granted ([#31923](https://github.com/aws/aws-cdk/issues/31923)) ([06678a3](https://github.com/aws/aws-cdk/commit/06678a39e029582af14c8b021f946b9ce9cac9be)), closes [#31785](https://github.com/aws/aws-cdk/issues/31785)
8688

@@ -148,10 +150,10 @@ All notable changes to this project will be documented in this file. See [standa
148150

149151
### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
150152

151-
* **kinesisfirehose-destinations:** the `logging` and `logGroup` properties in `DestinationLoggingProps` have been removed and replaced with a single optional property `loggingConfig` which accepts a class of type `LoggingConfig`.
153+
* **kinesisfirehose-destinations:** the `logging` and `logGroup` properties in `DestinationLoggingProps` have been removed and replaced with a single optional property `loggingConfig` which accepts a class of type `LoggingConfig`.
152154

153155
#### Details
154-
Combine the `logging` and `logGroup` properties into a single new optional property called `loggingConfig` which accepts a class of type `LoggingConfig`.
156+
Combine the `logging` and `logGroup` properties into a single new optional property called `loggingConfig` which accepts a class of type `LoggingConfig`.
155157

156158
`LoggingConfig` is an abstract class which can be instantiated through either an instance of `EnableLogging` or `DisableLogging` which can be used in the following 3 ways:
157159

@@ -222,7 +224,7 @@ unit + integ test
222224

223225
### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
224226

225-
* **kinesisfirehose-alpha:** `encryptionKey` property is removed and `encryption` property type has changed from the `StreamEncryption` enum to the `StreamEncryption` class.
227+
* **kinesisfirehose-alpha:** `encryptionKey` property is removed and `encryption` property type has changed from the `StreamEncryption` enum to the `StreamEncryption` class.
226228

227229
To pass in a KMS key for the customer managed key case, use `StreamEncryption.customerManagedKey(key)`
228230

@@ -234,12 +236,12 @@ StreamEncryption.awsOwnedKey()
234236
StreamEncryption.customerManagedKey(key?: IKey)
235237
```
236238

237-
This makes it so it's not longer possible to pass in a key when the encryption type is AWS owned or unencrypted. The `key` is an optional parameter in `StreamEncryption.customerManagedKey(key?: IKey)` so following the previous behaviour, if a key is provided it will be used, otherwise a key will be created for the user.
239+
This makes it so it's not longer possible to pass in a key when the encryption type is AWS owned or unencrypted. The `key` is an optional parameter in `StreamEncryption.customerManagedKey(key?: IKey)` so following the previous behaviour, if a key is provided it will be used, otherwise a key will be created for the user.
238240
### Description of how you validated changes
239241

240-
Generated templates do not change so behaviour remains the same.
242+
Generated templates do not change so behaviour remains the same.
241243

242-
Updated integ/unit tests.
244+
Updated integ/unit tests.
243245

244246
### Checklist
245247
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

CHANGELOG.v2.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
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.171.1](https://github.com/aws/aws-cdk/compare/v2.171.0...v2.171.1) (2024-11-27)
6+
7+
8+
### Bug Fixes
9+
10+
* **cli:** lambda hotswap fails if `lambda:GetFunctionConfiguration` action is not allowed ([#32301](https://github.com/aws/aws-cdk/issues/32301)) ([a073e93](https://github.com/aws/aws-cdk/commit/a073e9302dbd4213275e99c86476ab8152af7caf)), closes [/github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdatedV2.ts#L10](https://github.com/aws//github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdatedV2.ts/issues/L10) [/github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdated.ts#L13](https://github.com/aws//github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdated.ts/issues/L13)
11+
512
## [2.171.0](https://github.com/aws/aws-cdk/compare/v2.170.0...v2.171.0) (2024-11-25)
613

714

CONTRIBUTORS.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ Shout out to our top contributors!
1616
- [TheRealAmazonKendra](https://github.com/TheRealAmazonKendra)
1717
- [comcalvi](https://github.com/comcalvi)
1818
- [madeline-k](https://github.com/madeline-k)
19-
- [NetaNir](https://github.com/NetaNir)
19+
- [mazyu36](https://github.com/mazyu36)
2020
- [go-to-k](https://github.com/go-to-k)
21+
- [NetaNir](https://github.com/NetaNir)
2122
- [robertd](https://github.com/robertd)
22-
- [mazyu36](https://github.com/mazyu36)
23+
- [badmintoncryer](https://github.com/badmintoncryer)
2324
- [MrArnoldPalmer](https://github.com/MrArnoldPalmer)
2425
- [lpizzinidev](https://github.com/lpizzinidev)
2526
- [peterwoodworth](https://github.com/peterwoodworth)
26-
- [badmintoncryer](https://github.com/badmintoncryer)
27-
- [colifran](https://github.com/colifran)
2827
- [msambol](https://github.com/msambol)
28+
- [colifran](https://github.com/colifran)
2929
- [watany-dev](https://github.com/watany-dev)
3030

3131

32-
_Last updated: Fri, 01 Nov 24 00:12:22 +0000_
32+
_Last updated: Sun, 01 Dec 24 00:14:16 +0000_

aws-cdk.code-workspace

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"folders": [{ "path": "." }],
33
"settings": {
4+
"files.insertFinalNewline": true,
45
"jest.jestCommandLine": "node_modules/.bin/jest",
56
"jest.autoRun": "off",
67
"jest.virtualFolders": [

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@
107107
"@aws-cdk/aws-cognito/punycode/**",
108108
"@aws-cdk/aws-ecr-assets/minimatch",
109109
"@aws-cdk/aws-ecr-assets/minimatch/**",
110-
"@aws-cdk/aws-eks/semver",
111-
"@aws-cdk/aws-eks/semver/**",
112-
"@aws-cdk/aws-eks/yaml",
113-
"@aws-cdk/aws-eks/yaml/**",
110+
"@aws-cdk/aws-eks-v2-alpha/semver",
111+
"@aws-cdk/aws-eks-v2-alpha/semver/**",
112+
"@aws-cdk/aws-eks-v2-alpha/yaml",
113+
"@aws-cdk/aws-eks-v2-alpha/yaml/**",
114114
"@aws-cdk/aws-events-targets/aws-sdk",
115115
"@aws-cdk/aws-events-targets/aws-sdk/**",
116116
"@aws-cdk/aws-iot-actions-alpha/case",
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import * as path from 'path';
22
// eslint-disable-next-line no-console
3-
console.log(path.resolve(__dirname, '..'));
3+
console.log(path.resolve(__dirname, '..'));

packages/@aws-cdk-testing/cli-integ/lib/eventually.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ const eventually = async <T>(call: () => Promise<T>, options?: EventuallyOptions
3939
throw new Error('An unexpected error has occurred.');
4040
};
4141

42-
export default eventually;
42+
export default eventually;

packages/@aws-cdk-testing/cli-integ/lib/github.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ export async function fetchPreviousVersion(token: string, options?: {
4040
if (previousMVRelease) { return previousMVRelease; }
4141

4242
throw new Error(`Unable to find previous version given ${JSON.stringify(options)}`);
43-
};
43+
};

packages/@aws-cdk-testing/cli-integ/lib/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export * from './with-aws';
1010
export * from './with-cdk-app';
1111
export * from './with-packages';
1212
export * from './with-temporary-directory';
13-
export * from './resources';
13+
export * from './resources';

packages/@aws-cdk-testing/cli-integ/lib/lists.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export function chunk<A>(n: number, xs: A[]): A[][] {
66
}
77

88
return ret;
9-
}
9+
}

packages/@aws-cdk-testing/cli-integ/lib/memoize.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export function memoize0<A>(fn: () => Promise<A>): () => Promise<A> {
1111
}
1212
return promise;
1313
};
14-
}
14+
}

packages/@aws-cdk-testing/cli-integ/lib/package-sources/release-source.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ export class ReleasePackageSource implements IPackageSource {
7878
return `${frameworkVersion}-alpha.0`;
7979
}
8080
}
81-
}
81+
}

packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-tools/npm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ child.once('close', code => {
4545
if (code) {
4646
process.exitCode = code;
4747
}
48-
});
48+
});

packages/@aws-cdk-testing/cli-integ/lib/package-sources/source.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ export interface IPackageSource {
3232
* Not all tests will respect this.
3333
*/
3434
requestedAlphaVersion(): string;
35-
}
35+
}

packages/@aws-cdk-testing/cli-integ/lib/package-sources/subprocess.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export function packageSourceInSubprocess(): IPackageSource {
1212
case 'release': return new ReleasePackageSource();
1313
default: throw new Error(`Unrecognized package source: ${process.env.PACKAGE_SOURCE}`);
1414
}
15-
}
15+
}

packages/@aws-cdk-testing/cli-integ/lib/staging/npm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ async function writeNpmLoginToken(usageDir: UsageDir, endpoint: string, token: s
5959
return rcFile;
6060
}
6161

62-
// Environment variable, .npmrc in same directory as package.json or in home dir
62+
// Environment variable, .npmrc in same directory as package.json or in home dir

packages/@aws-cdk-testing/cli-integ/lib/staging/nuget.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ async function writeNuGetConfigFile(filename: string, login: LoginInformation) {
7272
</configuration>`);
7373
}
7474

75-
// NuGet.Config in current directory
75+
// NuGet.Config in current directory

packages/@aws-cdk-testing/cli-integ/lib/staging/parallel-shell.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ export async function parallelShell<A>(
4848
}));
4949

5050
await q.onEmpty();
51-
}
51+
}

packages/@aws-cdk-testing/cli-integ/lib/staging/pypi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ export async function uploadPythonPackages(packages: string[], login: LoginInfor
4747
}
4848
return 'fail';
4949
});
50-
}
50+
}

packages/@aws-cdk-testing/cli-integ/lib/staging/usage-dir.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ export class UsageDir {
9696
// eslint-disable-next-line no-console
9797
console.log(` source ${this.directory}/activate.bash`);
9898
}
99-
}
99+
}

packages/@aws-cdk-testing/cli-integ/lib/with-packages.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export function withPackages<A extends object>(block: (context: A & PackageConte
1212
packages: packageSourceInSubprocess(),
1313
});
1414
};
15-
}
15+
}

packages/@aws-cdk-testing/cli-integ/lib/with-timeout.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ export function withTimeout<A>(seconds: number, block: (x: A) => Promise<void>)
3030
timeOut,
3131
]);
3232
};
33-
}
33+
}

packages/@aws-cdk-testing/cli-integ/test/resource-pool.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ function* range(n: number) {
8484
for (let i = 0; i < n; i++) {
8585
yield i;
8686
}
87-
}
87+
}

packages/@aws-cdk-testing/cli-integ/test/xpmutex.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ function waitFor(pred: () => boolean): Promise<void> {
4242
}
4343
}, 5);
4444
});
45-
}
45+
}

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

+14-3
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/cli-integ/tests/init-python/init-python.integtest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '..
1717
await shell.shell([`${venvPath}/bin/pytest`], { modEnv: venv });
1818
await shell.shell(['cdk', 'synth'], { modEnv: venv });
1919
})));
20-
});
20+
});

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ async function removeDevDependencies(context: TemporaryDirectoryContext) {
6363
const pj = JSON.parse(await fs.readFile(filename, { encoding: 'utf-8' }));
6464
delete pj.devDependencies;
6565
await fs.writeFile(filename, JSON.stringify(pj, undefined, 2), { encoding: 'utf-8' });
66-
}
66+
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ integTest('typescript init lib', withTemporaryDirectory(withPackages(async (cont
1010
await shell.shell(['npm', 'ls']); // this will fail if we have unmet peer dependencies
1111
await shell.shell(['npm', 'run', 'build']);
1212
await shell.shell(['npm', 'run', 'test']);
13-
})));
13+
})));

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.cors.handler/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ exports.handler = async (evt: any) => {
88
'Access-Control-Allow-Origin': '*',
99
},
1010
};
11-
};
11+
};

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-default-apikey.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ new integ.IntegTest(app, 'LambdaTest', {
2929
testCases: [stack],
3030
});
3131

32-
app.synth();
32+
app.synth();

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.import-deploymentstage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ new integ.IntegTest(app, 'specrestapi-import-deployment-stage', {
7171
testCases: [stack],
7272
});
7373

74-
app.synth();
74+
app.synth();

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ const app = new cdk.App();
9292
const testCase = new Test(app, 'test-apigateway-spec-restapi');
9393
new IntegTest(app, 'apigateway-spec-restapi', {
9494
testCases: [testCase],
95-
});
95+
});

0 commit comments

Comments
 (0)