Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): 1.69.0 #10958

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
649c50c
chore: forward merge master onto the 'v2-main' branch (#10848)
Oct 15, 2020
ce9ee50
chore(init-templates): bump up junit from 4.13 to 4.13.1 (#10860)
shivlaks Oct 15, 2020
b894e73
Merge branch 'master' into merge-back/1.68.0
mergify[bot] Oct 15, 2020
d76adbc
chore(merge-back): 1.68.0 (#10900)
mergify[bot] Oct 15, 2020
450becf
docs(lamba-event-sources): fix typos in readme (#10899)
blimmer Oct 15, 2020
3839796
chore(lambda-event-sources): fix typo in readme (#9959)
simonireilly Oct 16, 2020
895372f
feat(apigatewayv2): configure description for HttpApi (#10863)
iRoachie Oct 16, 2020
ddff369
chore: move v2 forward merge as a CodeBuild job (#10911)
Oct 16, 2020
9b2438a
fix(cli): failure if account cache is malformed (#10887)
rix0rrr Oct 16, 2020
650c23f
fix(apigateway): lambda integration does not recognize allowTestInvok…
wtho Oct 16, 2020
36fea28
docs(pipelines): add branch to GitHubSourceAction in README (#10907)
yattoni Oct 16, 2020
d943d26
chore: add "gen" target as a pre build script (#10648)
NetaNir Oct 17, 2020
2640d9a
chore(eks): relax cdk8s dependency to constructs + runtime validation…
iliapolo Oct 18, 2020
2f3a167
fix(cli): `cdk context --reset <number>` does not work (#10753)
diesal11 Oct 19, 2020
8ffabb4
feat(pipelines): temporarily disable self-mutation (#10466)
tomas-mazak Oct 19, 2020
62a2286
fix(apigateway): cannot configure stage for SpecRestApi (#10749)
alvyn279 Oct 19, 2020
ddff37c
chore: merge forward script fails when branch is already checked out …
Oct 19, 2020
fb54aad
chore(lambda): migrate all tests to jest (#10948)
Oct 19, 2020
43bc908
chore(deps): bump yargs from 16.0.3 to 16.1.0 (#10954)
dependabot-preview[bot] Oct 19, 2020
7639d5e
chore(release): 1.69.0
Oct 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
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
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

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

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