Skip to content

Commit

Permalink
Merge pull request aws#10964 from aws/bump/1.69.0
Browse files Browse the repository at this point in the history
chore(release): 1.69.0
  • Loading branch information
NetaNir authored Oct 19, 2020
2 parents a6a3f46 + 426b7db commit 2b474b9
Show file tree
Hide file tree
Showing 202 changed files with 3,739 additions and 3,913 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/auto-approve-v2-merge-forward.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Automatically approve PRs that merge master forward to v2-main
#
# Only does approvals! mergify takes care of the actual merge.
name: Auto-approve forward merges onto v2-main
on:
pull_request:
types:
- labeled
- opened
- ready_for_review
- reopened
- synchronize
- unlabeled
- unlocked

jobs:
approve:
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v2.0.0
if: >
github.event.pull_request.user.login == 'aws-cdk-automation'
&& github.event.pull_request.base.ref == 'v2-main'
&& contains(github.event.pull_request.labels.*.name, 'pr/forward-merge')
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
17 changes: 17 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,20 @@ pull_request_rules:
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=validate-pr
- name: automatic merge of v2 forward merges
actions:
comment:
message: Forward merge successful!
merge:
method: merge
strict: smart+fasttrack
strict_method: merge
commit_message: title+body
conditions:
- label~=forward-merge
- -label~=(blocked|do-not-merge)
- -merged
- -closed
- author~=aws-cdk-automation
- "#approved-reviews-by>=1"
- status-success~=AWS CodeBuild us-east-1
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

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.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
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.69.0"
}
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
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class LambdaIntegration extends AwsIntegration {
});

this.handler = handler;
this.enableTest = options.allowTestInvoke === undefined ? true : false;
this.enableTest = options.allowTestInvoke === undefined ? true : options.allowTestInvoke;
}

public bind(method: Method): IntegrationConfig {
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-apigateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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::ApiGateway",
Expand Down
59 changes: 59 additions & 0 deletions packages/@aws-cdk/aws-apigateway/test/test.domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,4 +443,63 @@ export = {
test.done();
},

'base path mapping configures stage for RestApi creation'(test: Test) {
// GIVEN
const stack = new Stack();
new apigw.RestApi(stack, 'restApiWithStage', {
domainName: {
domainName: 'example.com',
certificate: acm.Certificate.fromCertificateArn(stack, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'),
endpointType: apigw.EndpointType.REGIONAL,
},
}).root.addMethod('GET');

// THEN
expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', {
'DomainName': {
'Ref': 'restApiWithStageCustomDomainC4749625',
},
'RestApiId': {
'Ref': 'restApiWithStageD4F931D0',
},
'Stage': {
'Ref': 'restApiWithStageDeploymentStageprodC82A6648',
},
}));

test.done();
},

'base path mapping configures stage for SpecRestApi creation'(test: Test) {
// GIVEN
const stack = new Stack();

const definition = {
key1: 'val1',
};

new apigw.SpecRestApi(stack, 'specRestApiWithStage', {
apiDefinition: apigw.ApiDefinition.fromInline(definition),
domainName: {
domainName: 'example.com',
certificate: acm.Certificate.fromCertificateArn(stack, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'),
endpointType: apigw.EndpointType.REGIONAL,
},
}).root.addMethod('GET');

// THEN
expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', {
'DomainName': {
'Ref': 'specRestApiWithStageCustomDomain8A36A5C9',
},
'RestApiId': {
'Ref': 'specRestApiWithStageC1492575',
},
'Stage': {
'Ref': 'specRestApiWithStageDeploymentStageprod2D3037ED',
},
}));

test.done();
},
};
38 changes: 38 additions & 0 deletions packages/@aws-cdk/aws-apigateway/test/test.lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,44 @@ export = {
test.done();
},

'"allowTestInvoke" set to true allows calling the API from the test UI'(test: Test) {
// GIVEN
const stack = new cdk.Stack();
const fn = new lambda.Function(stack, 'Handler', {
runtime: lambda.Runtime.NODEJS_10_X,
code: lambda.Code.fromInline('foo'),
handler: 'index.handler',
});

const api = new apigateway.RestApi(stack, 'api');

// WHEN
const integ = new apigateway.LambdaIntegration(fn, { allowTestInvoke: true });
api.root.addMethod('GET', integ);

// THEN
expect(stack).to(haveResource('AWS::Lambda::Permission', {
SourceArn: {
'Fn::Join': [
'',
[
'arn:',
{ Ref: 'AWS::Partition' },
':execute-api:',
{ Ref: 'AWS::Region' },
':',
{ Ref: 'AWS::AccountId' },
':',
{ Ref: 'apiC8550315' },
'/test-invoke-stage/GET/',
],
],
},
}));

test.done();
},

'"proxy" can be used to disable proxy mode'(test: Test) {
// GIVEN
const stack = new cdk.Stack();
Expand Down
7 changes: 7 additions & 0 deletions packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ export interface HttpApiProps {
*/
readonly apiName?: string;

/**
* The description of the API.
* @default - none
*/
readonly description?: string;

/**
* An integration that will be configured on the catch-all route ($default).
* @default - none
Expand Down Expand Up @@ -267,6 +273,7 @@ export class HttpApi extends HttpApiBase {
name: this.httpApiName,
protocolType: 'HTTP',
corsConfiguration,
description: props?.description,
};

const resource = new CfnApi(this, 'Resource', apiProps);
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-apigatewayv2/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::ApiGatewayV2",
Expand Down
13 changes: 13 additions & 0 deletions packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,17 @@ describe('HttpApi', () => {
expect(countMetric.statistic).toEqual(statistic);
});
});

test('description is set', () => {
const stack = new Stack();
new HttpApi(stack, 'api', {
description: 'My Api',
});

expect(stack).toHaveResource('AWS::ApiGatewayV2::Api', {
Name: 'api',
ProtocolType: 'HTTP',
Description: 'My Api',
});
});
});
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-appconfig/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::AppConfig",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-appflow/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::AppFlow",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-applicationautoscaling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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::ApplicationAutoScaling",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-applicationinsights/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::ApplicationInsights",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-appmesh/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::AppMesh",
Expand Down
Loading

0 comments on commit 2b474b9

Please sign in to comment.