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: forward merge 'master' into 'v2-main' #14652

Merged
merged 30 commits into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
dd8466f
chore(cloudfront): remove the use of calculateFunctionHash (#14583)
May 7, 2021
4a24d61
feat(cloudwatch): validate parameters for a metric dimensions (closes…
OksanaH May 7, 2021
063ddc7
feat(appmesh): change HealthChecks to use protocol-specific union-lik…
May 7, 2021
ce119ba
feat(msk): Cluster L2 Construct (#9908)
May 10, 2021
10ae1a9
feat(kms): allow specifying key spec and key usage (#14478)
dacci May 10, 2021
464b827
chore: add `@types/jest` to a package that was missing it (#14609)
rix0rrr May 10, 2021
036f9fc
chore: issue template for bugs to have an SSCCE example (#14615)
May 10, 2021
71c61e8
fix(cli): synth fails if there was an error when synthesizing the sta…
otaviomacedo May 10, 2021
3dfee3b
chore: annotate `aws-lambda-go` with `docker` requirement (#14618)
rix0rrr May 10, 2021
d676ffc
feat(elbv2): preserveClientIp for NetworkTargetGroup (#14589)
GriffinMB May 10, 2021
7d2684e
chore: npm-check-updates && yarn upgrade (#14620)
aws-cdk-automation May 10, 2021
e4cc012
chore(mergify): add @BenChaimberg to team roster
BenChaimberg May 10, 2021
7571860
chore(release): 1.103.0
May 10, 2021
bc13a66
chore(release): 1.103.0
MrArnoldPalmer May 10, 2021
3b1e920
chore(merge-back): 1.103.0 (#14624)
mergify[bot] May 10, 2021
218cc69
Merge branch 'master' into chaimber/team-roster
BenChaimberg May 11, 2021
3d9321e
Merge pull request #14622 from aws/chaimber/team-roster
BenChaimberg May 11, 2021
461f458
chore: mark "otaviomacedo" as core contributor (#14619)
rix0rrr May 11, 2021
5858a36
chore(cli): add npm command to upgrade notice (#14621)
May 11, 2021
10a633c
fix(lambda): custom resource fails to connect to efs filesystem (#14431)
ddneilson May 11, 2021
799ce1a
feat(cfnspec): cloudformation spec v35.2.0 (#14610)
aws-cdk-automation May 11, 2021
256fd4c
fix(lambda-nodejs): handler filename missing from error message (#14564)
otaviomacedo May 11, 2021
bf16642
chore(build): clarify prerequisites in CONTRIBUTING and verify before…
BenChaimberg May 11, 2021
2686655
Merge remote-tracking branch 'origin/v2-main' into v2/forward-merge-2…
May 12, 2021
24e4032
automatic pkglint fixes
eladb May 12, 2021
11a3db9
add validateOnSynth to ISynthesisSession which was moved
May 12, 2021
273d99a
add missing deps to msk
May 12, 2021
d69208e
update msk tests
May 12, 2021
5b136aa
Merge branch 'v2-main' into v2/forward-merge-20210512
May 12, 2021
952c741
revert change to test
May 12, 2021
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
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ description of the bug:
### Reproduction Steps

<!--
minimal amount of code that causes the bug (if possible) or a reference:
minimal amount of code that causes the bug (if possible) or a reference.

The code sample should be an SSCCE. See http://sscce.org/ for details.
In short, provide a code sample that we can copy/paste, run and reproduce.
-->

### What did you expect to happen?
Expand Down
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pull_request_rules:
label:
add: [ contribution/core ]
conditions:
- author~=^(eladb|RomainMuller|garnaat|nija-at|skinny85|rix0rrr|NGL321|Jerry-AWS|MrArnoldPalmer|NetaNir|iliapolo|njlynch|ericzbeard|ccfife|fulghum|pkandasamy91|SoManyHs|uttarasridhar)$
- author~=^(eladb|RomainMuller|garnaat|nija-at|skinny85|rix0rrr|NGL321|Jerry-AWS|MrArnoldPalmer|NetaNir|iliapolo|njlynch|ericzbeard|ccfife|fulghum|pkandasamy91|SoManyHs|uttarasridhar|otaviomacedo|BenChaimberg)$
- -label~="contribution/core"
- name: automatic merge
actions:
Expand Down
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@

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.103.0](https://github.com/aws/aws-cdk/compare/v1.102.0...v1.103.0) (2021-05-10)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **appmesh:** HealthChecks require use of static factory methods
* **apigatewayv2:** The `metricXXX` methods are no longer available in the
`IApi` interface. The existing ones are moved into `IHttpApi` and new
ones will be added to `IWebsocketApi`.
* **apigatewayv2:** The `metricXXX` methods are no longer available in
the `IStage` interface. The existing ones are moved into `IHttpStage`
and new ones will be added to the `IWebsocketStage`.
* **lambda-nodejs:** the default runtime version for `NodejsFunction` is now always `NODEJS_14_X` (previously the version was derived from the local NodeJS runtime and could be either 12.x or 14.x).

### Features

* **appmesh:** change HealthChecks to use protocol-specific union-like classes ([#14432](https://github.com/aws/aws-cdk/issues/14432)) ([063ddc7](https://github.com/aws/aws-cdk/commit/063ddc7315954a2104ac7aa4cb98f96239b8dd1e))
* **aws-ecs:** Expose logdriver "mode" property ([#13965](https://github.com/aws/aws-cdk/issues/13965)) ([28fce22](https://github.com/aws/aws-cdk/commit/28fce2264448820495d921ed08ae0d3084442876)), closes [#13845](https://github.com/aws/aws-cdk/issues/13845)
* **cloudwatch:** validate parameters for a metric dimensions (closes [#3116](https://github.com/aws/aws-cdk/issues/3116)) ([#14365](https://github.com/aws/aws-cdk/issues/14365)) ([4a24d61](https://github.com/aws/aws-cdk/commit/4a24d61654ef77557350e35443ddab7597d61736))
* **docdb:** Support multiple security groups to DatabaseCluster ([#13290](https://github.com/aws/aws-cdk/issues/13290)) ([1a97b66](https://github.com/aws/aws-cdk/commit/1a97b6664f9124ec21a6db39be600cee0411ab8c))
* **elbv2:** preserveClientIp for NetworkTargetGroup ([#14589](https://github.com/aws/aws-cdk/issues/14589)) ([d676ffc](https://github.com/aws/aws-cdk/commit/d676ffccb28d530a18d0e1630df0940632122a27))
* **kinesis:** Basic stream level metrics ([#12556](https://github.com/aws/aws-cdk/issues/12556)) ([5f1b576](https://github.com/aws/aws-cdk/commit/5f1b57603330e707bc68f56c267a9e45faa29e55)), closes [#12555](https://github.com/aws/aws-cdk/issues/12555)
* **kms:** allow specifying key spec and key usage ([#14478](https://github.com/aws/aws-cdk/issues/14478)) ([10ae1a9](https://github.com/aws/aws-cdk/commit/10ae1a902383e69d15a17585268dd836ffb4087b)), closes [#5639](https://github.com/aws/aws-cdk/issues/5639)
* **lambda-go:** higher level construct for golang lambdas ([#11842](https://github.com/aws/aws-cdk/issues/11842)) ([0948cc7](https://github.com/aws/aws-cdk/commit/0948cc7d4e38ac4e9ae765fcc571ea4f49ca9095))
* **msk:** Cluster L2 Construct ([#9908](https://github.com/aws/aws-cdk/issues/9908)) ([ce119ba](https://github.com/aws/aws-cdk/commit/ce119ba20d42191fa7ae2e83d459406be16e1748))


### Bug Fixes

* **apigatewayv2:** incorrect metric names for client and server-side errors ([#14541](https://github.com/aws/aws-cdk/issues/14541)) ([551182e](https://github.com/aws/aws-cdk/commit/551182efb1313425c97088b66c17d6227cb69da6)), closes [#14503](https://github.com/aws/aws-cdk/issues/14503)
* `assert` matches more than the template on multiple CDK copies ([#14544](https://github.com/aws/aws-cdk/issues/14544)) ([f8abdbf](https://github.com/aws/aws-cdk/commit/f8abdbfb37ba9efd9e24414f5b64d90f4cf3f7cb)), closes [#14468](https://github.com/aws/aws-cdk/issues/14468)
* **apigatewayv2-integrations:** fix broken lambda websocket integration uri ([#13820](https://github.com/aws/aws-cdk/issues/13820)) ([f0d5c25](https://github.com/aws/aws-cdk/commit/f0d5c25e1ae026eef03dc396e48368521dcb8331)), closes [#13679](https://github.com/aws/aws-cdk/issues/13679)
* **cfn-include:** correctly parse Fn::Sub expressions containing serialized JSON ([#14512](https://github.com/aws/aws-cdk/issues/14512)) ([fd6d6d0](https://github.com/aws/aws-cdk/commit/fd6d6d0a563816ace616dfe48b3a03f4559636f7)), closes [#14095](https://github.com/aws/aws-cdk/issues/14095)
* **cli:** 'cdk deploy *' should not deploy stacks in nested assemblies ([#14542](https://github.com/aws/aws-cdk/issues/14542)) ([93a3549](https://github.com/aws/aws-cdk/commit/93a3549e7a9791b5074dc95909f3289970800c10))
* **cli:** synth fails if there was an error when synthesizing the stack ([#14613](https://github.com/aws/aws-cdk/issues/14613)) ([71c61e8](https://github.com/aws/aws-cdk/commit/71c61e81ca58c95979f66d7d7b8100777d3c7b99))
* **lambda-nodejs:** non-deterministic runtime version ([#14538](https://github.com/aws/aws-cdk/issues/14538)) ([527f662](https://github.com/aws/aws-cdk/commit/527f6622146f007035ca669c33ad73861afe608a)), closes [#13893](https://github.com/aws/aws-cdk/issues/13893)
* **ssm:** dynamic SSM parameter reference breaks with lists ([#14527](https://github.com/aws/aws-cdk/issues/14527)) ([3d1baac](https://github.com/aws/aws-cdk/commit/3d1baaca015443d7ee0eecdec9e81dd61e8920ad)), closes [#14205](https://github.com/aws/aws-cdk/issues/14205) [#14476](https://github.com/aws/aws-cdk/issues/14476)

## [1.102.0](https://github.com/aws/aws-cdk/compare/v1.101.0...v1.102.0) (2021-05-04)


Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ The following tools need to be installed on your system prior to installing the
- [Yarn >= 1.19.1, < 2](https://yarnpkg.com/lang/en/docs/install)
- [.NET Core SDK 3.1.x](https://www.microsoft.com/net/download)
- [Python >= 3.6.5, < 4.0](https://www.python.org/downloads/release/python-365/)
- [Docker >= 19.03](https://docs.docker.com/get-docker/)
- the Docker daemon must also be running

First fork the repository, and then run the following commands to clone the repository locally.

Expand Down Expand Up @@ -113,8 +115,9 @@ However, if you wish to build the the entire repository, the following command w

```console
cd <root of the CDK repo>
yarn build
scripts/foreach.sh yarn build
```
Note: The `foreach` command is resumable by default; you must supply `-r` or `--reset` to start a new session.

You are now ready to start contributing to the CDK. See the [Pull Requests](#pull-requests) section on how to make your
changes and submit it as a pull request.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
},
"tap-mocha-reporter-resolutions-comment": "should be removed or reviewed when nodeunit dependency is dropped or adjusted",
"resolutions": {
"tap-mocha-reporter": "^5.0.1"
"tap-mocha-reporter": "^5.0.1",
"string-width": "^4.2.2"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assert-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"cdk-build-tools": "0.0.0",
"jest": "^26.6.3",
"pkglint": "0.0.0",
"ts-jest": "^26.5.5"
"ts-jest": "^26.5.6"
},
"dependencies": {
"@aws-cdk/cloud-assembly-schema": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"jest": "26.6.3",
"pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0",
"ts-jest": "^26.5.5"
"ts-jest": "^26.5.6"
},
"dependencies": {
"@aws-cdk/cloudformation-diff": "0.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"cdk-build-tools": "0.0.0",
"aws-sdk": "^2.596.0",
"aws-sdk-mock": "^5.1.0",
"eslint": "^7.25.0",
"eslint": "^7.26.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
Expand All @@ -42,6 +42,6 @@
"lambda-tester": "^3.6.0",
"sinon": "^9.2.4",
"nock": "^13.0.11",
"ts-jest": "^26.5.5"
"ts-jest": "^26.5.6"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
CfnResource, CustomResource, CustomResourceProvider, CustomResourceProviderRuntime,
Lazy, Resource, Stack, Stage, Token,
} from '@aws-cdk/core';

import { Construct, Node } from 'constructs';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"devDependencies": {
"aws-sdk": "^2.596.0",
"aws-sdk-mock": "^5.1.0",
"eslint": "^7.25.0",
"eslint": "^7.26.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"jest": "^26.6.3",
"pkglint": "0.0.0",
"sinon": "^9.2.4",
"ts-jest": "^26.5.5",
"ts-jest": "^26.5.6",
"@aws-cdk/assert-internal": "0.0.0"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export class NetworkListener extends BaseListener implements INetworkListener {
port: props.port,
protocol: props.protocol ?? this.protocol,
proxyProtocolV2: props.proxyProtocolV2,
preserveClientIp: props.preserveClientIp,
targetGroupName: props.targetGroupName,
targets: props.targets,
vpc: this.loadBalancer.vpc,
Expand Down Expand Up @@ -333,6 +334,14 @@ export interface AddNetworkTargetsProps {
*/
readonly proxyProtocolV2?: boolean;

/**
* Indicates whether client IP preservation is enabled.
*
* @default false if the target group type is IP address and the
* target group protocol is TCP or TLS. Otherwise, true.
*/
readonly preserveClientIp?: boolean;

/**
* Health check configuration
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export interface NetworkTargetGroupProps extends BaseTargetGroupProps {
*/
readonly proxyProtocolV2?: boolean;

/**
* Indicates whether client IP preservation is enabled.
*
* @default false if the target group type is IP address and the
* target group protocol is TCP or TLS. Otherwise, true.
*/
readonly preserveClientIp?: boolean;

/**
* The targets to add to this target group.
*
Expand Down Expand Up @@ -82,6 +90,10 @@ export class NetworkTargetGroup extends TargetGroupBase implements INetworkTarge
this.setAttribute('proxy_protocol_v2.enabled', props.proxyProtocolV2 ? 'true' : 'false');
}

if (props.preserveClientIp !== undefined) {
this.setAttribute('preserve_client_ip.enabled', props.preserveClientIp ? 'true' : 'false');
}

this.addTarget(...(props.targets || []));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,29 @@ describe('tests', () => {
});
});

test('Enable preserve_client_ip attribute for target group', () => {
// GIVEN
const stack = new cdk.Stack();
const vpc = new ec2.Vpc(stack, 'Vpc');

// WHEN
new elbv2.NetworkTargetGroup(stack, 'Group', {
vpc,
port: 80,
preserveClientIp: true,
});

// THEN
expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', {
TargetGroupAttributes: [
{
Key: 'preserve_client_ip.enabled',
Value: 'true',
},
],
});
});

test('Disable proxy protocol v2 for attribute target group', () => {
// GIVEN
const stack = new cdk.Stack();
Expand All @@ -51,6 +74,29 @@ describe('tests', () => {
});
});

test('Disable preserve_client_ip attribute for target group', () => {
// GIVEN
const stack = new cdk.Stack();
const vpc = new ec2.Vpc(stack, 'Vpc');

// WHEN
new elbv2.NetworkTargetGroup(stack, 'Group', {
vpc,
port: 80,
preserveClientIp: false,
});

// THEN
expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', {
TargetGroupAttributes: [
{
Key: 'preserve_client_ip.enabled',
Value: 'false',
},
],
});
});

test('Configure protocols for target group', () => {
const stack = new cdk.Stack();
const vpc = new ec2.Vpc(stack, 'Vpc');
Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-finspace/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const baseConfig = require('cdk-build-tools/config/eslintrc');
baseConfig.parserOptions.project = __dirname + '/tsconfig.json';
module.exports = baseConfig;
19 changes: 19 additions & 0 deletions packages/@aws-cdk/aws-finspace/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*.js
*.js.map
*.d.ts
tsconfig.json
node_modules
*.generated.ts
dist
.jsii

.LAST_BUILD
.nyc_output
coverage
.nycrc
.LAST_PACKAGE
*.snk
nyc.config.js
!.eslintrc.js
!jest.config.js
junit.xml
28 changes: 28 additions & 0 deletions packages/@aws-cdk/aws-finspace/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz

dist
.LAST_PACKAGE
.LAST_BUILD
!*.js

# Include .jsii
!.jsii

*.snk

*.tsbuildinfo

tsconfig.json

.eslintrc.js
jest.config.js

# exclude cdk artifacts
**/cdk.out
junit.xml
test/
Loading