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): 2.2.0 #18030

Merged
merged 56 commits into from
Dec 15, 2021
Merged

chore(release): 2.2.0 #18030

merged 56 commits into from
Dec 15, 2021

Conversation

aws-cdk-automation
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation commented Dec 15, 2021

See CHANGELOG

moelasmar and others added 30 commits December 8, 2021 14:48
Revert `aws:asset:original-path` to fix #17706
Generated by running `./scripts/bump-cfnspec.sh`. Needed some additions required for #17840.

Closes #17858 (duplicate)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…7914)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.
The recommendation from AWS is to not use this feature in production. So `false` is a sensible
default.

Fixes #17578.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
#17722)

The cross region S3 buckets that are created should have block public access by default.

Fixes #16411

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
aws-cloudformation/cloudformation-coverage-roadmap#133 just shipped.

Docs: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-propagatetagstovolumeoncreation

Waiting on cloudfromation specs to get bumped to the latest version. Depends on #17844.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
When configuring the Cognito SES email integration we were performing a
region check to make sure you were configuring SES in one of the 3
supported regions. This was based on the Cognito documentation [here](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-email.html#user-pool-email-developer)
which is not correct. This PR removes that check allowing CloudFormation
to provide the validation. If a user provides an incorrect region the
CloudFormation deployment will fail with a descriptive error message.

fixes #17795


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Managed Policy ARNs should be deduped when added to a Role,
otherwise the deployment is going to fail.

Remove the unnecessary use of `Lazy.uncachedString` to make sure that
the ARNs of two `ManagedPolicy.fromAwsManagedPolicyName()` policies
are consistent.

Fixes #17552.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…#17571)

This adds a new integration test that deploys an s3.Bucket with
autoDeleteObjects set to true. The autoDeleteObjects feature deploys a
Nodejs Lambda backed Custom Resource.

Lambda backed custom resources that are included as part of CDK
constructs are compiled and bundled as part of the construct library.
There are scenarios where this compiled source code (e.g.
__entrypoint__.js) could be modified by the build process and cause the
lambda execution to fail.

This integration test should catch those instances. If the lambda
function throws errors during execution the CustomResource will
eventually fail. In the integration test this will result in a test
timeout and failure.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
**Issue**
When creating a VPC you can not define the VPC name. The current way to set the name is using the `Tags` class

**VPC Example:**
```javascript
        const vpc = new ec2.Vpc(this, 'vpc-id', {
            maxAzs: 2,
            subnetConfiguration: [
                {
                    name: 'private-subnet-1',
                    subnetType: ec2.SubnetType.PRIVATE,
                    cidrMask: 24,
                },
                {
                    name: 'public-subnet-1',
                    subnetType: ec2.SubnetType.PUBLIC,
                    cidrMask: 24,
                },
            ]
        });

        cdk.Tags.of(vpc).add('Name', 'CustomVPCName');
```

**Proposal:**
```javascript
        const vpc = new ec2.Vpc(this, 'vpc-id', {
            maxAzs: 2,
            subnetConfiguration: [
                {
                    name: 'private-subnet-1',
                    subnetType: ec2.SubnetType.PRIVATE,
                    cidrMask: 24,
                },
                {
                    name: 'public-subnet-1',
                    subnetType: ec2.SubnetType.PUBLIC,
                    cidrMask: 24,
                    mapPublicIpOnLaunch: false, // or true
                },
            ],
            vpcName: 'CustomVPCName',
        });
```

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The `rewrite-imports-v2` tool is used to rewrite imports from CDK v1 apps and
libraries to CDK v2 compliant imports. The initial launch of this tool focused
solely on the conversion of CDKv1 to CDKv2 imports, but ignored the complexity
of 'constructs` now being used as its own independent library and the lack of
the Construct compatibility layer from v2.

This fix introduces rewrites for Constructs. All `IConstruct` and `Construct`
imports will be converted from `@aws-cdk/core` to `constructs`, and any
qualified references (e.g., `cdk.Construct`) will be renamed as well (e.g.,
`constructs.Construct`). Imports of the construct library will be added as
needed.

fixes #17826

_Implementation note:_
Apologies for the diff. The best way to be able to recursively visit the tree involved
converting the existing, simple `ts.visitNode()` approach to a
`TransformerFactory`-based approach so `ts.visitEachChild()` could be used. This
required a few method moves and the creation of a class to hold some context.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
If the `cachingConfig` property is not provided, the library is generating an empty config.

Change this to not add any config to the template.

Related to #17925.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ns (#17941)

It is convention in the CDK to expose the underlying `grant()` API to make it simple for users to grant custom permissions to their resource. 

In addition, this PR removes 'glue:BatchDeletePartition' from `readPermissions`, which was previously erroneously added.

closes #17935 and #15116.

BREAKING CHANGE: the grantRead API previously included 'glue:BatchDeletePartition', and now it does not.


 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixes: #17546

This adds to the fix in #16083 that was addressing the issue where the LogRetention Lambda can be executed concurrently and create a race condition where multiple invocations are trying to create or modify the same log group.

The previous fix addressed the issue if it occurred during log group creation, in the `createLogGroupSafe` method, but did not account for the same problem happening when modifying a log group's retention period in the `setRetentionPolicy` method. This fix applies the same logic from the last fix to the other method.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
We're trialling open context providers internally. Not ready yet to call this a public API but we will maintain firmer guarantees on this function going forward.

Issues already uncovered by doing this that the more general open framework will have to deal with:

* `SdkProvider` would need to be open and stable
* What if the provider doesn't need account/region?
* Schema validation in query and response
* Side channel instructions to the context framework
* (not to mention: how will the code get on the user's machine?)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…e Redis cluster (#17919)

Following the recently released support for autoscaling in ElastiCache Redis cluster, I'd like to use CDK in order to manage the infrastructure. The only required change is to introduce a new enum value for 'elasticache' key ([cloudformation doc](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalabletarget.html#cfn-applicationautoscaling-scalabletarget-servicenamespace)), however to improve dev experience I've introduced three new `PredefinedMetricType` following [cloudformation docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-predefinedmetrictype)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This PR adds hotswap support for S3 Bucket Deployments. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Before, when the `stateMachineName` property was used, the value of `stateMachineName` was passed directly to the SDK where an ARN was required. Now, when the `stateMachineName` property is used, we construct the ARN from its value, and pass that ARN to the SDK.

Closes #17716

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This is proposed by #17711.

This PR was created for implemeting `Input` L2 Construct. Implementing it is needed before `DetectorModel`. The reason is described in here: #17711 (comment)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ecycleHook (#16187)

This makes the notificationTargetArn optional in LifecycleHook. CloudFormation docs specify it as optional [here](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-lifecyclehook.html). Closes #14641. 
To achieve this, the `role` parameter was made optional. To avoid breaking users, a role is provided if users specify a `notificationTarget` (which they currently all do, as it is a required property) and is not provided otherwise.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Closes #17867

* Assigned props.environment to a public readonly member
* Added integration test that confirms the environment can be appended after the task is instantiated

Made 2 cosmetic, but no obvious changes. Environment values are specified:

name: value
name2: value

But in the test and the README.md files the sample values were:

name: something
value: something else

This is using the string 'value" as a key - which, as someone reading the code for the first time, was confusing. So I changed the sample values to more clearly display what's a key and what's a value.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Adding builtin support for the new ARM64 CloudWatch insights Lambda
layers which were [announced](https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-cloudwatch-lambda-insights-functions-graviton2/)
yesterday.

also fixes #17133

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
robertd and others added 21 commits December 13, 2021 20:54
… MySQL 3.01.0 (#17959)

Add new RDS versions:

**MariaDbEngineVersion 10.5.13, 10.4.22, 10.3.32 and 10.2.41**
[Announcement](https://aws.amazon.com/about-aws/whats-new/2021/12/amazon-rds-mariadb-supports-new-minor-versions/)

**AuroraMysqlEngineVersion 3.01.0**
[Announcement](https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-aurora-mysql-8-0/)
Version informations retrieved from CLI command: `aws rds describe-db-engine-versions --region us-east-1 --engine aurora-mysql --engine-version 8.0`

Deployment tested successfully:
```ts
new rds.DatabaseCluster(this, 'DatabaseCluster', {
  engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_3_01_0 }),
  instanceProps: {
    instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.XLARGE),
    vpc,
  },
  removalPolicy: RemovalPolicy.DESTROY,
});
```

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…n name to a Rest API (#17915)

If a domain name has an empty base path mapping, API Gateway does not allow the
creation of additional base path mappings. The problem is that `addDomainName`
always creates an empty base path mapping, preventing users to add their own
afterwards. 

Add a property to define a base path mapping at the same time as adding the
domain name.

Fixes #9581.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
… datapoints (#17441)

This PR closes #17433. It adds a `datapointsToAlarm` property to the `StepScalingPolicy` construct which allows auto-scaling activities to trigger when only a portion of the data points in the evaluation periods are breaching.

Motivation: Some metrics may have a certain amount of noise/randomness and in these cases it may make more sense to not require that all data points must be breaching for auto-scaling activity to trigger.
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Adding the Gateway Route `Priority` support. This is not a new feature but it was missed from the implementation.

The implementation method is mimicking how Route's `Priority` is implemented: 
 - [route-spec.ts](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-appmesh/lib/route-spec.ts)
 - [route.ts](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-appmesh/lib/route.ts)

Fixes #16821

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
In #17668, cross-account S3 asset publishing was broken.

The reason is that the `account()` function was always broken, using the
default account instead of the target account. However, previously this
function was only called in an irrecoverable situation anyway, and its
failure would be rare.

The recent change also calls this function for logging purposes in
a happy-case scenario, but then triggers an error during the logging.

Fix the invocation to use the right account.

Fixes #17988.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
fixes #15847

A bug in the automatic lockfile finding logic causes lockfiles higher in the directory tree to be used over lower/closer ones. This is because the code traverses the tree once per lockfile type in series, stopping when it finds one: https://github.com/aws/aws-cdk/blob/58fda9104ad884026d578dc0602f7d64dd533f6d/packages/%40aws-cdk/aws-lambda-nodejs/lib/function.ts#L137-L139

This updates the code to traverse the tree once looking for all the lockfile types at the same time and stop when one or more is found. If multiple are found at the same level, an error is thrown (per #15847 (comment)).

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The current pinned versions of urllib3 and Pillow have known security
vulnerabilities. Upgrading those to fixed versions to remove the
security advisory alerts against the repository.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
When ubergen generate a barebones README for an experimental package's
stable variant, add in a paragraph that directs users to the
experimental library so they have an easier time finding it.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@gitpod-io
Copy link

gitpod-io bot commented Dec 15, 2021

@aws-cdk-automation aws-cdk-automation added pr/auto-approve Notifies the GH action to auto-approve this PR pr/no-squash This PR should be merged instead of squash-merging it labels Dec 15, 2021
@aws-cdk-automation
Copy link
Collaborator Author

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 060675d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 4f5c27c into v2-release Dec 15, 2021
@mergify mergify bot deleted the bump/2.2.0 branch December 15, 2021 09:39
@mergify
Copy link
Contributor

mergify bot commented Dec 15, 2021

Thank you for contributing! Your pull request will be automatically updated and merged without squashing (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/auto-approve Notifies the GH action to auto-approve this PR pr/no-squash This PR should be merged instead of squash-merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.