Skip to content

Commit

Permalink
Release: v1.24.0
Browse files Browse the repository at this point in the history
release: v1.24.0
  • Loading branch information
rix0rrr authored Feb 13, 2020
2 parents 639fed9 + 55c2234 commit 6619e36
Show file tree
Hide file tree
Showing 274 changed files with 11,438 additions and 3,318 deletions.
16 changes: 0 additions & 16 deletions .github/actions/prlinter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@ async function run() {

} catch (error) {

if (error instanceof linter.LinterError) {

// only post a comment if its an actual validation error.
// otherwise its probably a bug and we should look at the build log to fix it.

gh = new github.GitHub(process.env.GITHUB_TOKEN);

await gh.issues.createComment({
owner: "aws",
repo: "aws-cdk",
issue_number: number,
body: `🚫 ${error.message}`
});

}

core.setFailed(error.message);
}

Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@

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.24.0](https://github.com/aws/aws-cdk/compare/v1.23.0...v1.24.0) (2020-02-13)


### Features

* **assert:** add countResourcesLike method ([#6168](https://github.com/aws/aws-cdk/issues/6168)) ([491e2d9](https://github.com/aws/aws-cdk/commit/491e2d970c849cbc00e7cb3def927b12054d572f))
* **cx-api:** clean up features.ts ([#6181](https://github.com/aws/aws-cdk/issues/6181)) ([efd6f3d](https://github.com/aws/aws-cdk/commit/efd6f3d7c7ccd985f386b29dffed47e2b3c6fa7c)), closes [#6098](https://github.com/aws/aws-cdk/issues/6098)
* **dynamodb:** add metrics for dynamodb table ([#6149](https://github.com/aws/aws-cdk/issues/6149)) ([295391e](https://github.com/aws/aws-cdk/commit/295391e901798a8f99415fd72a6b4fa664d75f44))
* **dynamodb:** global tables version 2019.11.21 ([#5821](https://github.com/aws/aws-cdk/issues/5821)) ([8c0c2b1](https://github.com/aws/aws-cdk/commit/8c0c2b130060215509cd6db83f8d6b18f92f857b)), closes [#5752](https://github.com/aws/aws-cdk/issues/5752)
* **ec2:** smarter default for VPN route propagation ([#6071](https://github.com/aws/aws-cdk/issues/6071)) ([5dd8aca](https://github.com/aws/aws-cdk/commit/5dd8aca97c314a2293473f4c6695e844f14aaa62)), closes [#6008](https://github.com/aws/aws-cdk/issues/6008)
* **ec2:** VPC flow logs ([a2fddec](https://github.com/aws/aws-cdk/commit/a2fddec4aa1893d4bf68fdfbb5c9379e58cd19f3)), closes [#3493](https://github.com/aws/aws-cdk/issues/3493)
* **iam:** add ability to create IAM role descriptions ([cee8825](https://github.com/aws/aws-cdk/commit/cee882540527feb2b6f0fee866eb96cccc2eae36))
* **iam:** descriptions for IAM Roles ([a1294d3](https://github.com/aws/aws-cdk/commit/a1294d35015faaf27f44a894a2367fe5791856a6))
* **cfnspec**: update CloudFormation spec to 10.5.0 ([#6195](https://github.com/aws/aws-cdk/issues/6195)) ([47a9949](https://github.com/aws/aws-cdk/commit/47a994916cc7744a2335ae4c7496ad11be86e366))
* **iam:** lookup ManagedPolicy via ARN ([2df2023](https://github.com/aws/aws-cdk/commit/2df2023755d696af0e82a1c83bfd2d4b4e54950d)), closes [#6186](https://github.com/aws/aws-cdk/issues/6186)
* **lambda:** expose `function.deadLetterQueue` ([6656047](https://github.com/aws/aws-cdk/commit/66560479c9417003c8cc61021155b8a8b732fb39)), closes [#6170](https://github.com/aws/aws-cdk/issues/6170)
* **step-functions:** `grantStartExecution` available on imported StateMachine ([5ae81cd](https://github.com/aws/aws-cdk/commit/5ae81cdddd75abedbcef7d856bdb20458fac5fcb)), closes [#6173](https://github.com/aws/aws-cdk/issues/6173)
* **stepfunctions:** EMR service integrations ([c69b6d2](https://github.com/aws/aws-cdk/commit/c69b6d2d712f9c307dd9de214acc96f5f944cc7d)), closes [#5224](https://github.com/aws/aws-cdk/issues/5224)


### Bug Fixes

* **cli**: truncated 'cdk diff' output in pipes ([aba1485](https://github.com/aws/aws-cdk/commit/aba1485765a4ac31e5acabaa945b1b4adde94c6a))
* **apigateway:** deployment fails when Model's contentType is not specified ([#6199](https://github.com/aws/aws-cdk/issues/6199)) ([0bf1403](https://github.com/aws/aws-cdk/commit/0bf1403a9f669556ed7942b5e1dd966f94ba812c)), closes [#6161](https://github.com/aws/aws-cdk/issues/6161)
* **apigateway:** stack deployment fails when a Stage is explicitly specified ([#6165](https://github.com/aws/aws-cdk/issues/6165)) ([879601e](https://github.com/aws/aws-cdk/commit/879601ead3c009cc10bd5d49dbc9d1132fa9ba82)), closes [#6068](https://github.com/aws/aws-cdk/issues/6068)
* **cli:** wrongly assume aws config file always exists ([#6196](https://github.com/aws/aws-cdk/issues/6196)) ([23f8b9f](https://github.com/aws/aws-cdk/commit/23f8b9f5e97f5f229faa9322d840339f6322a234))
* **codebuild:** badge is not allowed for CodeCommit sources ([#6211](https://github.com/aws/aws-cdk/issues/6211)) ([433d957](https://github.com/aws/aws-cdk/commit/433d95763210f8798c604bf62560d2a4ba39d9c6)), closes [#6205](https://github.com/aws/aws-cdk/issues/6205)
* **ec2:** `onePerAz` does not work for looked-up VPCs ([3332d06](https://github.com/aws/aws-cdk/commit/3332d06982c6eb04e4f88c5b01ad745ed18d7e82)), closes [#3126](https://github.com/aws/aws-cdk/issues/3126)
* **ecs-patterns:** allow imported load balancers as inputs ([7f8c90d](https://github.com/aws/aws-cdk/commit/7f8c90decd58d2016611e6f94fc506156e047b59))
* **elasticloadbalancingv2:** logAccessLogs in Base Load Balancer ([#6197](https://github.com/aws/aws-cdk/issues/6197)) ([adbc3b9](https://github.com/aws/aws-cdk/commit/adbc3b93e062b6687c048b36ef4d26ce2c784e53)), closes [#3794](https://github.com/aws/aws-cdk/issues/3794)
* **elbv2:** validate rule priority is a positive number ([#6222](https://github.com/aws/aws-cdk/issues/6222)) ([1fbaafe](https://github.com/aws/aws-cdk/commit/1fbaafe34ce3f45a84a2141f7171e02fb8ec4801)), closes [#3794](https://github.com/aws/aws-cdk/issues/3794)
* **kms:** add TagResource & UntagResource IAM permissions to default key policy ([#6125](https://github.com/aws/aws-cdk/issues/6125)) ([e65a326](https://github.com/aws/aws-cdk/commit/e65a326b7de3d97675e27af7f3cb9f2f8735a01d)), closes [#6102](https://github.com/aws/aws-cdk/issues/6102)

## [1.23.0](https://github.com/aws/aws-cdk/compare/v1.22.0...v1.23.0) (2020-02-07)


Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,8 @@ The pattern is simple:
form `module.Type:feature` (e.g. `@aws-cdk/core:enableStackNameDuplicates`).
2. Use `node.tryGetContext(cxapi.ENABLE_XXX)` to check if this feature is enabled
in your code. If it is not defined, revert to the legacy behavior.
3. Add your feature flag to
[cx-api/lib/future.ts](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/cx-api/lib/future.ts).
3. Add your feature flag to the `FUTURE_FLAGS` map in
[cx-api/lib/features.ts](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/cx-api/lib/features.ts).
This map is inserted to generated `cdk.json` files for new projects created
through `cdk init`.
4. In your PR title (which goes into CHANGELOG), add a `(under feature flag)` suffix. e.g:
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"tools/*"
],
"rejectCycles": "true",
"version": "1.23.0"
"version": "1.24.0"
}
3 changes: 2 additions & 1 deletion pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}"
root=$PWD

PACMAK=${PACMAK:-jsii-pacmak}
ROSETTA=${ROSETTA:-jsii-rosetta}
TMPDIR=${TMPDIR:-$(dirname $(mktemp -u))}
distdir="$PWD/dist"
rm -fr ${distdir}
Expand All @@ -29,7 +30,7 @@ function lerna_scopes() {
# Compile examples with respect to "decdk" directory, as all packages will
# be symlinked there so they can all be included.
echo "Extracting code samples" >&2
node --experimental-worker $(which jsii-rosetta) \
node --experimental-worker $(which $ROSETTA) \
--compile \
--output samples.tabl.json \
--directory packages/decdk \
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-cdk",
"version": "1.23.0",
"version": "1.24.0",
"private": true,
"pkglint": {
"include": "dependencies/node-version"
Expand All @@ -15,9 +15,9 @@
"devDependencies": {
"conventional-changelog-cli": "^2.0.31",
"fs-extra": "^8.1.0",
"jsii-diff": "^0.21.2",
"jsii-pacmak": "^0.21.2",
"jsii-rosetta": "^0.21.2",
"jsii-diff": "^0.22.0",
"jsii-pacmak": "^0.22.0",
"jsii-rosetta": "^0.22.0",
"lerna": "^3.20.2",
"typescript": "~3.7.5"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/@aws-cdk/alexa-ask/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-cdk/alexa-ask",
"version": "1.23.0",
"version": "1.24.0",
"description": "The CDK Construct Library for Alexa::ASK",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -80,16 +80,16 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert": "1.23.0",
"cdk-build-tools": "1.23.0",
"cfn2ts": "1.23.0",
"pkglint": "1.23.0"
"@aws-cdk/assert": "1.24.0",
"cdk-build-tools": "1.24.0",
"cfn2ts": "1.24.0",
"pkglint": "1.24.0"
},
"dependencies": {
"@aws-cdk/core": "1.23.0"
"@aws-cdk/core": "1.24.0"
},
"peerDependencies": {
"@aws-cdk/core": "1.23.0"
"@aws-cdk/core": "1.24.0"
},
"engines": {
"node": ">= 10.3.0"
Expand Down
44 changes: 22 additions & 22 deletions packages/@aws-cdk/app-delivery/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws-cdk/app-delivery",
"description": "Continuous Integration / Continuous Delivery for CDK Applications",
"version": "1.23.0",
"version": "1.24.0",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"jsii": {
Expand Down Expand Up @@ -40,24 +40,24 @@
"compat": "cdk-compat"
},
"dependencies": {
"@aws-cdk/aws-cloudformation": "1.23.0",
"@aws-cdk/aws-codebuild": "1.23.0",
"@aws-cdk/aws-codepipeline": "1.23.0",
"@aws-cdk/aws-codepipeline-actions": "1.23.0",
"@aws-cdk/aws-events": "1.23.0",
"@aws-cdk/aws-iam": "1.23.0",
"@aws-cdk/core": "1.23.0",
"@aws-cdk/cx-api": "1.23.0"
"@aws-cdk/aws-cloudformation": "1.24.0",
"@aws-cdk/aws-codebuild": "1.24.0",
"@aws-cdk/aws-codepipeline": "1.24.0",
"@aws-cdk/aws-codepipeline-actions": "1.24.0",
"@aws-cdk/aws-events": "1.24.0",
"@aws-cdk/aws-iam": "1.24.0",
"@aws-cdk/core": "1.24.0",
"@aws-cdk/cx-api": "1.24.0"
},
"devDependencies": {
"@aws-cdk/assert": "1.23.0",
"@aws-cdk/aws-s3": "1.23.0",
"@aws-cdk/assert": "1.24.0",
"@aws-cdk/aws-s3": "1.24.0",
"@types/nodeunit": "^0.0.30",
"cdk-build-tools": "1.23.0",
"cdk-integ-tools": "1.23.0",
"cdk-build-tools": "1.24.0",
"cdk-integ-tools": "1.24.0",
"fast-check": "^1.22.1",
"nodeunit": "^0.11.3",
"pkglint": "1.23.0"
"pkglint": "1.24.0"
},
"repository": {
"type": "git",
Expand All @@ -76,14 +76,14 @@
"cdk"
],
"peerDependencies": {
"@aws-cdk/aws-cloudformation": "1.23.0",
"@aws-cdk/aws-codebuild": "1.23.0",
"@aws-cdk/aws-codepipeline": "1.23.0",
"@aws-cdk/aws-codepipeline-actions": "1.23.0",
"@aws-cdk/aws-events": "1.23.0",
"@aws-cdk/aws-iam": "1.23.0",
"@aws-cdk/core": "1.23.0",
"@aws-cdk/cx-api": "1.23.0"
"@aws-cdk/aws-cloudformation": "1.24.0",
"@aws-cdk/aws-codebuild": "1.24.0",
"@aws-cdk/aws-codepipeline": "1.24.0",
"@aws-cdk/aws-codepipeline-actions": "1.24.0",
"@aws-cdk/aws-events": "1.24.0",
"@aws-cdk/aws-iam": "1.24.0",
"@aws-cdk/core": "1.24.0",
"@aws-cdk/cx-api": "1.24.0"
},
"engines": {
"node": ">= 10.3.0"
Expand Down
20 changes: 20 additions & 0 deletions packages/@aws-cdk/assert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,26 @@ expect(stack).to(haveResource('AWS::CertificateManager::Certificate', {

`ABSENT` is a magic value to assert that a particular key in an object is *not* set (or set to `undefined`).

### Check number of resources

If you want to assert that `n` number of resources of a particular type exist, with or without specific properties:

```ts
countResources(type, count)
countResourcesLike(type, count, props)
```

Example:

```ts
expect(stack).to(countResources('AWS::ApiGateway::Method', 3));
expect(stack).to(countResourcesLike('AWS::ApiGateway::Method', 1, {
HttpMethod: 'GET',
ResourceId: {
"Ref": "MyResource01234"
}
}));
```

### Check existence of an output
`haveOutput` assertion can be used to check that a stack contains specific output.
Expand Down
28 changes: 24 additions & 4 deletions packages/@aws-cdk/assert/lib/assertions/count-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,48 @@ export function countResources(resourceType: string, count = 1): Assertion<Stack
return new CountResourcesAssertion(resourceType, count);
}

/**
* An assertion to check whether a resource of a given type and with the given properties exists, considering properties
*/
export function countResourcesLike(resourceType: string, count = 1, props: any): Assertion<StackInspector> {
return new CountResourcesAssertion(resourceType, count, props);
}

class CountResourcesAssertion extends Assertion<StackInspector> {
private inspected: number = 0;
private readonly props: any;

constructor(private readonly resourceType: string,
private readonly count: number) {
private readonly count: number,
props: any = null) {
super();
this.props = props;
}

public assertUsing(inspector: StackInspector): boolean {
let counted = 0;
for (const logicalId of Object.keys(inspector.value.Resources || {})) {
const resource = inspector.value.Resources[logicalId];
if (resource.Type === this.resourceType) {
counted++;
this.inspected += 1;
if (this.props) {
const propEntries = Object.entries(this.props);
propEntries.forEach(([key, val]) => {
if (resource.Properties && resource.Properties[key] && JSON.stringify(resource.Properties[key]) === JSON.stringify(val)) {
counted++;
this.inspected += 1;
}
});
} else {
counted++;
this.inspected += 1;
}
}
}

return counted === this.count;
}

public get description(): string {
return `stack only has ${this.inspected} resource of type ${this.resourceType} but we expected to find ${this.count}`;
return `stack only has ${this.inspected} resource of type ${this.resourceType}${this.props ? ' with specified properties' : ''} but we expected to find ${this.count}`;
}
}
12 changes: 6 additions & 6 deletions packages/@aws-cdk/assert/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-cdk/assert",
"version": "1.23.0",
"version": "1.24.0",
"description": "An assertion library for use with CDK Apps",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -30,15 +30,15 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^25.1.1",
"cdk-build-tools": "1.23.0",
"cdk-build-tools": "1.24.0",
"jest": "^24.9.0",
"pkglint": "1.23.0",
"pkglint": "1.24.0",
"ts-jest": "^25.2.0"
},
"dependencies": {
"@aws-cdk/cloudformation-diff": "1.23.0",
"@aws-cdk/core": "1.23.0",
"@aws-cdk/cx-api": "1.23.0"
"@aws-cdk/cloudformation-diff": "1.24.0",
"@aws-cdk/core": "1.24.0",
"@aws-cdk/cx-api": "1.24.0"
},
"peerDependencies": {
"jest": "^24.9.0"
Expand Down
Loading

0 comments on commit 6619e36

Please sign in to comment.