Skip to content

Commit

Permalink
chore(release): 1.43.0 (aws#8357)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 3, 2020
2 parents a4797b4 + e099bd3 commit b1c232c
Show file tree
Hide file tree
Showing 151 changed files with 7,061 additions and 947 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ what is the error message you are seeing?

- **CLI Version :**
- **Framework Version:**
- **Node.js Version:** <!-- Version of Node.js (run the command `node -v`) -->
- **OS :**
- **Language :**
- **Language (Version):** <!-- [all | TypeScript (3.8.3) | Java (8)| Python (3.7.3) | etc... ] -->

### Other

Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/general-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ falling prey to the [X/Y problem][2]!

- **CDK CLI Version:** <!-- Output of `cdk version` -->
- **Module Version:** <!-- Version of the module in question -->
- **Node.js Version:** <!-- Version of Node.js (run the command `node -v`) -->
- **OS:** <!-- [all | Windows 10 | OSX Mojave | Ubuntu | etc... ] -->
- **Language:** <!-- [all | TypeScript | Java | Python ] etc... ] -->
- **Language (Version):** <!-- [all | TypeScript (3.8.3) | Java (8)| Python (3.7.3) | etc... ] -->


### Other information
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# VSCode extension
.vscode/

# Store launch config in repo but not settings
.vscode/settings.json
/.favorites.json

