Skip to content

Commit

Permalink
chore(release): 1.89.0
Browse files Browse the repository at this point in the history
See CHANGELOG
  • Loading branch information
Elad Ben-Israel committed Feb 9, 2021
2 parents f65009b + 7e6e5d6 commit df7253c
Show file tree
Hide file tree
Showing 230 changed files with 4,136 additions and 555 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/auto-approve-v2-merge-forward.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/v2-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Automated actions for PRs against the v2-main branch
name: v2
on:
pull_request:
branches:
- v2-main
types:
- labeled
- opened
- ready_for_review
- reopened
- synchronize
- unlabeled
- unlocked

jobs:
# Run yarn pkglint on merge forward PRs and commit the results
pkglint:
if: contains(github.event.pull_request.labels.*.name, 'pr/forward-merge')
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
branch: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: lint
run: |-
yarn install --frozen-lockfile
yarn pkglint
- name: push
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'automatic pkglint fixes'

# Approve automated PRs
# Only approve! mergify takes care of the actual merge.
auto-approve:
if: >
github.event.pull_request.user.login == 'aws-cdk-automation'
&& contains(github.event.pull_request.labels.*.name, 'pr/auto-approve')
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v2.0.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
13 changes: 8 additions & 5 deletions .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v2.1.0
uses: actions/setup-node@v2.1.4
with:
node-version: 10

Expand Down Expand Up @@ -55,12 +55,15 @@ jobs:
lerna exec --parallel ncu -- --upgrade --filter=@types/node,@types/fs-extra --target=minor
lerna exec --parallel ncu -- --upgrade --filter=typescript --target=patch
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/fs-extra,constructs,typescript,aws-sdk,${{ steps.list-packages.outputs.list }}' --target=minor
# This will create a brand new `yarn.lock` file (this is more efficient than `yarn install && yarn upgrade`)
- name: Run "yarn install --force"
run: yarn install --force
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run)
- name: Run "yarn install"
run: yarn install

- name: Run "yarn upgrade"
run: yarn upgrade

