Skip to content

Commit

Permalink
Merge branch 'main' into corymhall/integ-runner/rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Mar 27, 2023
2 parents cf1c0dc + 20aeb0f commit 5324e53
Show file tree
Hide file tree
Showing 734 changed files with 12,867 additions and 2,266 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

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.70.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.69.0-alpha.0...v2.70.0-alpha.0) (2023-03-22)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **servicecatalogappregistry:** This commit contains destructive changes to the RAM Share.
Since the application RAM share name is calculated by the application construct, where one method is added. Integration test detects a breaking change where RAM share will be created. Integration test snapshot is updated to cater this destructive change.

### Features

* **servicecatalogappregistry:** add attribute groups to an application ([#24672](https://github.com/aws/aws-cdk/issues/24672)) ([7baffa2](https://github.com/aws/aws-cdk/commit/7baffa239a7904cd73ac73537101ed5bd40aa9a0))

## [2.69.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.68.0-alpha.0...v2.69.0-alpha.0) (2023-03-14)


Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

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.70.0](https://github.com/aws/aws-cdk/compare/v2.69.0...v2.70.0) (2023-03-22)


### Features

* **cfnspec:** cloudformation spec v116.0.0 ([#24662](https://github.com/aws/aws-cdk/issues/24662)) ([e8158af](https://github.com/aws/aws-cdk/commit/e8158af34eb6402c79edbc171746fb5501775c68))
* **cloudwatch:** added defaultInterval prop to cw-dashboard ([#24707](https://github.com/aws/aws-cdk/issues/24707)) ([d4717cf](https://github.com/aws/aws-cdk/commit/d4717cf035c9f7027d8081ea1f15a631044315e8))
* **ec2:** CFN-init support for systemd ([#24683](https://github.com/aws/aws-cdk/issues/24683)) ([f3fe8e1](https://github.com/aws/aws-cdk/commit/f3fe8e1c4348194f89b47a276e6c85328b1044fa))
* **ec2:** SSM sessions ([#24673](https://github.com/aws/aws-cdk/issues/24673)) ([9744a82](https://github.com/aws/aws-cdk/commit/9744a8295fab28f1e8c38a0b980935f7546990e6))
* **ecr:** add option to auto delete images upon ECR repository removal ([#24572](https://github.com/aws/aws-cdk/issues/24572)) ([7de5b00](https://github.com/aws/aws-cdk/commit/7de5b00dcf24c4f6721317860c7e42c485e3ca58)), closes [#15932](https://github.com/aws/aws-cdk/issues/15932) [#12618](https://github.com/aws/aws-cdk/issues/12618) [#15932](https://github.com/aws/aws-cdk/issues/15932)
* **elasticloadbalancing:** classic load balancer supports ec2 instances ([#24353](https://github.com/aws/aws-cdk/issues/24353)) ([25b6edd](https://github.com/aws/aws-cdk/commit/25b6edd9d83e4766a2cb064b8eb8e3c6198b4f53)), closes [#23500](https://github.com/aws/aws-cdk/issues/23500)
* **servicecatalogappregistry-alpha:** Introduce flag to control application sharing and association behavior for cross-account stacks ([#24408](https://github.com/aws/aws-cdk/issues/24408)) ([2167289](https://github.com/aws/aws-cdk/commit/2167289658e8f3431ec815c741277dc1be1aa110)), closes [aws-cdk/aws-servicecatalogappregistry/lib/aspects/stack-associator.ts#L91-L95](https://github.com/aws-cdk/aws-servicecatalogappregistry/lib/aspects/stack-associator.ts/issues/L91-L95)


### Bug Fixes

* **bootstrap:** remove Security Hub finding KMS.2 ([#24588](https://github.com/aws/aws-cdk/issues/24588)) ([274c3d5](https://github.com/aws/aws-cdk/commit/274c3d54dcc0b9534d1ede287fe3672ec9883dbe)), closes [/docs.aws.amazon.com/securityhub/latest/userguide/kms-controls.html#kms-2](https://github.com/aws//docs.aws.amazon.com/securityhub/latest/userguide/kms-controls.html/issues/kms-2)
* **cli:** no change deployment prints "hotswap deployment skipped" without hotswap flag ([#24602](https://github.com/aws/aws-cdk/issues/24602)) ([79151fd](https://github.com/aws/aws-cdk/commit/79151fd7f4916defeb1e17d3bcdbec1e119ec994))
* **cli:** user agent is reported as `undefined/undefined` ([#24663](https://github.com/aws/aws-cdk/issues/24663)) ([3e8d8d8](https://github.com/aws/aws-cdk/commit/3e8d8d8e1b9a88376a6460094dea0c08ce19742e))
* **eks:** fail to update cluster by disabling logging props ([#24688](https://github.com/aws/aws-cdk/issues/24688)) ([767cf93](https://github.com/aws/aws-cdk/commit/767cf93eb131c707f8243e8f3779dd3bad89271a))
* **sfn:** stop replacing JsonPath.DISCARD with `null` ([#24717](https://github.com/aws/aws-cdk/issues/24717)) ([413b643](https://github.com/aws/aws-cdk/commit/413b64347f333573b2a07150e87244bd4c11d264)), closes [#24593](https://github.com/aws/aws-cdk/issues/24593)
* **toolkit:** RWLock.acquireRead is not re-entrant ([#24702](https://github.com/aws/aws-cdk/issues/24702)) ([3b7431b](https://github.com/aws/aws-cdk/commit/3b7431b6ac27f8557c22a8959ae1ce431f6d2167))
* **WAFv2:** add patch to revert struct names ([#24651](https://github.com/aws/aws-cdk/issues/24651)) ([dfa09d1](https://github.com/aws/aws-cdk/commit/dfa09d133523f0457a9ab2369bde13b44c398c30)), closes [/github.com/aws/aws-cdk/commit/affe040c8443be074822254d1e75a28b264cd801#diff-827a2fd012e049c7ccedffa0360c12e7d967a173f36b8150de73ef6adc42ee4cL175-L357](https://github.com/aws//github.com/aws/aws-cdk/commit/affe040c8443be074822254d1e75a28b264cd801/issues/diff-827a2fd012e049c7ccedffa0360c12e7d967a173f36b8150de73ef6adc42ee4cL175-L357)

## [2.69.0](https://github.com/aws/aws-cdk/compare/v2.68.0...v2.69.0) (2023-03-14)


Expand Down
7 changes: 6 additions & 1 deletion allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,9 @@ strengthened:aws-cdk-lib.pipelines.ProduceActionOptions
# reverted a change that broke deployments for anyone using Triggers
removed:aws-cdk-lib.triggers.InvocationType
removed:aws-cdk-lib.triggers.TriggerProps.invocationType
removed:aws-cdk-lib.triggers.TriggerProps.timeout
removed:aws-cdk-lib.triggers.TriggerProps.timeout

# broken: it used to return a tuple type, that was incorrectly interpreted by jsii
change-return-type:aws-cdk-lib.aws_ec2.SecurityGroup.determineRuleScope
# broken only in non-JS/TS, where that was not previously usable
strengthened:aws-cdk-lib.aws_s3_deployment.BucketDeploymentProps
7 changes: 5 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ while [[ "${1:-}" != "" ]]; do
done

export PATH=$(npm bin):$PATH
export NODE_OPTIONS="--max-old-space-size=4096 --experimental-worker ${NODE_OPTIONS:-}"
export NODE_OPTIONS="--max-old-space-size=8196 --experimental-worker ${NODE_OPTIONS:-}"

if ! [ -x "$(command -v yarn)" ]; then
echo "yarn is not installed. Install it from here- https://yarnpkg.com/en/docs/install."
Expand Down Expand Up @@ -78,9 +78,12 @@ if [ "$run_tests" == "true" ]; then
runtarget="$runtarget+test"
fi

# Limit top-level concurrency to available CPUs - 1 to limit CPU load.
concurrency=$(node -p 'Math.max(1, require("os").cpus().length - 1)')

echo "============================================================================================="
echo "building..."
time lerna run $bail --stream $runtarget || fail
time lerna run $bail --stream --concurrency=$concurrency $runtarget || fail

if [ "$check_compat" == "true" ]; then
/bin/bash scripts/check-api-compatibility.sh
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.10",
"jest-junit": "^13.2.0",
"jsii-diff": "1.77.0",
"jsii-pacmak": "1.77.0",
"jsii-reflect": "1.77.0",
"jsii-rosetta": "v4.9-next",
"jsii-diff": "1.78.1",
"jsii-pacmak": "1.78.1",
"jsii-reflect": "1.78.1",
"jsii-rosetta": "~5.0.0",
"lerna": "^4.0.0",
"patch-package": "^6.5.1",
"semver": "^6.3.0",
"standard-version": "^9.5.0",
"typescript": "~3.9.10"
"typescript": "~4.9.5"
},
"resolutions": {
"colors": "1.4.0",
Expand Down Expand Up @@ -83,8 +83,6 @@
"@aws-cdk/assertions-alpha/fs-extra/**",
"@aws-cdk/assertions/fs-extra",
"@aws-cdk/assertions/fs-extra/**",
"@aws-cdk/aws-iot-actions-alpha/case",
"@aws-cdk/aws-iot-actions-alpha/case/**",
"@aws-cdk/aws-codebuild/yaml",
"@aws-cdk/aws-codebuild/yaml/**",
"@aws-cdk/aws-codepipeline-actions/case",
Expand All @@ -99,6 +97,8 @@
"@aws-cdk/aws-eks/yaml/**",
"@aws-cdk/aws-events-targets/aws-sdk",
"@aws-cdk/aws-events-targets/aws-sdk/**",
"@aws-cdk/aws-iot-actions-alpha/case",
"@aws-cdk/aws-iot-actions-alpha/case/**",
"@aws-cdk/aws-iot-actions/case",
"@aws-cdk/aws-iot-actions/case/**",
"@aws-cdk/aws-s3-deployment/case",
Expand All @@ -117,6 +117,8 @@
"@aws-cdk/core/ignore/**",
"@aws-cdk/core/minimatch",
"@aws-cdk/core/minimatch/**",
"@aws-cdk/core/table",
"@aws-cdk/core/table/**",
"@aws-cdk/cx-api/semver",
"@aws-cdk/cx-api/semver/**",
"@aws-cdk/pipelines/aws-sdk",
Expand Down
21 changes: 11 additions & 10 deletions packages/@aws-cdk-testing/cli-integ/lib/aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class AwsClients {
public async stackStatus(stackName: string): Promise<string | undefined> {
try {
return (await this.cloudFormation('describeStacks', { StackName: stackName })).Stacks?.[0].StackStatus;
} catch (e) {
} catch (e: any) {
if (isStackMissingError(e)) { return undefined; }
throw e;
}
Expand Down Expand Up @@ -113,7 +113,7 @@ export class AwsClients {
await this.s3('deleteBucket', {
Bucket: bucketName,
});
} catch (e) {
} catch (e: any) {
if (isBucketMissingError(e)) { return; }
throw e;
}
Expand All @@ -126,15 +126,16 @@ export class AwsClients {
* Create the correct client, do the call and resole the promise().
*/
async function awsCall<
A extends AWS.Service,
B extends keyof ServiceCalls<A>,
>(ctor: new (config: any) => A, config: any, call: B, request: First<ServiceCalls<A>[B]>): Promise<Second<ServiceCalls<A>[B]>> {
Svc extends AWS.Service,
Calls extends ServiceCalls<Svc>,
Call extends keyof Calls,
>(ctor: new (config: any) => Svc, config: any, call: Call, request: First<Calls[Call]>): Promise<Second<Calls[Call]>> {
const cfn = new ctor(config);
const response = cfn[call](request);
const response = ((cfn as any)[call] as any)(request);
try {
return response.promise();
} catch (e) {
const newErr = new Error(`${call}(${JSON.stringify(request)}): ${e.message}`);
} catch (e: any) {
const newErr = new Error(`${String(call)}(${JSON.stringify(request)}): ${e.message}`);
(newErr as any).code = e.code;
throw newErr;
}
Expand Down Expand Up @@ -210,7 +211,7 @@ export async function retry<A>(output: NodeJS.WritableStream, operation: string,
const ret = await block();
output.write(`💈 ${operation}: succeeded after ${i} attempts\n`);
return ret;
} catch (e) {
} catch (e: any) {
if (e.abort || Date.now() > deadline.getTime( )) {
throw new Error(`${operation}: did not succeed after ${i} attempts: ${e}`);
}
Expand Down Expand Up @@ -290,4 +291,4 @@ function chainableCredentials(region: string): AWS.Credentials | undefined {
}

return undefined;
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function integTest(
output.write(`${s}\n`);
},
});
} catch (e) {
} catch (e: any) {
process.stderr.write(`[INTEG TEST::${name}] Failed: ${e}\n`);
output.write(e.message);
output.write(e.stack);
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk-testing/cli-integ/lib/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export function rimraf(fsPath: string) {
} else {
fs.unlinkSync(fsPath);
}
} catch (e) {
} catch (e: any) {
// We will survive ENOENT
if (e.code !== 'ENOENT') { throw e; }
}
Expand All @@ -165,4 +165,4 @@ export function addToShellPath(x: string) {
}

process.env.PATH = parts.join(':');
}
}
12 changes: 6 additions & 6 deletions packages/@aws-cdk-testing/cli-integ/lib/staging/codeartifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class TestRepository {

// eslint-disable-next-line no-console
console.log('Deleted', this.repositoryName);
} catch (e) {
} catch (e: any) {
if (e.code !== 'ResourceNotFoundException') { throw e; }
// Okay
}
Expand Down Expand Up @@ -199,7 +199,7 @@ export class TestRepository {
try {
await this.codeArtifact.describeDomain({ domain: this.domain }).promise();
return true;
} catch (e) {
} catch (e: any) {
if (e.code !== 'ResourceNotFoundException') { throw e; }
return false;
}
Expand All @@ -209,7 +209,7 @@ export class TestRepository {
try {
await this.codeArtifact.describeRepository({ domain: this.domain, repository: name }).promise();
return true;
} catch (e) {
} catch (e: any) {
if (e.code !== 'ResourceNotFoundException') { throw e; }
return false;
}
Expand Down Expand Up @@ -246,7 +246,7 @@ async function retry<A>(block: () => Promise<A>) {
while (true) {
try {
return await block();
} catch (e) {
} catch (e: any) {
if (attempts-- === 0) { throw e; }
// eslint-disable-next-line no-console
console.debug(e.message);
Expand All @@ -261,7 +261,7 @@ async function retryThrottled<A>(block: () => Promise<A>) {
while (true) {
try {
return await block();
} catch (e) {
} catch (e: any) {
// eslint-disable-next-line no-console
console.debug(e.message);
if (e.code !== 'ThrottlingException') { throw e; }
Expand All @@ -279,4 +279,4 @@ export interface LoginInformation {
readonly mavenEndpoint: string;
readonly nugetEndpoint: string;
readonly pypiEndpoint: string;
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/with-aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function sanityCheck(aws: AwsClients) {
try {
await aws.account();
sanityChecked = true;
} catch (e) {
} catch (e: any) {
sanityChecked = false;
throw new Error(`AWS credentials probably not configured, got error: ${e.message}`);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/with-sam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function withSamIntegrationCdkApp<A extends TestContext & AwsContext>(blo
});
}
await block(fixture);
} catch (e) {
} catch (e: any) {
// We survive certain cases involving gopkg.in
if (errorCausedByGoPkg(e.message)) {
return;
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk-testing/cli-integ/lib/xpmutex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class XpMutex {
// Acquire lock by being the one to create the file
try {
return await this.writePidFile('wx'); // Fails if the file already exists
} catch (e) {
} catch (e: any) {
if (e.code !== 'EEXIST') { throw e; }
}

Expand Down Expand Up @@ -159,7 +159,7 @@ export class XpMutex {
let contents;
try {
contents = await fs.readFile(this.fileName, { encoding: 'utf-8' });
} catch (e) {
} catch (e: any) {
if (e.code === 'ENOENT') { return undefined; }
throw e;
}
Expand Down Expand Up @@ -194,7 +194,7 @@ async function fileExists(fileName: string) {
try {
await fs.stat(fileName);
return true;
} catch (e) {
} catch (e: any) {
if (e.code === 'ENOENT') { return false; }
throw e;
}
Expand All @@ -204,7 +204,7 @@ function processExists(pid: number) {
try {
process.kill(pid, 0);
return true;
} catch (e) {
} catch {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ integTest('deploy with role', withDefaultFixture(async (fixture) => {
});
}
await fixture.aws.iam('deleteRole', { RoleName: roleName });
} catch (e) {
} catch (e: any) {
if (e.message.indexOf('cannot be found') > -1) { return; }
throw e;
}
Expand Down
3 changes: 1 addition & 2 deletions packages/@aws-cdk/alexa-ask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"jsii": "v4.9-next"
"@types/jest": "^27.5.2"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/@aws-cdk/assertions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
"description": "An assertion library for use with CDK Apps",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"typesVersions": {
"<=3.9": {
"*": [
".types-compat/ts3.9/*"
]
}
},
"scripts": {
"build": "cdk-build",
"watch": "cdk-watch",
Expand Down
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-accessanalyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"jsii": "v4.9-next"
"@types/jest": "^27.5.2"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-amazonmq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"jsii": "v4.9-next"
"@types/jest": "^27.5.2"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ export abstract class ResourceHandler {
console.log(JSON.stringify(x, undefined, 2));
}

protected abstract async onCreate(): Promise<AmplifyJobId>;
protected abstract async onDelete(): Promise<void>;
protected abstract async onUpdate(): Promise<AmplifyJobId>;
protected abstract async isCreateComplete(): Promise<IsCompleteResponse>;
protected abstract async isDeleteComplete(): Promise<IsCompleteResponse>;
protected abstract async isUpdateComplete(): Promise<IsCompleteResponse>;
protected abstract onCreate(): Promise<AmplifyJobId>;
protected abstract onDelete(): Promise<void>;
protected abstract onUpdate(): Promise<AmplifyJobId>;
protected abstract isCreateComplete(): Promise<IsCompleteResponse>;
protected abstract isDeleteComplete(): Promise<IsCompleteResponse>;
protected abstract isUpdateComplete(): Promise<IsCompleteResponse>;
}
Loading

0 comments on commit 5324e53

Please sign in to comment.