Skip to content

Commit

Permalink
Merge branch 'master' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
PatMyron authored Oct 26, 2020
2 parents e2bf02b + 575e47e commit 224d8b8
Show file tree
Hide file tree
Showing 346 changed files with 7,927 additions and 7,963 deletions.
4 changes: 4 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pull_request_rules:
commit_message: title+body
conditions:
- base!=release
- -base~=^v2
- -title~=(WIP|wip)
- -label~=(blocked|do-not-merge|no-squash|two-approvers)
- -merged
Expand All @@ -41,6 +42,7 @@ pull_request_rules:
commit_message: title+body
conditions:
- base!=release
- -base~=^v2
- -title~=(WIP|wip)
- label~=two-approvers
- -label~=(blocked|do-not-merge|no-squash)
Expand All @@ -64,6 +66,7 @@ pull_request_rules:
strict_method: merge
commit_message: title+body
conditions:
- -base~=^v2
- -title~=(WIP|wip)
- -label~=(blocked|do-not-merge)
# Only if no-squash is set
Expand Down Expand Up @@ -129,6 +132,7 @@ pull_request_rules:
strict_method: merge
commit_message: title+body
conditions:
- base=v2-main
- label~=forward-merge
- -label~=(blocked|do-not-merge)
- -merged
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,47 @@

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.70.0](https://github.com/aws/aws-cdk/compare/v1.69.0...v1.70.0) (2020-10-23)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **cognito:** the `UserPoolIdentityProviderBase` abstract class has been removed. Use the `UserPoolIdentityProvider*` classes directly.

### Features

* **cloudfront:** brotli compression support ([#10950](https://github.com/aws/aws-cdk/issues/10950)) ([dd81e77](https://github.com/aws/aws-cdk/commit/dd81e77e6ad606c2e76e01de1c7d38b762357d26)), closes [#10947](https://github.com/aws/aws-cdk/issues/10947)
* **cloudfront-origins:** move cloudfront-origins to Developer Preview ([#11005](https://github.com/aws/aws-cdk/issues/11005)) ([6956aad](https://github.com/aws/aws-cdk/commit/6956aadd6043499d8d55ca2d1a8ee65a91ac1bc6)), closes [#10831](https://github.com/aws/aws-cdk/issues/10831)
* **codebuild:** add COMMIT_MESSAGE support for webhook FilterGroup ([#11011](https://github.com/aws/aws-cdk/issues/11011)) ([fd8bce3](https://github.com/aws/aws-cdk/commit/fd8bce3d1409fd66877ca7530f8e74d9d78e0b8a)), closes [#9033](https://github.com/aws/aws-cdk/issues/9033)
* **cognito:** Cognito User Pools is now in Generally Available (stable) ([#11003](https://github.com/aws/aws-cdk/issues/11003)) ([7435db8](https://github.com/aws/aws-cdk/commit/7435db853636628a60c8aa465481fc01136aa4a1))
* **events-targets:** add support for Kinesis Firehose as a target ([#10400](https://github.com/aws/aws-cdk/issues/10400)) ([b93cda6](https://github.com/aws/aws-cdk/commit/b93cda6f528e0e1d98b88ad8407620b8ef472125)), closes [#10349](https://github.com/aws/aws-cdk/issues/10349)
* **lambda-event-sources:** disable source mapping ([#10927](https://github.com/aws/aws-cdk/issues/10927)) ([f4f53a6](https://github.com/aws/aws-cdk/commit/f4f53a65e55d895338aecf8cb63637c6d265b929)), closes [#5750](https://github.com/aws/aws-cdk/issues/5750)


### Bug Fixes

* **cloudfront:** logging bucket uses global domain name ([#10945](https://github.com/aws/aws-cdk/issues/10945)) ([aa3f3fd](https://github.com/aws/aws-cdk/commit/aa3f3fdc92545157205e533e124412d0db08c575)), closes [#10923](https://github.com/aws/aws-cdk/issues/10923)
* **lambda-nodejs:** docker build is not working ([#10885](https://github.com/aws/aws-cdk/issues/10885)) ([191d7b7](https://github.com/aws/aws-cdk/commit/191d7b7706282812878e1aeed79d8f4b39d1f797)), closes [#10881](https://github.com/aws/aws-cdk/issues/10881)
* **ses-actions:** invalid action in policy statement created when using SES S3 action ([#11061](https://github.com/aws/aws-cdk/issues/11061)) ([5dc1d96](https://github.com/aws/aws-cdk/commit/5dc1d96e77ec2359a77aed7266c4e7769d04e084))
* **cognito:** reorganize identity providers structure so that UserPoolIdentityProviderBase is not exported ([#10925](https://github.com/aws/aws-cdk/issues/10925)) ([60f493c](https://github.com/aws/aws-cdk/commit/60f493c9a606162816c14149ea578341ea458a05))

## [1.69.0](https://github.com/aws/aws-cdk/compare/v1.68.0...v1.69.0) (2020-10-19)


### Features

* **apigatewayv2:** configure description for HttpApi ([#10863](https://github.com/aws/aws-cdk/issues/10863)) ([895372f](https://github.com/aws/aws-cdk/commit/895372fc8b027bd12d64450c429c04d8efdd27f4))
* **pipelines:** temporarily disable self-mutation ([#10466](https://github.com/aws/aws-cdk/issues/10466)) ([8ffabb4](https://github.com/aws/aws-cdk/commit/8ffabb4325d2853f8650f991706eccfe233b2c74))


### Bug Fixes

* **apigateway:** cannot configure stage for SpecRestApi ([#10749](https://github.com/aws/aws-cdk/issues/10749)) ([62a2286](https://github.com/aws/aws-cdk/commit/62a2286f6dc46059160daa3c7466e712dad9f136)), closes [#10300](https://github.com/aws/aws-cdk/issues/10300)
* **apigateway:** lambda integration does not recognize allowTestInvoke ([#10828](https://github.com/aws/aws-cdk/issues/10828)) ([650c23f](https://github.com/aws/aws-cdk/commit/650c23f1fe9e87a7b1eb521faf57c7ed341d0eb6)), closes [#7605](https://github.com/aws/aws-cdk/issues/7605) [#7604](https://github.com/aws/aws-cdk/issues/7604)
* **cli:** `cdk context --reset <number>` does not work ([#10753](https://github.com/aws/aws-cdk/issues/10753)) ([2f3a167](https://github.com/aws/aws-cdk/commit/2f3a167797e60fd2df6c83bc2f3906ddc8eb8966)), closes [#3033](https://github.com/aws/aws-cdk/issues/3033) [#10619](https://github.com/aws/aws-cdk/issues/10619)
* **cli:** failure if account cache is malformed ([#10887](https://github.com/aws/aws-cdk/issues/10887)) ([9b2438a](https://github.com/aws/aws-cdk/commit/9b2438a6e78fc7a9622e79b1435ea6f8b76d98f7))
* **lambda-python:** asset hashes changed ([#10959](https://github.com/aws/aws-cdk/issues/10959)) ([b8de264](https://github.com/aws/aws-cdk/commit/b8de264af75aed11e14fb715f40d6d2e41d5233e)), closes [#10958](https://github.com/aws/aws-cdk/issues/10958) [#10957](https://github.com/aws/aws-cdk/issues/10957)

## [1.68.0](https://github.com/aws/aws-cdk/compare/v1.67.0...v1.68.0) (2020-10-15)


Expand Down
2 changes: 2 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ removed:@aws-cdk/cdk-assets-schema.FileAssetPackaging
changed-type:@aws-cdk/aws-codedeploy.IServerDeploymentGroup.autoScalingGroups
changed-type:@aws-cdk/aws-codedeploy.ServerDeploymentGroup.autoScalingGroups

changed-type:@aws-cdk/aws-rds.Credentials.secret

# We were leaking L1 types in L2 APIs, which now have changed required -> optional
# when ECS moved to the CloudFormation Registry spec.
change-return-type:@aws-cdk/aws-ecs.ContainerDefinition.renderContainerDefinition
Expand Down
10 changes: 5 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ done
export PATH=$(npm bin):$PATH
export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}"

if ! [ -x "$(command -v yarn)" ]; then
echo "yarn is not installed. Install it from here- https://yarnpkg.com/en/docs/install."
exit 1
fi

echo "============================================================================================="
echo "installing..."
yarn install --frozen-lockfile --network-timeout 1000000
Expand Down Expand Up @@ -65,11 +70,6 @@ rm -rf $BUILD_INDICATOR
export MERKLE_BUILD_CACHE=$(mktemp -d)
trap "rm -rf $MERKLE_BUILD_CACHE" EXIT

if ! [ -x "$(command -v yarn)" ]; then
echo "yarn is not installed. Install it from here- https://yarnpkg.com/en/docs/install."
exit 1
fi

echo "============================================================================================="
echo "building..."
time lerna run $bail --stream $runtarget || fail
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"tools/*"
],
"rejectCycles": "true",
"version": "1.68.0"
"version": "1.70.0"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"conventional-changelog-cli": "^2.1.0",
"fs-extra": "^9.0.1",
"graceful-fs": "^4.2.4",
"jest-junit": "^11.1.0",
"jest-junit": "^12.0.0",
"jsii-diff": "^1.13.0",
"jsii-pacmak": "^1.13.0",
"jsii-rosetta": "^1.13.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
"jest": "^25.5.4",
"jest": "^26.6.1",
"nodeunit": "^0.11.3",
"pkglint": "0.0.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/alexa-ask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"cfn2ts": "cfn2ts",
"build+test+package": "npm run build+test && npm run package",
"build+test": "npm run build && npm test",
"compat": "cdk-compat"
"compat": "cdk-compat",
"gen": "cfn2ts"
},
"cdk-build": {
"cloudformation": "Alexa::ASK",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/app-delivery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw
# Replacement recommended

This library has been deprecated. We recommend you use the
[@aws-cdk/pipelines](https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines.html) module instead.
[@aws-cdk/pipelines](https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines-readme.html) module instead.


### Limitations
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/app-delivery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@types/nodeunit": "^0.0.31",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"fast-check": "^2.4.0",
"fast-check": "^2.6.0",
"nodeunit": "^0.11.3",
"pkglint": "0.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^26.0.14",
"@types/jest": "^26.0.15",
"cdk-build-tools": "0.0.0",
"jest": "^26.4.2",
"jest": "^26.6.1",
"pkglint": "0.0.0",
"ts-jest": "^26.4.1"
"ts-jest": "^26.4.2"
},
"dependencies": {
"@aws-cdk/cloud-assembly-schema": "0.0.0",
Expand All @@ -37,7 +37,7 @@
"peerDependencies": {
"@aws-cdk/core": "0.0.0",
"constructs": "^3.0.4",
"jest": "^26.4.2"
"jest": "^26.6.1"
},
"repository": {
"url": "https://github.com/aws/aws-cdk.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"cdk-integ-tools": "0.0.0",
"nodeunit": "^0.11.3",
"pkglint": "0.0.0",
"sinon": "^9.1.0",
"sinon": "^9.2.0",
"ts-mock-imports": "^1.3.0"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/assets/test/test.staging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export = {

test.deepEqual(staging.sourceHash, '2f37f937c51e2c191af66acf9b09f548926008ec68c575bd2ee54b6e997c0e00');
test.deepEqual(staging.sourcePath, sourcePath);
test.deepEqual(stack.resolve(staging.stagedPath), 'asset.2f37f937c51e2c191af66acf9b09f548926008ec68c575bd2ee54b6e997c0e00');
test.deepEqual(staging.relativeStagedPath(stack), 'asset.2f37f937c51e2c191af66acf9b09f548926008ec68c575bd2ee54b6e997c0e00');
test.done();
},

Expand All @@ -31,7 +31,7 @@ export = {

test.deepEqual(staging.sourceHash, '2f37f937c51e2c191af66acf9b09f548926008ec68c575bd2ee54b6e997c0e00');
test.deepEqual(staging.sourcePath, sourcePath);
test.deepEqual(stack.resolve(staging.stagedPath), sourcePath);
test.deepEqual(staging.stagedPath, sourcePath);
test.done();
},

Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-accessanalyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"cfn2ts": "cfn2ts",
"compat": "cdk-compat",
"build+test": "npm run build && npm test",
"build+test+package": "npm run build+test && npm run package"
"build+test+package": "npm run build+test && npm run package",
"gen": "cfn2ts"
},
"cdk-build": {
"cloudformation": "AWS::AccessAnalyzer",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-acmpca/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"cfn2ts": "cfn2ts",
"build+test+package": "npm run build+test && npm run package",
"build+test": "npm run build && npm test",
"compat": "cdk-compat"
"compat": "cdk-compat",
"gen": "cfn2ts"
},
"cdk-build": {
"cloudformation": "AWS::ACMPCA",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-amazonmq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"cfn2ts": "cfn2ts",
"build+test+package": "npm run build+test && npm run package",
"build+test": "npm run build && npm test",
"compat": "cdk-compat"
"compat": "cdk-compat",
"gen": "cfn2ts"
},
"cdk-build": {
"cloudformation": "AWS::AmazonMQ",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"cfn2ts": "cfn2ts",
"build+test": "npm run build && npm test",
"build+test+package": "npm run build+test && npm run package",
"compat": "cdk-compat"
"compat": "cdk-compat",
"gen": "cfn2ts"
},
"cdk-build": {
"cloudformation": "AWS::Amplify",
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-apigateway/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ nyc.config.js
.LAST_PACKAGE
*.snk
!.eslintrc.js
!jest.config.js

junit.xml
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-apigateway/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dist

tsconfig.json
.eslintrc.js
jest.config.js

# exclude cdk artifacts
**/cdk.out
Expand Down
10 changes: 10 additions & 0 deletions packages/@aws-cdk/aws-apigateway/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const baseConfig = require('cdk-build-tools/config/jest.config');
module.exports = {
...baseConfig,
coverageThreshold: {
global: {
branches: 80,
statements: 60,
},
},
};
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-apigateway/lib/base-path-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Resource, Token } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { CfnBasePathMapping } from './apigateway.generated';
import { IDomainName } from './domain-name';
import { IRestApi, RestApi } from './restapi';
import { IRestApi, RestApiBase } from './restapi';
import { Stage } from './stage';

export interface BasePathMappingOptions {
Expand Down Expand Up @@ -55,7 +55,7 @@ export class BasePathMapping extends Resource {

// if restApi is an owned API and it has a deployment stage, map all requests
// to that stage. otherwise, the stage will have to be specified in the URL.
const stage = props.stage ?? (props.restApi instanceof RestApi
const stage = props.stage ?? (props.restApi instanceof RestApiBase
? props.restApi.deploymentStage
: undefined);

Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-apigateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@
"cfn2ts": "cfn2ts",
"build+test+package": "npm run build+test && npm run package",
"build+test": "npm run build && npm test",
"compat": "cdk-compat"
"compat": "cdk-compat",
"gen": "cfn2ts"
},
"cdk-build": {
"cloudformation": "AWS::ApiGateway",
"env": {
"AWSLINT_BASE_CONSTRUCT": true
}
},
"jest": true
},
"keywords": [
"aws",
Expand All @@ -71,11 +73,9 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"@types/nodeunit": "^0.0.31",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
"nodeunit": "^0.11.3",
"pkglint": "0.0.0"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Test } from 'nodeunit';
import '@aws-cdk/assert/jest';
import * as apigateway from '../lib';

export = {
'if jsonWithStandardFields method called with no parameter'(test: Test) {
describe('access log', () => {
test('if jsonWithStandardFields method called with no parameter', () => {
const testFormat = apigateway.AccessLogFormat.jsonWithStandardFields();
test.deepEqual(testFormat.toString(), '{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","user":"$context.identity.user","caller":"$context.identity.caller","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength"}');
expect(testFormat.toString()).toEqual('{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","user":"$context.identity.user","caller":"$context.identity.caller","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength"}');
});

test.done();
},

'if jsonWithStandardFields method called with all parameters false'(test: Test) {
test('if jsonWithStandardFields method called with all parameters false', () => {
const testFormat = apigateway.AccessLogFormat.jsonWithStandardFields({
caller: false,
httpMethod: false,
Expand All @@ -21,19 +19,15 @@ export = {
status: false,
user: false,
});
test.deepEqual(testFormat.toString(), '{"requestId":"$context.requestId"}');

test.done();
},
expect(testFormat.toString()).toEqual('{"requestId":"$context.requestId"}');
});

'if clf method called'(test: Test) {
test('if clf method called', () => {
const testFormat = apigateway.AccessLogFormat.clf();
test.deepEqual(testFormat.toString(), '$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId');
expect(testFormat.toString()).toEqual('$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId');
});

test.done();
},

'if custom method called'(test: Test) {
test('if custom method called', () => {
const testFormat = apigateway.AccessLogFormat.custom(JSON.stringify({
requestId: apigateway.AccessLogField.contextRequestId(),
sourceIp: apigateway.AccessLogField.contextIdentitySourceIp(),
Expand All @@ -44,8 +38,6 @@ export = {
email: apigateway.AccessLogField.contextAuthorizerClaims('email'),
},
}));
test.deepEqual(testFormat.toString(), '{"requestId":"$context.requestId","sourceIp":"$context.identity.sourceIp","method":"$context.httpMethod","accountId":"$context.identity.accountId","userContext":{"sub":"$context.authorizer.claims.sub","email":"$context.authorizer.claims.email"}}');

test.done();
},
};
expect(testFormat.toString()).toEqual('{"requestId":"$context.requestId","sourceIp":"$context.identity.sourceIp","method":"$context.httpMethod","accountId":"$context.identity.accountId","userContext":{"sub":"$context.authorizer.claims.sub","email":"$context.authorizer.claims.email"}}');
});
});
Loading

0 comments on commit 224d8b8

Please sign in to comment.