- name: Make Pull Request
uses: peter-evans/create-pull-request@v2
uses: peter-evans/create-pull-request@v3
with:
# Git commit details
branch: automation/yarn-upgrade
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

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.89.0](https://github.com/aws/aws-cdk/compare/v1.88.0...v1.89.0) (2021-02-09)


### Features

* **cfnspec:** cloudformation spec v26.0.0 ([#12841](https://github.com/aws/aws-cdk/issues/12841)) ([f959b3a](https://github.com/aws/aws-cdk/commit/f959b3a2eeb5a9a9e44ea3f88622f77f7667bfa4))
* **cloudfront:** add support for TrustedKeyGroups in Distribution and CloudFrontWebDistribution ([#12847](https://github.com/aws/aws-cdk/issues/12847)) ([349a6e2](https://github.com/aws/aws-cdk/commit/349a6e2bfaa72440deb3767fb1e28e38cc4d73ef)), closes [#11791](https://github.com/aws/aws-cdk/issues/11791)
* **core:** configure bundling docker entrypoint ([#12660](https://github.com/aws/aws-cdk/issues/12660)) ([6597a09](https://github.com/aws/aws-cdk/commit/6597a09310fbc13d43389eca91b0e4b26f8ca680)), closes [#11984](https://github.com/aws/aws-cdk/issues/11984)
* **ec2:** can define Launch Templates (not use them yet) ([#12385](https://github.com/aws/aws-cdk/issues/12385)) ([32c0de7](https://github.com/aws/aws-cdk/commit/32c0de74cf40f08a291c8589fd85f3dd636749ea))
* **lambda:** layer version removal policy ([#12792](https://github.com/aws/aws-cdk/issues/12792)) ([5664480](https://github.com/aws/aws-cdk/commit/5664480a97958263ee7cb903c2aff0276e738dc3)), closes [#12718](https://github.com/aws/aws-cdk/issues/12718)
* **lambda:** nodejs14.x runtime ([#12861](https://github.com/aws/aws-cdk/issues/12861)) ([12c224a](https://github.com/aws/aws-cdk/commit/12c224a0f54230b6226de8defa527f7b53f9bc65))


### Bug Fixes

* **core:** append file extension to s3 asset key in new style synthesizer ([#12765](https://github.com/aws/aws-cdk/issues/12765)) ([77b9d39](https://github.com/aws/aws-cdk/commit/77b9d3930ec722be3a40e4013cd9335f90b0d945)), closes [#12740](https://github.com/aws/aws-cdk/issues/12740)
* **core:** incorrect GetParameter permissions in nonstandard partitions ([#12813](https://github.com/aws/aws-cdk/issues/12813)) ([be7202f](https://github.com/aws/aws-cdk/commit/be7202fa229435607e81d480726e9ce7f625b85a))
* **ec2:** MachineImage.genericLinux/Windows don't work in environment-agnostic stacks ([#12546](https://github.com/aws/aws-cdk/issues/12546)) ([fbe7e89](https://github.com/aws/aws-cdk/commit/fbe7e89ba764093ddec9caa7de3ca921f3dc68ac)), closes [#8759](https://github.com/aws/aws-cdk/issues/8759)
* **ec2:** Subnet cidr missing for Vpc.from_lookup() ([#12878](https://github.com/aws/aws-cdk/issues/12878)) ([9028269](https://github.com/aws/aws-cdk/commit/90282693999efdc43330b9526b9d7f4cd0fa5736)), closes [#11821](https://github.com/aws/aws-cdk/issues/11821)
* **ec2:** VpnConnection fails if `ip` is a Token ([#12923](https://github.com/aws/aws-cdk/issues/12923)) ([953957a](https://github.com/aws/aws-cdk/commit/953957a2c3e630b5ad2196e113f943e27ee21067)), closes [#11633](https://github.com/aws/aws-cdk/issues/11633)
* **kms:** cross-environment usage fails when trustAccountIdentities is set ([#12925](https://github.com/aws/aws-cdk/issues/12925)) ([2b917ec](https://github.com/aws/aws-cdk/commit/2b917eceb598b3365123781445df7e2bd8a80b74)), closes [#12921](https://github.com/aws/aws-cdk/issues/12921) [#12741](https://github.com/aws/aws-cdk/issues/12741)
* **lambda-python:** cryptography >= 3.4 is not supported by older pip version ([#12934](https://github.com/aws/aws-cdk/issues/12934)) ([b68acf8](https://github.com/aws/aws-cdk/commit/b68acf828e04841dd7e62b30fe80db8c25e5d96e)), closes [/cryptography.io/en/3.4/changelog.html#v3-4](https://github.com/aws//cryptography.io/en/3.4/changelog.html/issues/v3-4)

## [1.88.0](https://github.com/aws/aws-cdk/compare/v1.87.1...v1.88.0) (2021-02-03)


Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assert/lib/assertions/have-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class HaveResourceAssertion extends JestFriendlyAssertion<StackInspector>
properties === undefined ? anything() :
allowValueExtension ? deepObjectLike(properties) :
objectLike(properties);
this.part = part !== undefined ? part : ResourcePart.Properties;
this.part = part ?? ResourcePart.Properties;
}

public assertUsing(inspector: StackInspector): boolean {
Expand Down
6 changes: 5 additions & 1 deletion packages/@aws-cdk/assets/lib/staging.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { AssetStaging, Construct } from '@aws-cdk/core';
import { AssetStaging } from '@aws-cdk/core';
import { toSymlinkFollow } from './compat';
import { FingerprintOptions } from './fs/options';

// keep this import separate from other imports to reduce chance for merge conflicts with v2-main
// eslint-disable-next-line no-duplicate-imports, import/order
import { Construct } from '@aws-cdk/core';

/**
* Deprecated
* @deprecated use `core.AssetStagingProps`
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-amplify/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ export class App extends Resource implements IApp, iam.IGrantable {
basicAuthConfig: props.autoBranchCreation.basicAuth && props.autoBranchCreation.basicAuth.bind(this, 'BranchBasicAuth'),
buildSpec: props.autoBranchCreation.buildSpec && props.autoBranchCreation.buildSpec.toBuildSpec(),
enableAutoBranchCreation: true,
enableAutoBuild: props.autoBranchCreation.autoBuild === undefined ? true : props.autoBranchCreation.autoBuild,
enableAutoBuild: props.autoBranchCreation.autoBuild ?? true,
environmentVariables: Lazy.any({ produce: () => renderEnvironmentVariables(this.autoBranchEnvironmentVariables ) }, { omitEmptyArray: true }), // eslint-disable-line max-len
enablePullRequestPreview: props.autoBranchCreation.pullRequestPreview === undefined ? true : props.autoBranchCreation.pullRequestPreview,
enablePullRequestPreview: props.autoBranchCreation.pullRequestPreview ?? true,
pullRequestEnvironmentName: props.autoBranchCreation.pullRequestEnvironmentName,
stage: props.autoBranchCreation.stage,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-amplify/lib/branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ export class Branch extends Resource implements IBranch {
branchName,
buildSpec: props.buildSpec && props.buildSpec.toBuildSpec(),
description: props.description,
enableAutoBuild: props.autoBuild === undefined ? true : props.autoBuild,
enablePullRequestPreview: props.pullRequestPreview === undefined ? true : props.pullRequestPreview,
enableAutoBuild: props.autoBuild ?? true,
enablePullRequestPreview: props.pullRequestPreview ?? true,
environmentVariables: Lazy.any({ produce: () => renderEnvironmentVariables(this.environmentVariables) }, { omitEmptyArray: true }),
pullRequestEnvironmentName: props.pullRequestEnvironmentName,
stage: props.stage,
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amplify/lib/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class Domain extends Resource {
private renderSubDomainSettings() {
return this.subDomains.map(s => ({
branchName: s.branch.branchName,
prefix: s.prefix === undefined ? s.branch.branchName : s.prefix,
prefix: s.prefix ?? s.branch.branchName,
}));
}
}
Expand Down
6 changes: 5 additions & 1 deletion packages/@aws-cdk/aws-apigateway/lib/deployment.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import * as crypto from 'crypto';
import { Construct as CoreConstruct, Lazy, RemovalPolicy, Resource, CfnResource } from '@aws-cdk/core';
import { Lazy, RemovalPolicy, Resource, CfnResource } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { CfnDeployment } from './apigateway.generated';
import { Method } from './method';
import { IRestApi, RestApi, SpecRestApi, RestApiBase } from './restapi';

// keep this import separate from other imports to reduce chance for merge conflicts with v2-main
// eslint-disable-next-line no-duplicate-imports, import/order
import { Construct as CoreConstruct } from '@aws-cdk/core';

export interface DeploymentProps {
/**
* The Rest API to deploy.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apigateway/lib/integrations/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface HttpIntegrationProps {
*/
export class HttpIntegration extends Integration {
constructor(url: string, props: HttpIntegrationProps = { }) {
const proxy = props.proxy !== undefined ? props.proxy : true;
const proxy = props.proxy ?? true;
const method = props.httpMethod || 'GET';
super({
type: proxy ? IntegrationType.HTTP_PROXY : IntegrationType.HTTP,
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class LambdaIntegration extends AwsIntegration {
private readonly enableTest: boolean;

constructor(handler: lambda.IFunction, options: LambdaIntegrationOptions = { }) {
const proxy = options.proxy === undefined ? true : options.proxy;
const proxy = options.proxy ?? true;

super({
proxy,
Expand All @@ -51,7 +51,7 @@ export class LambdaIntegration extends AwsIntegration {
});

this.handler = handler;
this.enableTest = options.allowTestInvoke === undefined ? true : options.allowTestInvoke;
this.enableTest = options.allowTestInvoke ?? true;
}

public bind(method: Method): IntegrationConfig {
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-apigateway/lib/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export abstract class ResourceBase extends ResourceConstruct implements IResourc
//
// statusCode

const statusCode = options.statusCode !== undefined ? options.statusCode : 204;
const statusCode = options.statusCode ?? 204;

//
// prepare responseParams
Expand Down Expand Up @@ -522,7 +522,7 @@ export class ProxyResource extends Resource {
defaultMethodOptions: props.defaultMethodOptions,
});

const anyMethod = props.anyMethod !== undefined ? props.anyMethod : true;
const anyMethod = props.anyMethod ?? true;
if (anyMethod) {
this.anyMethod = this.addMethod('ANY');
}
Expand Down
10 changes: 5 additions & 5 deletions packages/@aws-cdk/aws-apigateway/lib/restapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ export abstract class RestApiBase extends Resource implements IRestApi {
}

protected configureDeployment(props: RestApiOptions) {
const deploy = props.deploy === undefined ? true : props.deploy;
const deploy = props.deploy ?? true;
if (deploy) {

this._latestDeployment = new Deployment(this, 'Deployment', {
Expand Down Expand Up @@ -593,7 +593,7 @@ export class SpecRestApi extends RestApiBase {
name: this.restApiName,
policy: props.policy,
failOnWarnings: props.failOnWarnings,
body: apiDefConfig.inlineDefinition ? apiDefConfig.inlineDefinition : undefined,
body: apiDefConfig.inlineDefinition ?? undefined,
bodyS3Location: apiDefConfig.inlineDefinition ? undefined : apiDefConfig.s3Location,
endpointConfiguration: this._configureEndpoints(props),
parameters: props.parameters,
Expand All @@ -608,7 +608,7 @@ export class SpecRestApi extends RestApiBase {
this.addDomainName('CustomDomain', props.domainName);
}

const cloudWatchRole = props.cloudWatchRole !== undefined ? props.cloudWatchRole : true;
const cloudWatchRole = props.cloudWatchRole ?? true;
if (cloudWatchRole) {
this.configureCloudWatchRole(resource);
}
Expand Down Expand Up @@ -700,13 +700,13 @@ export class RestApi extends RestApiBase {
binaryMediaTypes: props.binaryMediaTypes,
endpointConfiguration: this._configureEndpoints(props),
apiKeySourceType: props.apiKeySourceType,
cloneFrom: props.cloneFrom ? props.cloneFrom.restApiId : undefined,
cloneFrom: props.cloneFrom?.restApiId,
parameters: props.parameters,
});
this.node.defaultChild = resource;
this.restApiId = resource.ref;

const cloudWatchRole = props.cloudWatchRole !== undefined ? props.cloudWatchRole : true;
const cloudWatchRole = props.cloudWatchRole ?? true;
if (cloudWatchRole) {
this.configureCloudWatchRole(resource);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export abstract class BaseScalableAttribute extends CoreConstruct {
scalableDimension: this.props.dimension,
resourceId: this.props.resourceId,
role: this.props.role,
minCapacity: props.minCapacity !== undefined ? props.minCapacity : 1,
minCapacity: props.minCapacity ?? 1,
maxCapacity: props.maxCapacity,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function orderAndCompleteIntervals(intervals: ScalingInterval[]): CompleteScalin
intervals = intervals.map(x => ({ ...x }));

// Sort by whatever number we have for each interval
intervals.sort(comparatorFromKey((x: ScalingInterval) => x.lower !== undefined ? x.lower : x.upper));
intervals.sort(comparatorFromKey((x: ScalingInterval) => x.lower ?? x.upper));

// Propagate boundaries until no more change
while (propagateBounds(intervals)) { /* Repeat */ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import * as kms from '@aws-cdk/aws-kms';
import * as lambda from '@aws-cdk/aws-lambda';
import * as sns from '@aws-cdk/aws-sns';
import * as subs from '@aws-cdk/aws-sns-subscriptions';
import { Construct } from '@aws-cdk/core';

import { TopicHook } from './topic-hook';

// keep this import separate from other imports to reduce chance for merge conflicts with v2-main
// eslint-disable-next-line no-duplicate-imports, import/order
import { Construct } from '@aws-cdk/core';

/**
* Use a Lambda Function as a hook target
*
Expand Down
9 changes: 4 additions & 5 deletions packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -957,9 +957,8 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements

// desiredCapacity just reflects what the user has supplied.
const desiredCapacity = props.desiredCapacity;
const minCapacity = props.minCapacity !== undefined ? props.minCapacity : 1;
const maxCapacity = props.maxCapacity !== undefined ? props.maxCapacity :
desiredCapacity !== undefined ? desiredCapacity : Math.max(minCapacity, 1);
const minCapacity = props.minCapacity ?? 1;
const maxCapacity = props.maxCapacity ?? desiredCapacity ?? Math.max(minCapacity, 1);

withResolved(minCapacity, maxCapacity, (min, max) => {
if (min > max) {
Expand Down Expand Up @@ -1009,7 +1008,7 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements
const { subnetIds, hasPublic } = props.vpc.selectSubnets(props.vpcSubnets);
const asgProps: CfnAutoScalingGroupProps = {
autoScalingGroupName: this.physicalName,
cooldown: props.cooldown !== undefined ? props.cooldown.toSeconds().toString() : undefined,
cooldown: props.cooldown?.toSeconds().toString(),
minSize: Tokenization.stringifyNumber(minCapacity),
maxSize: Tokenization.stringifyNumber(maxCapacity),
desiredCapacity: desiredCapacity !== undefined ? Tokenization.stringifyNumber(desiredCapacity) : undefined,
Expand Down Expand Up @@ -1509,7 +1508,7 @@ enum HealthCheckType {
* Render the rolling update configuration into the appropriate object
*/
function renderRollingUpdateConfig(config: RollingUpdateConfiguration = {}): CfnAutoScalingRollingUpdate {
const waitOnResourceSignals = config.minSuccessfulInstancesPercent !== undefined ? true : false;
const waitOnResourceSignals = config.minSuccessfulInstancesPercent !== undefined;
const pauseTime = config.pauseTime || (waitOnResourceSignals ? Duration.minutes(5) : Duration.seconds(0));

return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { Construct } from '@aws-cdk/core';

import { ILifecycleHook } from './lifecycle-hook';

// keep this import separate from other imports to reduce chance for merge conflicts with v2-main
// eslint-disable-next-line no-duplicate-imports, import/order
import { Construct } from '@aws-cdk/core';

/**
* Interface for autoscaling lifecycle hook targets
*/
Expand Down
6 changes: 5 additions & 1 deletion packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { Construct as CoreConstruct, Duration, Lazy } from '@aws-cdk/core';
import { Duration, Lazy } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { IAutoScalingGroup } from './auto-scaling-group';
import { CfnScalingPolicy } from './autoscaling.generated';

// keep this import separate from other imports to reduce chance for merge conflicts with v2-main
// eslint-disable-next-line no-duplicate-imports, import/order
import { Construct as CoreConstruct } from '@aws-cdk/core';

/**
* Properties for a scaling policy
*/
Expand Down
6 changes: 5 additions & 1 deletion packages/@aws-cdk/aws-autoscaling/lib/step-scaling-policy.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { findAlarmThresholds, normalizeIntervals } from '@aws-cdk/aws-autoscaling-common';
import * as cloudwatch from '@aws-cdk/aws-cloudwatch';
import { Construct as CoreConstruct, Duration } from '@aws-cdk/core';
import { Duration } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { IAutoScalingGroup } from './auto-scaling-group';
import { AdjustmentType, MetricAggregationType, StepScalingAction } from './step-scaling-action';

// keep this import separate from other imports to reduce chance for merge conflicts with v2-main
// eslint-disable-next-line no-duplicate-imports, import/order
import { Construct as CoreConstruct } from '@aws-cdk/core';

export interface BasicStepScalingPolicyProps {
/**
* Metric to scale on.
Expand Down
Loading

0 comments on commit df7253c

Please sign in to comment.