Skip to content

Commit

Permalink
Merge pull request #16311 from aws/v2/forward-merge-20210901
Browse files Browse the repository at this point in the history
chore: forward merge 'master' into 'v2-main'
  • Loading branch information
njlynch authored Sep 1, 2021
2 parents d50d087 + 77edbac commit ece11da
Show file tree
Hide file tree
Showing 200 changed files with 8,677 additions and 4,535 deletions.
116 changes: 58 additions & 58 deletions .github/workflows/issue-label-assign.yml

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

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.

## [1.120.0](https://github.com/aws/aws-cdk/compare/v1.119.0...v1.120.0) (2021-08-26)


### Features

* **assertions:** queries and assertions against the Outputs and Mappings sections ([#15892](https://github.com/aws/aws-cdk/issues/15892)) ([90f95e1](https://github.com/aws/aws-cdk/commit/90f95e10f4dd9e4992731d6262dcfc767b65ab3f))
* **stepfunctions:** add support to heartbeat error inside catch block ([#16078](https://github.com/aws/aws-cdk/issues/16078)) ([2372b3c](https://github.com/aws/aws-cdk/commit/2372b3c360d13fb0224fc981a7bb1ae318581265)), closes [#16084](https://github.com/aws/aws-cdk/issues/16084)
* **cfnspec:** cloudformation spec v40.0.0 ([#16183](https://github.com/aws/aws-cdk/issues/16183)) ([b059124](https://github.com/aws/aws-cdk/commit/b059124b238e27751217cbdaaa01c38b00e80fc9))
* **cloudwatch:** add support for cross-account alarms ([#16007](https://github.com/aws/aws-cdk/issues/16007)) ([e547ba0](https://github.com/aws/aws-cdk/commit/e547ba0d1491af0abe703132fa06fe786ffd7070)), closes [#15959](https://github.com/aws/aws-cdk/issues/15959)
* **codecommit:** make Repository a source for CodeStar Notifications ([#15739](https://github.com/aws/aws-cdk/issues/15739)) ([ae34d4a](https://github.com/aws/aws-cdk/commit/ae34d4a69a5073d8f0175b5282fa8bf92139fab5))
* **cognito:** user pools - device tracking ([#16055](https://github.com/aws/aws-cdk/issues/16055)) ([64019bb](https://github.com/aws/aws-cdk/commit/64019bbf090e156261feb626a5a4bd7ff4f26545)), closes [#15013](https://github.com/aws/aws-cdk/issues/15013)
* **docdb:** cluster - deletion protection ([#15216](https://github.com/aws/aws-cdk/issues/15216)) ([0f7beb2](https://github.com/aws/aws-cdk/commit/0f7beb29be18d809052f4d46e415a0394c9299ab))
* **ecs:** add support for Bottlerocket on ARM64 ([#15454](https://github.com/aws/aws-cdk/issues/15454)) ([cd280a8](https://github.com/aws/aws-cdk/commit/cd280a8f4f46eb50be3a25d80c00a807881832c4)), closes [#14466](https://github.com/aws/aws-cdk/issues/14466)
* **lambda:** nodejs14.x supports inline code ([#16131](https://github.com/aws/aws-cdk/issues/16131)) ([305f683](https://github.com/aws/aws-cdk/commit/305f683e86cca221705c0138572faa38043396eb))
* **rds:** support 's3export' for Postgres database instances ([#16124](https://github.com/aws/aws-cdk/issues/16124)) ([1d54a45](https://github.com/aws/aws-cdk/commit/1d54a456cd5e2ff65251097f9a684e1ac200cc52)), closes [#14546](https://github.com/aws/aws-cdk/issues/14546) [#10370](https://github.com/aws/aws-cdk/issues/10370) [#14546](https://github.com/aws/aws-cdk/issues/14546)
* **s3-deployment:** exclude and include filters ([#16054](https://github.com/aws/aws-cdk/issues/16054)) ([d42e89e](https://github.com/aws/aws-cdk/commit/d42e89e01034dcba08c8f8ac0390a743143c4531)), closes [#14362](https://github.com/aws/aws-cdk/issues/14362) [#14362](https://github.com/aws/aws-cdk/issues/14362)


### Bug Fixes

* **apigatewayv2:** http api - disallow empty string as domain name ([#16044](https://github.com/aws/aws-cdk/issues/16044)) ([9c39bcb](https://github.com/aws/aws-cdk/commit/9c39bcb970fc791e94d199b962cc006fca1a3320))
* **appsync:** addSubscription only allows for field type ([#16097](https://github.com/aws/aws-cdk/issues/16097)) ([000d151](https://github.com/aws/aws-cdk/commit/000d151bec2215aa530819c3cf2c8c432352fec3)), closes [#10078](https://github.com/aws/aws-cdk/issues/10078) [#16071](https://github.com/aws/aws-cdk/issues/16071)
* **cfnspec:** changes to resource-level documentation not supported ([#16170](https://github.com/aws/aws-cdk/issues/16170)) ([82e4b4f](https://github.com/aws/aws-cdk/commit/82e4b4f07be202e2d6c6afa4f9ed0d9d6146f0a8))
* **cli:** Python init template does not work in directory with '-' ([#15939](https://github.com/aws/aws-cdk/issues/15939)) ([3b2c790](https://github.com/aws/aws-cdk/commit/3b2c790c2b7d210868576540feab4e088376ab6c)), closes [#15938](https://github.com/aws/aws-cdk/issues/15938)
* **cli:** unknown command pytest in build container fails integration tests ([#16134](https://github.com/aws/aws-cdk/issues/16134)) ([0f7c0b4](https://github.com/aws/aws-cdk/commit/0f7c0b421327f1ffed28de79692191af187f23ca)), closes [#15939](https://github.com/aws/aws-cdk/issues/15939)
* **resourcegroups:** ResourceGroup not using TagType.STANDARD, causes deploy failure ([#16211](https://github.com/aws/aws-cdk/issues/16211)) ([cdee1af](https://github.com/aws/aws-cdk/commit/cdee1af03c34a1c08988e672bae6edc2538a8877)), closes [#12986](https://github.com/aws/aws-cdk/issues/12986)
* **s3:** bucket is not emptied before update when the name changes ([#16203](https://github.com/aws/aws-cdk/issues/16203)) ([b1d69d7](https://github.com/aws/aws-cdk/commit/b1d69d7b06cd2a2ae8f578e217bdf7fef50a0163)), closes [#14011](https://github.com/aws/aws-cdk/issues/14011)
* **ses:** drop spam rule appears in the incorrect order ([#16146](https://github.com/aws/aws-cdk/issues/16146)) ([677fedc](https://github.com/aws/aws-cdk/commit/677fedcc5351b8b5346970fac03e5e342f36265b)), closes [#16091](https://github.com/aws/aws-cdk/issues/16091)
* **sqs:** unable to import a FIFO queue when the queue ARN is a token ([#15976](https://github.com/aws/aws-cdk/issues/15976)) ([a1a65bc](https://github.com/aws/aws-cdk/commit/a1a65bc9a38b06ec51dff462e52b1beb8d421a56)), closes [#12466](https://github.com/aws/aws-cdk/issues/12466)
* **ssm:** StringParameter.fromStringParameterAttributes cannot accept version as a numeric Token ([#16048](https://github.com/aws/aws-cdk/issues/16048)) ([eb54cd4](https://github.com/aws/aws-cdk/commit/eb54cd416a48708898e30986058491e21125b2f7)), closes [#11913](https://github.com/aws/aws-cdk/issues/11913)
* **ec2:** fix vpc endpoint incorrect issue in China region ([#16139](https://github.com/aws/aws-cdk/issues/16139)) ([0d0db38](https://github.com/aws/aws-cdk/commit/0d0db38e3cdb557b4a641c5993068400847cc7df)), closes [#9864](https://github.com/aws/aws-cdk/issues/9864)
* **eks:** insecure kubeconfig warning ([#16063](https://github.com/aws/aws-cdk/issues/16063)) ([82dd282](https://github.com/aws/aws-cdk/commit/82dd2822a86431d0aa0be896550d421810b80c67)), closes [#14560](https://github.com/aws/aws-cdk/issues/14560)



## [1.119.0](https://github.com/aws/aws-cdk/compare/v1.118.0...v1.119.0) (2021-08-17)


Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.6",
"jest-junit": "^12.2.0",
"jsii-diff": "^1.31.0",
"jsii-pacmak": "^1.31.0",
"jsii-reflect": "^1.31.0",
"jsii-rosetta": "^1.31.0",
"jsii-diff": "^1.34.0",
"jsii-pacmak": "^1.34.0",
"jsii-reflect": "^1.34.0",
"jsii-rosetta": "^1.34.0",
"lerna": "^4.0.0",
"patch-package": "^6.4.7",
"standard-version": "^9.3.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/app-delivery/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ tsconfig.json
coverage
!.eslintrc.js

junit.xml
junit.xml
!jest.config.js
3 changes: 2 additions & 1 deletion packages/@aws-cdk/app-delivery/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ tsconfig.json
**/cdk.out
junit.xml
test/
!*.lit.ts
!*.lit.ts
jest.config.js
2 changes: 2 additions & 0 deletions packages/@aws-cdk/app-delivery/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const baseConfig = require('../../../tools/cdk-build-tools/config/jest.config');
module.exports = baseConfig;
6 changes: 5 additions & 1 deletion packages/@aws-cdk/app-delivery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@
},
"devDependencies": {
"@aws-cdk/aws-s3": "0.0.0",
"@types/jest": "^26.0.24",
"@types/nodeunit": "^0.0.32",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"fast-check": "^2.17.0",
"nodeunit": "^0.11.3",
"jest": "^26.6.3",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
},
Expand All @@ -82,6 +83,9 @@
"url": "https://aws.amazon.com",
"organization": true
},
"cdk-build": {
"jest": true
},
"keywords": [
"aws",
"cdk"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, haveResource, haveResourceLike, isSuperObject } from '@aws-cdk/assert-internal';
import '@aws-cdk/assert-internal/jest';
import { isSuperObject } from '@aws-cdk/assert-internal';
import * as cfn from '@aws-cdk/aws-cloudformation';
import * as codebuild from '@aws-cdk/aws-codebuild';
import * as codepipeline from '@aws-cdk/aws-codepipeline';
Expand All @@ -10,7 +11,6 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema';
import * as cdk from '@aws-cdk/core';
import * as constructs from 'constructs';
import * as fc from 'fast-check';
import * as nodeunit from 'nodeunit';
import { PipelineDeployStackAction } from '../lib/pipeline-deploy-stack-action';

interface SelfUpdatingPipeline {
Expand All @@ -19,14 +19,14 @@ interface SelfUpdatingPipeline {
}
const accountId = fc.array(fc.integer(0, 9), 12, 12).map(arr => arr.join());

export = nodeunit.testCase({
'rejects cross-environment deployment'(test: nodeunit.Test) {
describe('pipeline deploy stack action', () => {
test('rejects cross-environment deployment', () => {
fc.assert(
fc.property(
accountId, accountId,
(pipelineAccount, stackAccount) => {
fc.pre(pipelineAccount !== stackAccount);
test.throws(() => {
expect(() => {
const app = new cdk.App();
const stack = new cdk.Stack(app, 'Test', { env: { account: pipelineAccount } });
const pipeline = new codepipeline.Pipeline(stack, 'Pipeline');
Expand All @@ -43,20 +43,20 @@ export = nodeunit.testCase({
stack: new cdk.Stack(app, 'DeployedStack', { env: { account: stackAccount } }),
adminPermissions: false,
}));
}, 'Cross-environment deployment is not supported');
}).toThrow('Cross-environment deployment is not supported');
},
),
);
test.done();
},

'rejects createRunOrder >= executeRunOrder'(test: nodeunit.Test) {
});

test('rejects createRunOrder >= executeRunOrder', () => {
fc.assert(
fc.property(
fc.integer(1, 999), fc.integer(1, 999),
(createRunOrder, executeRunOrder) => {
fc.pre(createRunOrder >= executeRunOrder);
test.throws(() => {
expect(() => {
const app = new cdk.App();
const stack = new cdk.Stack(app, 'Test');
const pipeline = new codepipeline.Pipeline(stack, 'Pipeline');
Expand All @@ -74,13 +74,13 @@ export = nodeunit.testCase({
stack: new cdk.Stack(app, 'DeployedStack'),
adminPermissions: false,
}));
}, 'createChangeSetRunOrder must be < executeChangeSetRunOrder');
}).toThrow(/createChangeSetRunOrder .* must be < executeChangeSetRunOrder/);
},
),
);
test.done();
},
'users can supply CloudFormation capabilities'(test: nodeunit.Test) {

});
test('users can supply CloudFormation capabilities', () => {
const pipelineStack = getTestStack();
const stackWithNoCapability = new cdk.Stack(undefined, 'NoCapStack',
{ env: { account: '123456789012', region: 'us-east-1' } });
Expand Down Expand Up @@ -134,57 +134,57 @@ export = nodeunit.testCase({
capabilities: [cfn.CloudFormationCapabilities.ANONYMOUS_IAM, cfn.CloudFormationCapabilities.AUTO_EXPAND],
adminPermissions: false,
}));
expect(pipelineStack).to(haveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
expect(pipelineStack).toHaveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
Configuration: {
StackName: 'TestStack',
ActionMode: 'CHANGE_SET_REPLACE',
Capabilities: 'CAPABILITY_NAMED_IAM',
},
})));
expect(pipelineStack).to(haveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
}));
expect(pipelineStack).toHaveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
Configuration: {
StackName: 'AnonymousIAM',
ActionMode: 'CHANGE_SET_REPLACE',
Capabilities: 'CAPABILITY_IAM',
},
})));
expect(pipelineStack).notTo(haveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
}));
expect(pipelineStack).not.toHaveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
Configuration: {
StackName: 'NoCapStack',
ActionMode: 'CHANGE_SET_REPLACE',
Capabilities: 'CAPABILITY_NAMED_IAM',
},
})));
expect(pipelineStack).notTo(haveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
}));
expect(pipelineStack).not.toHaveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
Configuration: {
StackName: 'NoCapStack',
ActionMode: 'CHANGE_SET_REPLACE',
Capabilities: 'CAPABILITY_IAM',
},
})));
expect(pipelineStack).to(haveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
}));
expect(pipelineStack).toHaveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
Configuration: {
StackName: 'NoCapStack',
ActionMode: 'CHANGE_SET_REPLACE',
},
})));
expect(pipelineStack).to(haveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
}));
expect(pipelineStack).toHaveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
Configuration: {
StackName: 'AutoExpand',
ActionMode: 'CHANGE_SET_REPLACE',
Capabilities: 'CAPABILITY_AUTO_EXPAND',
},
})));
expect(pipelineStack).to(haveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
}));
expect(pipelineStack).toHaveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
Configuration: {
StackName: 'AnonymousIAMAndAutoExpand',
ActionMode: 'CHANGE_SET_REPLACE',
Capabilities: 'CAPABILITY_IAM,CAPABILITY_AUTO_EXPAND',
},
})));
test.done();
},
'users can use admin permissions'(test: nodeunit.Test) {
}));

});
test('users can use admin permissions', () => {
const pipelineStack = getTestStack();
const selfUpdatingStack = createSelfUpdatingStack(pipelineStack);

Expand All @@ -195,7 +195,7 @@ export = nodeunit.testCase({
input: selfUpdatingStack.synthesizedApp,
adminPermissions: true,
}));
expect(pipelineStack).to(haveResource('AWS::IAM::Policy', {
expect(pipelineStack).toHaveResource('AWS::IAM::Policy', {
PolicyDocument: {
Version: '2012-10-17',
Statement: [
Expand Down Expand Up @@ -249,17 +249,17 @@ export = nodeunit.testCase({
},
],
},
}));
expect(pipelineStack).to(haveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
});
expect(pipelineStack).toHaveResource('AWS::CodePipeline::Pipeline', hasPipelineAction({
Configuration: {
StackName: 'TestStack',
ActionMode: 'CHANGE_SET_REPLACE',
Capabilities: 'CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND',
},
})));
test.done();
},
'users can supply a role for deploy action'(test: nodeunit.Test) {
}));

});
test('users can supply a role for deploy action', () => {
const pipelineStack = getTestStack();
const selfUpdatingStack = createSelfUpdatingStack(pipelineStack);

Expand All @@ -275,10 +275,10 @@ export = nodeunit.testCase({
role,
});
selfUpdateStage.addAction(deployAction);
test.same(deployAction.deploymentRole, role);
test.done();
},
'users can specify IAM permissions for the deploy action'(test: nodeunit.Test) {
expect(deployAction.deploymentRole).toEqual(role);

});
test('users can specify IAM permissions for the deploy action', () => {
// GIVEN //
const pipelineStack = getTestStack();

Expand Down Expand Up @@ -312,7 +312,7 @@ export = nodeunit.testCase({
}));

// THEN //
expect(pipelineStack).to(haveResource('AWS::IAM::Policy', {
expect(pipelineStack).toHaveResource('AWS::IAM::Policy', {
PolicyDocument: {
Version: '2012-10-17',
Statement: [
Expand Down Expand Up @@ -379,10 +379,10 @@ export = nodeunit.testCase({
Ref: 'CodePipelineDeployChangeSetRoleF9F2B343',
},
],
}));
test.done();
},
'rejects stacks with assets'(test: nodeunit.Test) {
});

});
test('rejects stacks with assets', () => {
fc.assert(
fc.property(
fc.integer(1, 5),
Expand All @@ -394,21 +394,21 @@ export = nodeunit.testCase({
deployedStack.node.addMetadata(cxschema.ArtifactMetadataEntryType.ASSET, {});
}

test.throws(() => {
expect(() => {
new PipelineDeployStackAction({
changeSetName: 'ChangeSet',
input: new codepipeline.Artifact(),
stack: deployedStack,
adminPermissions: false,
});
}, /Cannot deploy the stack DeployedStack because it references/);
}).toThrow(/Cannot deploy the stack DeployedStack because it references/);
},
),
);
test.done();
},

'allows overriding the ChangeSet and Execute action names'(test: nodeunit.Test) {
});

test('allows overriding the ChangeSet and Execute action names', () => {
const stack = getTestStack();
const selfUpdatingPipeline = createSelfUpdatingStack(stack);
selfUpdatingPipeline.pipeline.addStage({
Expand All @@ -424,7 +424,7 @@ export = nodeunit.testCase({
],
});

expect(stack).to(haveResourceLike('AWS::CodePipeline::Pipeline', {
expect(stack).toHaveResourceLike('AWS::CodePipeline::Pipeline', {
Stages: [
{},
{},
Expand All @@ -440,10 +440,10 @@ export = nodeunit.testCase({
],
},
],
}));
});


test.done();
},
});
});

class FakeAction implements codepipeline.IAction {
Expand Down
Loading

0 comments on commit ece11da

Please sign in to comment.