# TypeScript incremental build states
Expand Down
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
// Has convenient settings for attaching to a NodeJS process for debugging purposes
// that are NOT the default and otherwise every developers has to configure for
// themselves again and again.
"type": "node",
"request": "attach",
"name": "Attach to NodeJS",
// If we don't do this, every step-into into an async function call will go into
// NodeJS internals which are hard to step out of.
"skipFiles": [
"<node_internals>/**"
],
// Saves some button-pressing latency on attaching
"stopOnEntry": false
}
]
}
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,48 @@

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.43.0](https://github.com/aws/aws-cdk/compare/v1.42.1...v1.43.0) (2020-06-03)


### ⚠ BREAKING CHANGES

* **rds:** the default retention policy for RDS Cluster and DbInstance is now 'Snapshot'
* **cognito:** OAuth flows `authorizationCodeGrant` and
`implicitCodeGrant` in `UserPoolClient` are enabled by default.
* **cognito:** `callbackUrl` property in `UserPoolClient` is now
optional and has a default.
* **cognito:** All OAuth scopes in a `UserPoolClient` are now enabled
by default.

### Features

* **cfn-include:** add support for Conditions ([#8144](https://github.com/aws/aws-cdk/issues/8144)) ([33212d2](https://github.com/aws/aws-cdk/commit/33212d2c3adfc5a06ec4557787aea1b3cd1e8143))
* **cognito:** addDomain() on an imported user pool ([#8123](https://github.com/aws/aws-cdk/issues/8123)) ([49c9f99](https://github.com/aws/aws-cdk/commit/49c9f99c4dfd73bf53a461a844a1d9b0c02d3761))
* **cognito:** sign in url for a UserPoolDomain ([#8155](https://github.com/aws/aws-cdk/issues/8155)) ([e942936](https://github.com/aws/aws-cdk/commit/e94293675b0a9ebeb5876283d6a54427391469bd))
* **cognito:** user pool identity provider with support for Facebook & Amazon ([#8134](https://github.com/aws/aws-cdk/issues/8134)) ([1ad919f](https://github.com/aws/aws-cdk/commit/1ad919fecf7cda45293efc3c0805b2eb5b49ed69))
* **dynamodb:** allow providing indexes when importing a Table ([#8245](https://github.com/aws/aws-cdk/issues/8245)) ([9ee61eb](https://github.com/aws/aws-cdk/commit/9ee61eb96de54fcbb71e41a2db2c1c9ec6b7b8d9)), closes [#6392](https://github.com/aws/aws-cdk/issues/6392)
* **events-targets:** kinesis stream as event rule target ([#8176](https://github.com/aws/aws-cdk/issues/8176)) ([21ebc2d](https://github.com/aws/aws-cdk/commit/21ebc2dfdcc202bac47083d4c7d06e1ae4df0709)), closes [#2997](https://github.com/aws/aws-cdk/issues/2997)
* **lambda-nodejs:** allow passing env vars to container ([#8169](https://github.com/aws/aws-cdk/issues/8169)) ([1755cf2](https://github.com/aws/aws-cdk/commit/1755cf274b4da446272f109b55b20680beb34fe7)), closes [#8031](https://github.com/aws/aws-cdk/issues/8031)
* **rds:** change the default retention policy of Cluster and DB Instance to Snapshot ([#8023](https://github.com/aws/aws-cdk/issues/8023)) ([2d83328](https://github.com/aws/aws-cdk/commit/2d833280be7a8550ab4a713e7213f1dd351f9767)), closes [#3298](https://github.com/aws/aws-cdk/issues/3298)
* **redshift:** add initial L2 Redshift construct ([#5730](https://github.com/aws/aws-cdk/issues/5730)) ([703f0fa](https://github.com/aws/aws-cdk/commit/703f0fa6e2ba5e668d6a92200493d19d2af626c0)), closes [#5711](https://github.com/aws/aws-cdk/issues/5711)
* **s3:** supports RemovalPolicy for BucketPolicy ([#8158](https://github.com/aws/aws-cdk/issues/8158)) ([cb71f34](https://github.com/aws/aws-cdk/commit/cb71f340343011a2a2de9758879a56e898b8e12c)), closes [#7415](https://github.com/aws/aws-cdk/issues/7415)
* **stepfunctions-tasks:** start a nested state machine execution as a construct ([#8178](https://github.com/aws/aws-cdk/issues/8178)) ([3000dd5](https://github.com/aws/aws-cdk/commit/3000dd58cbe05cc483e30da6c8b18e9e3bf27e0f))
* **stepfunctions-tasks:** task state construct to submit a job to AWS Batch ([#8115](https://github.com/aws/aws-cdk/issues/8115)) ([bc41cd5](https://github.com/aws/aws-cdk/commit/bc41cd5662314202c9bd8af87587990ad0b50282))


### Bug Fixes

* **apigateway:** deployment is not updated when OpenAPI definition is updated ([#8207](https://github.com/aws/aws-cdk/issues/8207)) ([d28c947](https://github.com/aws/aws-cdk/commit/d28c9473e0f480eba06e7dc9c260e4372501fc36)), closes [#8159](https://github.com/aws/aws-cdk/issues/8159)
* **app-delivery:** could not use PipelineDeployStackAction more than once in a Stage ([#8217](https://github.com/aws/aws-cdk/issues/8217)) ([9a54447](https://github.com/aws/aws-cdk/commit/9a54447f2a7d7e3a5d31a57bb3b2e2b0555430a1)), closes [#3984](https://github.com/aws/aws-cdk/issues/3984) [#8183](https://github.com/aws/aws-cdk/issues/8183)
* **cli:** termination protection not updated when change set has no changes ([#8275](https://github.com/aws/aws-cdk/issues/8275)) ([29d3145](https://github.com/aws/aws-cdk/commit/29d3145d1f4d7e17cd20f197d3c4955f48d07b37))
* **codepipeline:** allow multiple CodeCommit source actions using events ([#8018](https://github.com/aws/aws-cdk/issues/8018)) ([103c144](https://github.com/aws/aws-cdk/commit/103c1449683ffc131b696faff8b16f0935a3c3f4)), closes [#7802](https://github.com/aws/aws-cdk/issues/7802)
* **codepipeline:** correctly handle CODEBUILD_CLONE_REF in BitBucket source ([#7107](https://github.com/aws/aws-cdk/issues/7107)) ([ac001b8](https://github.com/aws/aws-cdk/commit/ac001b86bbff1801005cac1509e4480a30bf8f15))
* **codepipeline:** unhelpful artifact validation messages ([#8256](https://github.com/aws/aws-cdk/issues/8256)) ([2a2406e](https://github.com/aws/aws-cdk/commit/2a2406e5cc16e3bcce4e355f54b31ca8a7c2ace6))
* **core:** CFN version and description template sections were merged incorrectly ([#8251](https://github.com/aws/aws-cdk/issues/8251)) ([b7e328d](https://github.com/aws/aws-cdk/commit/b7e328da4e7720c27bd7e828ffe3d3ae9dc1d070)), closes [#8151](https://github.com/aws/aws-cdk/issues/8151)
* **lambda:** `SingletonFunction.grantInvoke()` API fails with error 'No child with id' ([#8296](https://github.com/aws/aws-cdk/issues/8296)) ([a8b1815](https://github.com/aws/aws-cdk/commit/a8b1815f47b140b0fb06a3df0314c0fe28816fb6)), closes [#8240](https://github.com/aws/aws-cdk/issues/8240)
* **rds:** cannot delete a stack with DbCluster set to 'Retain' ([#8110](https://github.com/aws/aws-cdk/issues/8110)) ([c2e534e](https://github.com/aws/aws-cdk/commit/c2e534ecab219be8cd8174b60da3b58072dcfd47)), closes [#5282](https://github.com/aws/aws-cdk/issues/5282)
* **sqs:** unable to use CfnParameter 'valueAsNumber' to specify queue properties ([#8252](https://github.com/aws/aws-cdk/issues/8252)) ([8ec405f](https://github.com/aws/aws-cdk/commit/8ec405f5c016d0cbe1b9eeea6649e1e68f9b76e7)), closes [#7126](https://github.com/aws/aws-cdk/issues/7126)

## [1.42.1](https://github.com/aws/aws-cdk/compare/v1.42.0...v1.42.1) (2020-06-01)


Expand Down
23 changes: 21 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ and let us know if it's not up-to-date (even better, submit a PR with your corr
- [Troubleshooting](#troubleshooting)
- [Debugging](#debugging)
- [Connecting the VS Code Debugger](#connecting-the-vs-code-debugger)
- [Run a CDK unit test in the debugger](#run-a-cdk-unit-test-in-the-debugger)
- [Related Repositories](#related-repositories)

## Getting Started
Expand Down Expand Up @@ -234,7 +235,7 @@ BREAKING CHANGE: Description of what broke and how to achieve this behavior now
### Step 5: Pull Request

* Push to a GitHub fork or to a branch (naming convention: `<user>/<feature-bug-name>`)
* Submit a Pull Requests on GitHub and assign the PR for a review to the "awslabs/aws-cdk" team.
* Submit a Pull Request on GitHub. A reviewer will later be assigned by the maintainers.
* Please follow the PR checklist written below. We trust our contributors to self-check, and this helps that process!
* Discuss review comments and iterate until you get at least one “Approve”. When iterating, push new commits to the
same branch. Usually all these are going to be squashed when you merge to master. The commit messages should be hints
Expand Down Expand Up @@ -327,7 +328,7 @@ All packages in the repo use a standard base configuration found at [eslintrc.js
This can be customized for any package by modifying the `.eslintrc` file found at its root.

If you're using the VS Code and would like to see eslint violations on it, install the [eslint
extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).
extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).

#### pkglint

Expand Down Expand Up @@ -910,6 +911,24 @@ To debug your CDK application along with the CDK repository,
6. The debug view, should now have a launch configuration called 'Debug hello-cdk' and launching that will start the debugger.
7. Any time you modify the CDK app or any of the CDK modules, they need to be re-built and depending on the change the `link-all.sh` script from step#2, may need to be re-run. Only then, would VS code recognize the change and potentially the breakpoint.

### Run a CDK unit test in the debugger

If you want to run the VSCode debugger on unit tests of the CDK project
itself, do the following:

1. Set a breakpoint inside your unit test.
2. In your terminal, depending on the type of test, run either:

```
# (For tests names test.xxx.ts)
$ node --inspect-brk /path/to/aws-cdk/node_modules/.bin/nodeunit -t 'TESTNAME'
# (For tests names xxxx.test.ts)
$ node --inspect-brk /path/to/aws-cdk/node_modules/.bin/jest -i -t 'TESTNAME'
```

3. On the `Run` pane of VSCode, select the run configuration **Attach to NodeJS** and click the button.

## Related Repositories

* [Samples](https://github.com/aws-samples/aws-cdk-examples): includes sample code in multiple languages
Expand Down
7 changes: 3 additions & 4 deletions fetch-dotnet-snk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ function echo_usage() {
echo -e "\tDOTNET_STRONG_NAME_SECRET_ID=<The name (i.e. production/my/key) or ARN of the secret containing the .snk file.>"
}

if [ -z "${DOTNET_STRONG_NAME_ENABLED:-}" ]; then
echo "Environment variable DOTNET_STRONG_NAME_ENABLED is not set. Skipping strong-name signing."
if [ "${DOTNET_STRONG_NAME_ENABLED:-false}" != "true" ]; then
echo "Environment variable DOTNET_STRONG_NAME_ENABLED is not set to true. Skipping strong-name signing."
exit 0
fi

echo "Retrieving SNK..."

apt update -y
apt install jq -y
yum install jq -y

if [ -z "${DOTNET_STRONG_NAME_ROLE_ARN:-}" ]; then
echo "Strong name signing is enabled, but DOTNET_STRONG_NAME_ROLE_ARN is not set."
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.42.1"
"version": "1.43.0"
}
31 changes: 20 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"devDependencies": {
"conventional-changelog-cli": "^2.0.34",
"fs-extra": "^8.1.0",
"jsii-diff": "^1.5.0",
"jsii-pacmak": "^1.5.0",
"jsii-rosetta": "^1.5.0",
"lerna": "^3.21.0",
"jsii-diff": "^1.6.0",
"jsii-pacmak": "^1.6.0",
"jsii-rosetta": "^1.6.0",
"lerna": "^3.22.0",
"standard-version": "^8.0.0",
"graceful-fs": "^4.2.4",
"typescript": "~3.8.3"
Expand Down Expand Up @@ -48,25 +48,34 @@
"nohoist": [
"**/jszip",
"**/jszip/**",
"@aws-cdk/cdk-assets-schema/semver",
"@aws-cdk/cdk-assets-schema/semver/**",
"@aws-cdk/core/minimatch",
"@aws-cdk/core/minimatch/**",
"@aws-cdk/cloudformation-include/yaml",
"@aws-cdk/cloudformation-include/yaml/**",
"@aws-cdk/aws-codepipeline-actions/case",
"@aws-cdk/aws-codepipeline-actions/case/**",
"@aws-cdk/aws-ecr-assets/minimatch",
"@aws-cdk/aws-ecr-assets/minimatch/**",
"@aws-cdk/aws-lambda-nodejs/parcel-bundler",
"@aws-cdk/aws-lambda-nodejs/parcel-bundler/**",
"@aws-cdk/cdk-assets-schema/semver",
"@aws-cdk/cdk-assets-schema/semver/**",
"@aws-cdk/cloud-assembly-schema/jsonschema",
"@aws-cdk/cloud-assembly-schema/jsonschema/**",
"@aws-cdk/cloud-assembly-schema/semver",
"@aws-cdk/cloud-assembly-schema/semver/**",
"@aws-cdk/cloudformation-include/yaml",
"@aws-cdk/cloudformation-include/yaml/**",
"@aws-cdk/core/minimatch",
"@aws-cdk/core/minimatch/**",
"@aws-cdk/cx-api/semver",
"@aws-cdk/cx-api/semver/**",
"@aws-cdk/cx-api/semver/**"
"monocdk-experiment/case",
"monocdk-experiment/case/**",
"monocdk-experiment/jsonschema",
"monocdk-experiment/jsonschema/**",
"monocdk-experiment/minimatch",
"monocdk-experiment/minimatch/**",
"monocdk-experiment/semver",
"monocdk-experiment/semver/**",
"monocdk-experiment/yaml",
"monocdk-experiment/yaml/**"
]
}
}
18 changes: 16 additions & 2 deletions packages/@aws-cdk/app-delivery/lib/pipeline-deploy-stack-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,27 @@ export interface PipelineDeployStackActionProps {
*/
readonly createChangeSetRunOrder?: number;

/**
* The name of the CodePipeline action creating the ChangeSet.
*
* @default 'ChangeSet'
*/
readonly createChangeSetActionName?: string;

/**
* The runOrder for the CodePipeline action executing the ChangeSet.
*
* @default ``createChangeSetRunOrder + 1``
*/
readonly executeChangeSetRunOrder?: number;

/**
* The name of the CodePipeline action creating the ChangeSet.
*
* @default 'Execute'
*/
readonly executeChangeSetActionName?: string;

/**
* IAM role to assume when deploying changes.
*
Expand Down Expand Up @@ -116,7 +130,7 @@ export class PipelineDeployStackAction implements codepipeline.IAction {
const changeSetName = props.changeSetName || 'CDK-CodePipeline-ChangeSet';
const capabilities = cfnCapabilities(props.adminPermissions, props.capabilities);
this.prepareChangeSetAction = new cpactions.CloudFormationCreateReplaceChangeSetAction({
actionName: 'ChangeSet',
actionName: props.createChangeSetActionName ?? 'ChangeSet',
changeSetName,
runOrder: createChangeSetRunOrder,
stackName: props.stack.stackName,
Expand All @@ -126,7 +140,7 @@ export class PipelineDeployStackAction implements codepipeline.IAction {
capabilities,
});
this.executeChangeSetAction = new cpactions.CloudFormationExecuteChangeSetAction({
actionName: 'Execute',
actionName: props.executeChangeSetActionName ?? 'Execute',
changeSetName,
runOrder: executeChangeSetRunOrder,
stackName: this.stack.stackName,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, haveResource, isSuperObject } from '@aws-cdk/assert';
import { expect, haveResource, haveResourceLike, isSuperObject } from '@aws-cdk/assert';
import * as cfn from '@aws-cdk/aws-cloudformation';
import * as codebuild from '@aws-cdk/aws-codebuild';
import * as codepipeline from '@aws-cdk/aws-codepipeline';
Expand Down Expand Up @@ -406,6 +406,43 @@ export = nodeunit.testCase({
);
test.done();
},

'allows overriding the ChangeSet and Execute action names'(test: nodeunit.Test) {
const stack = getTestStack();
const selfUpdatingPipeline = createSelfUpdatingStack(stack);
selfUpdatingPipeline.pipeline.addStage({
stageName: 'Deploy',
actions: [
new PipelineDeployStackAction({
input: selfUpdatingPipeline.synthesizedApp,
adminPermissions: true,
stack,
createChangeSetActionName: 'Prepare',
executeChangeSetActionName: 'Deploy',
}),
],
});

expect(stack).to(haveResourceLike('AWS::CodePipeline::Pipeline', {
Stages: [
{},
{},
{
Name: 'Deploy',
Actions: [
{
Name: 'Prepare',
},
{
Name: 'Deploy',
},
],
},
],
}));

test.done();
},
});

class FakeAction implements codepipeline.IAction {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"@types/nodeunit": "^0.0.31",
"@types/sinon": "^9.0.3",
"@types/sinon": "^9.0.4",
"aws-cdk": "0.0.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-apigateway/lib/deployment.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CfnResource, Construct, Lazy, RemovalPolicy, Resource, Stack } from '@aws-cdk/core';
import * as crypto from 'crypto';
import { CfnDeployment } from './apigateway.generated';
import { IRestApi, RestApi } from './restapi';
import { IRestApi, RestApi, SpecRestApi } from './restapi';

export interface DeploymentProps {
/**
Expand Down Expand Up @@ -155,7 +155,7 @@ class LatestDeploymentResource extends CfnDeployment {
* add via `addToLogicalId`.
*/
protected prepare() {
if (this.api instanceof RestApi) { // Ignore IRestApi that are imported
if (this.api instanceof RestApi || this.api instanceof SpecRestApi) { // Ignore IRestApi that are imported

// Add CfnRestApi to the logical id so a new deployment is triggered when any of its properties change.
const cfnRestApiCF = (this.api.node.defaultChild as any)._toCloudFormation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"Name": "my-api"
}
},
"myapiDeployment92F2CB49": {
"myapiDeployment92F2CB49eb6b0027bfbdb20b09988607569e06bd": {
"Type": "AWS::ApiGateway::Deployment",
"Properties": {
"RestApiId": {
Expand All @@ -60,7 +60,7 @@
"Ref": "myapi4C7BF186"
},
"DeploymentId": {
"Ref": "myapiDeployment92F2CB49"
"Ref": "myapiDeployment92F2CB49eb6b0027bfbdb20b09988607569e06bd"
},
"StageName": "prod"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"Name": "my-api"
}
},
"myapiDeployment92F2CB49": {
"myapiDeployment92F2CB49a59bca458e4fac1fcd742212ded42a65": {
"Type": "AWS::ApiGateway::Deployment",
"Properties": {
"RestApiId": {
Expand All @@ -69,7 +69,7 @@
"Ref": "myapi4C7BF186"
},
"DeploymentId": {
"Ref": "myapiDeployment92F2CB49"
"Ref": "myapiDeployment92F2CB49a59bca458e4fac1fcd742212ded42a65"
},
"StageName": "prod"
}
Expand Down
Loading

0 comments on commit b1c232c

Please sign in to comment.