Skip to content

Commit

Permalink
Merge branch 'main' into automation/yarn-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinZZ authored Nov 30, 2024
2 parents f2aca7a + 6931632 commit a3c395e
Show file tree
Hide file tree
Showing 848 changed files with 37,480 additions and 1,146 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
16 changes: 9 additions & 7 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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.

## [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)

## [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)

## [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)
Expand Down Expand Up @@ -80,7 +82,7 @@ All notable changes to this project will be documented in this file. See [standa

### Bug Fixes

* **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)
* **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)
* **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))
* **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)

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

### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **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`.
* **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`.

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

`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:

Expand Down Expand Up @@ -222,7 +224,7 @@ unit + integ test

### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

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

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

Expand All @@ -234,12 +236,12 @@ StreamEncryption.awsOwnedKey()
StreamEncryption.customerManagedKey(key?: IKey)
```

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.
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.
### Description of how you validated changes

Generated templates do not change so behaviour remains the same.
Generated templates do not change so behaviour remains the same.

Updated integ/unit tests.
Updated integ/unit tests.

### Checklist
- [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)
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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.

## [2.171.1](https://github.com/aws/aws-cdk/compare/v2.171.0...v2.171.1) (2024-11-27)


### Bug Fixes

* **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)

## [2.171.0](https://github.com/aws/aws-cdk/compare/v2.170.0...v2.171.0) (2024-11-25)


Expand Down
1 change: 1 addition & 0 deletions aws-cdk.code-workspace
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"folders": [{ "path": "." }],
"settings": {
"files.insertFinalNewline": true,
"jest.jestCommandLine": "node_modules/.bin/jest",
"jest.autoRun": "off",
"jest.virtualFolders": [
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/bin/test-root.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import * as path from 'path';
// eslint-disable-next-line no-console
console.log(path.resolve(__dirname, '..'));
console.log(path.resolve(__dirname, '..'));
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/eventually.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ const eventually = async <T>(call: () => Promise<T>, options?: EventuallyOptions
throw new Error('An unexpected error has occurred.');
};

export default eventually;
export default eventually;
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ export async function fetchPreviousVersion(token: string, options?: {
if (previousMVRelease) { return previousMVRelease; }

throw new Error(`Unable to find previous version given ${JSON.stringify(options)}`);
};
};
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export * from './with-aws';
export * from './with-cdk-app';
export * from './with-packages';
export * from './with-temporary-directory';
export * from './resources';
export * from './resources';
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/lists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export function chunk<A>(n: number, xs: A[]): A[][] {
}

return ret;
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/memoize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export function memoize0<A>(fn: () => Promise<A>): () => Promise<A> {
}
return promise;
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ export class ReleasePackageSource implements IPackageSource {
return `${frameworkVersion}-alpha.0`;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ child.once('close', code => {
if (code) {
process.exitCode = code;
}
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ export interface IPackageSource {
* Not all tests will respect this.
*/
requestedAlphaVersion(): string;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export function packageSourceInSubprocess(): IPackageSource {
case 'release': return new ReleasePackageSource();
default: throw new Error(`Unrecognized package source: ${process.env.PACKAGE_SOURCE}`);
}
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/staging/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ async function writeNpmLoginToken(usageDir: UsageDir, endpoint: string, token: s
return rcFile;
}

// Environment variable, .npmrc in same directory as package.json or in home dir
// Environment variable, .npmrc in same directory as package.json or in home dir
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/staging/nuget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ async function writeNuGetConfigFile(filename: string, login: LoginInformation) {
</configuration>`);
}

// NuGet.Config in current directory
// NuGet.Config in current directory
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ export async function parallelShell<A>(
}));

await q.onEmpty();
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/staging/pypi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ export async function uploadPythonPackages(packages: string[], login: LoginInfor
}
return 'fail';
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ export class UsageDir {
// eslint-disable-next-line no-console
console.log(` source ${this.directory}/activate.bash`);
}
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/with-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export function withPackages<A extends object>(block: (context: A & PackageConte
packages: packageSourceInSubprocess(),
});
};
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/with-timeout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ export function withTimeout<A>(seconds: number, block: (x: A) => Promise<void>)
timeOut,
]);
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ function* range(n: number) {
for (let i = 0; i < n; i++) {
yield i;
}
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/test/xpmutex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ function waitFor(pred: () => boolean): Promise<void> {
}
}, 5);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '..
await shell.shell([`${venvPath}/bin/pytest`], { modEnv: venv });
await shell.shell(['cdk', 'synth'], { modEnv: venv });
})));
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ async function removeDevDependencies(context: TemporaryDirectoryContext) {
const pj = JSON.parse(await fs.readFile(filename, { encoding: 'utf-8' }));
delete pj.devDependencies;
await fs.writeFile(filename, JSON.stringify(pj, undefined, 2), { encoding: 'utf-8' });
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ integTest('typescript init lib', withTemporaryDirectory(withPackages(async (cont
await shell.shell(['npm', 'ls']); // this will fail if we have unmet peer dependencies
await shell.shell(['npm', 'run', 'build']);
await shell.shell(['npm', 'run', 'test']);
})));
})));
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ exports.handler = async (evt: any) => {
'Access-Control-Allow-Origin': '*',
},
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ new integ.IntegTest(app, 'LambdaTest', {
testCases: [stack],
});

app.synth();
app.synth();
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ new integ.IntegTest(app, 'specrestapi-import-deployment-stage', {
testCases: [stack],
});

app.synth();
app.synth();
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ const app = new cdk.App();
const testCase = new Test(app, 'test-apigateway-spec-restapi');
new IntegTest(app, 'apigateway-spec-restapi', {
testCases: [testCase],
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ new IntegTest(app, 'aws-apigateway-stepfunctions-startexecution-without-default-
],
});

app.synth();
app.synth();
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ new IntegTest(app, 'aws-apigateway-stepfunctions-startexecution', {
],
});

app.synth();
app.synth();
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const handler = async (event: AWSLambda.APIGatewayProxyEventV2) => {
return {
isAuthorized: key === '123',
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const handler = async () => {
'Content-Type': 'application/json',
},
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ export const handler = async (event: any, _context: any = {}): Promise<any> => {
} else {
throw new Error('Unauthorized');
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ integ.assertions.httpApiCall(httpApi.apiEndpoint + '/thirdroute').expect(Expecte
integ.assertions.httpApiCall(httpApi.apiEndpoint + '/thirdroute/subroute').expect(ExpectedResult.objectLike({
body: 'success-hit-third-lambda',
status: 200,
}));
}));
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ function lambdaProxyEndpoint(s: Stack): HttpApi {
return new HttpApi(s, 'LambdaProxyApi', {
defaultIntegration: new HttpLambdaIntegration('DefaultIntegration', handler),
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ const endpoint = new HttpApi(stack, 'LambdaProxyApi', {

new CfnOutput(stack, 'Endpoint', {
value: endpoint.url!,
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ httpApi.addRoutes({
new integ.IntegTest(app, 'stepfunctions-integration-integ-test', {
testCases: [stack],
});
app.synth();
app.synth();
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ new WebSocketStage(

new IntegTest(app, 'Integ', { testCases: [stack] });

app.synth();
app.synth();
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ new apigw.WebSocketApi(stack, 'MyWebsocketApi', {
apiKeySelectionExpression: apigw.WebSocketApiKeySelectionExpression.HEADER_X_API_KEY,
});

app.synth();
app.synth();
Loading

0 comments on commit a3c395e

Please sign in to comment.