Skip to content

Commit

Permalink
Merge branch 'master' into lambda_profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] committed Aug 17, 2020
2 parents 24e7394 + 90de605 commit c259a2f
Show file tree
Hide file tree
Showing 590 changed files with 7,897 additions and 2,882 deletions.
1 change: 1 addition & 0 deletions .github/workflows/issue-label-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
{"keywords":["[@aws-cdk/aws-cloud9]","[aws-cloud9]","[cloud9]","[cloud 9]"],"labels":["@aws-cdk/aws-cloud9"],"assignees":["skinny85"]},
{"keywords":["[@aws-cdk/aws-cloudformation]","[aws-cloudformation]","[cloudformation]","[cloud formation]"],"labels":["@aws-cdk/aws-cloudformation"],"assignees":["eladb"]},
{"keywords":["[@aws-cdk/aws-cloudfront]","[aws-cloudfront]","[cloudfront]","[cloud front]"],"labels":["@aws-cdk/aws-cloudfront"],"assignees":["iliapolo"]},
{"keywords":["[@aws-cdk/aws-cloudfront-origins]","[aws-cloudfront-origins]","[cloudfront-origins]","[cloudfront origins]"],"labels":["@aws-cdk/aws-cloudfront-origins"],"assignees":["iliapolo"]},
{"keywords":["[@aws-cdk/aws-cloudtrail]","[aws-cloudtrail]","[cloudtrail]","[cloud trail]"],"labels":["@aws-cdk/aws-cloudtrail"],"assignees":["rix0rrr"]},
{"keywords":["[@aws-cdk/aws-cloudwatch]","[aws-cloudwatch]","[cloudwatch]","[cloud watch]"],"labels":["@aws-cdk/aws-cloudwatch"],"assignees":["rix0rrr"]},
{"keywords":["[@aws-cdk/aws-cloudwatch-actions]","[aws-cloudwatch-actions]","[cloudwatch-actions]","[cloudwatch actions]"],"labels":["@aws-cdk/aws-cloudwatch-actions"],"assignees":["rix0rrr"]},
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

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.59.0](https://github.com/aws/aws-cdk/compare/v1.58.0...v1.59.0) (2020-08-14)


### ⚠ BREAKING CHANGES

* **eks:** `cluster.addResource` was renamed to `cluster.addManifest` and `KubernetesResource` was renamed to `KubernetesManifest`
* **cloudfront:** (cloudfront) Changed IDs for Distributions (will cause resource replacement).

### Features

* **cfn-include:** allow passing Parameters to the included template ([#9543](https://github.com/aws/aws-cdk/issues/9543)) ([cb6de0a](https://github.com/aws/aws-cdk/commit/cb6de0adaec9e9942c7568939b33d7cb29cdeef2))
* **cfnspec:** cloudformation spec v16.3.0 ([#9452](https://github.com/aws/aws-cdk/issues/9452)) ([fb5068d](https://github.com/aws/aws-cdk/commit/fb5068ded6116b996b108037aa593684a2078351))
* **cloudfront:** Distribution support for logging, geo restrictions, http version and IPv6 ([#9635](https://github.com/aws/aws-cdk/issues/9635)) ([4c62702](https://github.com/aws/aws-cdk/commit/4c62702fe886a41e00a0be1fdf12bdb75a9ac968))
* **codebuild:** add support for GPU build images ([#8879](https://github.com/aws/aws-cdk/issues/8879)) ([b1b4cee](https://github.com/aws/aws-cdk/commit/b1b4ceee16a2483604fa97741ed2f7ddf340d10a)), closes [#8408](https://github.com/aws/aws-cdk/issues/8408)
* **codeguruprofiler:** add support for ComputePlatform in ProfilingGroup ([#9391](https://github.com/aws/aws-cdk/issues/9391)) ([5a64bc5](https://github.com/aws/aws-cdk/commit/5a64bc518868301eb4c5ce8d2964d62d4a79a764))
* **ec2:** CloudFormation-init support ([#9065](https://github.com/aws/aws-cdk/issues/9065)) ([014c13a](https://github.com/aws/aws-cdk/commit/014c13a78261b400404819549f6ff25d27b0c51d)), closes [#8788](https://github.com/aws/aws-cdk/issues/8788) [#9063](https://github.com/aws/aws-cdk/issues/9063) [#9063](https://github.com/aws/aws-cdk/issues/9063)
* **eks:** ability to query runtime information from the cluster ([#9535](https://github.com/aws/aws-cdk/issues/9535)) ([4bc8188](https://github.com/aws/aws-cdk/commit/4bc8188f38544f8e873728d908583ca8afe1714e)), closes [#8394](https://github.com/aws/aws-cdk/issues/8394)
* **synthetics:** Synthetics L2 Support ([#8824](https://github.com/aws/aws-cdk/issues/8824)) ([691b349](https://github.com/aws/aws-cdk/commit/691b349f55e8c8b52518ae40cac0ba3720c71ddf)), closes [#7687](https://github.com/aws/aws-cdk/issues/7687)


### Bug Fixes

* **cloudfront:** ensures origin groups are added with their own ID as a target ([#9593](https://github.com/aws/aws-cdk/issues/9593)) ([246842f](https://github.com/aws/aws-cdk/commit/246842f4f5259ca15b0c04fcda27e3fa37262594)), closes [#9561](https://github.com/aws/aws-cdk/issues/9561) [#9561](https://github.com/aws/aws-cdk/issues/9561)
* **cloudfront:** Escape hatch support for Distribution ([#9648](https://github.com/aws/aws-cdk/issues/9648)) ([cc229c2](https://github.com/aws/aws-cdk/commit/cc229c2c660e7e5be2255f031c001218c26b4752)), closes [#9620](https://github.com/aws/aws-cdk/issues/9620)
* **codepipeline:** S3 source Action with trigger=Events fails for bucketKey a Token ([#9575](https://github.com/aws/aws-cdk/issues/9575)) ([43214b4](https://github.com/aws/aws-cdk/commit/43214b4059aa7af40389d5d762c387d8e6093959)), closes [#9554](https://github.com/aws/aws-cdk/issues/9554)
* **ec2:** can't use imported Subnets in a SubnetSelection ([#9579](https://github.com/aws/aws-cdk/issues/9579)) ([1c4eae8](https://github.com/aws/aws-cdk/commit/1c4eae8e4052e7d56d944006577ee1d78785781a))

## [1.58.0](https://github.com/aws/aws-cdk/compare/v1.57.0...v1.58.0) (2020-08-12)


Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ how to use AWS. The AWS Construct Library aims to reduce the complexity and
glue-logic required when integrating various AWS services to achieve your goals
on AWS.

Modules in the AWS Construct Library are designated Experimental while we build
them; experimental modules may have breaking API changes in any release. After
a module is designated Stable, it adheres to [semantic versioning](https://semver.org/),
and only major releases can have breaking changes. Each module's stability designation
is available on its Overview page in the [AWS CDK API Reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-construct-library.html).
For more information, see [Versioning](https://docs.aws.amazon.com/cdk/latest/guide/reference.html#versioning)
in the CDK Developer Guide.

[CDK framework]: https://docs.aws.amazon.com/cdk/latest/guide/home.html
[constructs]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html
[stacks]: https://docs.aws.amazon.com/cdk/latest/guide/stacks.html
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"tools/*"
],
"rejectCycles": "true",
"version": "1.58.0"
"version": "1.59.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ function createSelfUpdatingStack(pipelineStack: cdk.Stack): SelfUpdatingPipeline
stageName: 'build',
actions: [buildAction],
});
return {synthesizedApp: buildOutput, pipeline};
return { synthesizedApp: buildOutput, pipeline };
}

function hasPipelineAction(expectedAction: any): (props: any) => boolean {
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"@types/jest": "^26.0.4",
"cdk-build-tools": "0.0.0",
"jest": "^25.5.4",
"jest": "^26.0.4",
"pkglint": "0.0.0",
"ts-jest": "^26.1.3"
},
Expand All @@ -36,7 +36,7 @@
},
"peerDependencies": {
"@aws-cdk/core": "0.0.0",
"jest": "^25.5.4",
"jest": "^26.0.4",
"constructs": "^3.0.2"
},
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/assert/test/assertions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ passingExample('expect <synthStack> to be a superset of <template> with paramete
// Added
new TestResource(stack, 'NewResource', { type: 'AWS::S3::Bucket' });
// Expected
new TestParameter(stack, 'TestParameterA', {type: parameterType});
new TestParameter(stack, 'TestParameterB', {type: parameterType, default: { Foo: 'Bar' } });
new TestParameter(stack, 'TestParameterA', { type: parameterType });
new TestParameter(stack, 'TestParameterB', { type: parameterType, default: { Foo: 'Bar' } });
});
const expected = {
Parameters: {
Expand Down Expand Up @@ -261,7 +261,7 @@ passingExample('expect <stack> to count resources like props - expected no resou
const synthStack = synthesizedStack(stack => {
new TestResource(stack, 'R1', { type: resourceType, properties: { parentId: 123, name: 'A' } });
new TestResource(stack, 'R2', { type: resourceType });
new TestResource(stack, 'R3', { type: 'Foo', properties: { parentId: 456} });
new TestResource(stack, 'R3', { type: 'Foo', properties: { parentId: 456 } });
});
cdkExpect(synthStack).to(countResourcesLike(resourceType, 0, { parentId: 456 }));
});
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assert/test/have-output.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ test('haveOutput should throw Error when none of outputName and exportName is pr

test('haveOutput should be able to handle complex exportName values', () => {
expect(synthStack).toHaveOutput({
exportName: {'Fn::Sub': '${AWS::StackName}-ComplexExportNameOutput'},
exportName: { 'Fn::Sub': '${AWS::StackName}-ComplexExportNameOutput' },
outputValue: {
'Fn::GetAtt': [
'ComplexOutputResource',
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
@@ -1,8 +1,8 @@
import * as fs from 'fs';
import * as path from 'path';
import { App, Stack } from '@aws-cdk/core';
import * as cxapi from '@aws-cdk/cx-api';
import * as fs from 'fs';
import { Test } from 'nodeunit';
import * as path from 'path';
import { Staging } from '../lib';

export = {
Expand Down
9 changes: 6 additions & 3 deletions packages/@aws-cdk/aws-amplify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,17 @@ app.addBranch('feature/next', {
});
```

### Automatically creating branches
Use the `autoBranchCreation` prop to automatically create new branches:
### Automatically creating and deleting branches
Use the `autoBranchCreation` and `autoBranchDeletion` props to control creation/deletion
of branches:

```ts
const amplifyApp = new amplify.App(this, 'MyApp', {
repository: 'https://github.com/<user>/<repo>',
oauthToken: cdk.SecretValue.secretsManager('my-github-token'),
autoBranchCreation: {
autoBranchCreation: { // Automatically connect branches that match a pattern set
patterns: ['feature/*', 'test/*']
}
autoBranchDeletion: true, // Automatically disconnect a branch when you delete a branch from your repository
});
```
11 changes: 10 additions & 1 deletion packages/@aws-cdk/aws-amplify/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ export interface AppProps {
*/
readonly autoBranchCreation?: AutoBranchCreation;

/**
* Automatically disconnect a branch in the Amplify Console when you delete a
* branch from your Git repository.
*
* @default false
*/
readonly autoBranchDeletion?: boolean;

/**
* The Basic Auth configuration. Use this to set password protection at an
* app level to all your branches.
Expand Down Expand Up @@ -210,11 +218,12 @@ export class App extends Resource implements IApp, iam.IGrantable {
buildSpec: props.autoBranchCreation.buildSpec && props.autoBranchCreation.buildSpec.toBuildSpec(),
enableAutoBranchCreation: true,
enableAutoBuild: props.autoBranchCreation.autoBuild === undefined ? true : props.autoBranchCreation.autoBuild,
environmentVariables: Lazy.anyValue({ produce: () => renderEnvironmentVariables(this.autoBranchEnvironmentVariables )}, { omitEmptyArray: true }), // eslint-disable-line max-len
environmentVariables: Lazy.anyValue({ produce: () => renderEnvironmentVariables(this.autoBranchEnvironmentVariables ) }, { omitEmptyArray: true }), // eslint-disable-line max-len
enablePullRequestPreview: props.autoBranchCreation.pullRequestPreview === undefined ? true : props.autoBranchCreation.pullRequestPreview,
pullRequestEnvironmentName: props.autoBranchCreation.pullRequestEnvironmentName,
stage: props.autoBranchCreation.stage,
},
enableBranchAutoDeletion: props.autoBranchDeletion,
basicAuthConfig: props.basicAuth && props.basicAuth.bind(this, 'AppBasicAuth'),
buildSpec: props.buildSpec && props.buildSpec.toBuildSpec(),
customRules: Lazy.anyValue({ produce: () => this.customRules }, { omitEmptyArray: true }),
Expand Down
17 changes: 17 additions & 0 deletions packages/@aws-cdk/aws-amplify/test/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,3 +371,20 @@ test('with auto branch creation', () => {
},
});
});

test('with auto branch deletion', () => {
// WHEN
new amplify.App(stack, 'App', {
sourceCodeProvider: new amplify.GitHubSourceCodeProvider({
owner: 'aws',
repository: 'aws-cdk',
oauthToken: SecretValue.plainText('secret'),
}),
autoBranchDeletion: true,
});

// THEN
expect(stack).toHaveResource('AWS::Amplify::App', {
EnableBranchAutoDeletion: true,
});
});
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-apigateway/lib/access-log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,10 @@ export class AccessLogFormat {
* Generate Common Log Format.
*/
public static clf(): AccessLogFormat {
const requester = [AccessLogField.contextIdentitySourceIp(), AccessLogField.contextIdentityCaller(), AccessLogField.contextIdentityUser() ].join(' ');
const requester = [AccessLogField.contextIdentitySourceIp(), AccessLogField.contextIdentityCaller(), AccessLogField.contextIdentityUser()].join(' ');
const requestTime = AccessLogField.contextRequestTime();
const request = [ AccessLogField.contextHttpMethod(), AccessLogField.contextResourcePath(), AccessLogField.contextProtocol()].join(' ');
const status = [ AccessLogField.contextStatus(), AccessLogField.contextResponseLength(), AccessLogField.contextRequestId()].join(' ');
const request = [AccessLogField.contextHttpMethod(), AccessLogField.contextResourcePath(), AccessLogField.contextProtocol()].join(' ');
const status = [AccessLogField.contextStatus(), AccessLogField.contextResponseLength(), AccessLogField.contextRequestId()].join(' ');

return new AccessLogFormat(`${requester} [${requestTime}] "${request}" ${status}`);
}
Expand Down

0 comments on commit c259a2f

Please sign in to comment.