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): 1.60.0 #9845

Merged
merged 66 commits into from
Aug 19, 2020
Merged

chore(release): 1.60.0 #9845

merged 66 commits into from
Aug 19, 2020

Conversation

aws-cdk-automation
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation commented Aug 19, 2020

See CHANGELOG

Jerry Kindall and others added 30 commits August 14, 2020 15:53
Add information about AWS Construct Library module stability to repo README for highest possible visibility
**[ISSUE]**
Appsync missing `fromXxx` functionality, making multiple stack appsync interaction impossible. 

**[Approach]**
Created a base class for  `GraphQLApi` and a `IGraphQLApi` interface for imports. Added `fromXxxAttributes` functions to code base that can add dataSources.

**[Notes]**
Only accessible props from `IGraphQLApi` are `apiId` and `arn`. Only accessible functions from `IGraphQLApi` are the `addXxxDataSource` functions.

Added `props-physical-name:@aws-cdk/aws-appsync.GraphQLApiProps` as linter exception because the breaking change isn't worth the return of making the physical name (name exists already).

Added `from-method:@aws-cdk/aws-appsync.GraphQLApi` as linter exception because a `fromGraphQLApiAttributes` function will turn into `from_graph_q_l_api_attributes` in python.

Fixes #6959 

BREAKING CHANGE: **appsync.addXxxDataSource** `name` and `description` props are now optional and in an `DataSourceOptions` interface. 
- **appsync**:  the props `name` and `description` in `addXxxDataSource` have been moved into new props `options`  of type `DataSourceOptions`
- **appsync**: `DataSourceOptions.name` defaults to id
- **appsync**: `DataSourceOptions.description` defaults to undefined

----

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

AppSync now able to generate a code-first approach to generating object and interface types through code. You can also append to schema through the `GraphQLApi.appendToSchema` function. 

Feature List:
- GraphqlTypes
- InterfaceTypes
- ObjectTypes
- Directives

All details can be found in the README.md

Fixes #9307 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Prereq check before `yarn build` fails when there are spaces in the
path. This is common for WSL2 on windows. For example, mvn is in the
path at `/mnt/c/Program Files/`.

Testing - Ran check on linux paths and windows paths with and without
spaces. Tested with correct version, wrong version, and missing dep.

fixes #9749
chore(core): Prereq check - support paths with spaces.
Add the `autoBranchDeletion` prop to control automatic branch deletion.

Closes #9650


----

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

This might be the PR with the highest explanation/code ratio i've ever made :)

When a value changes for an AMI in a managed SSM store parameter, it should not cause a replacement of the ASG nodes. The reasoning is that managed params can change over time with no control on the user's part. Because of this, the change will not be reflected in `cdk diff` and creates a situation where every deployment can potentially cause node replacement without notice.

There are two scenarios in which the cluster interacts with an `AutoScalingGroup`

### `addCapacity`

When one uses `cluster.addCapacity`, we implicitly create an `AutoScalingGroup` that uses either the `BottleRocketImage` or the `EksOptimizedImage` as the machine image, with no option to customize it. Both these images fetch their AMI's from a managed SSM parameter (`/aws/service/eks/optimized-ami` or `/aws/service/bottlerocket`). This means that we create the situation described above by **default**. 

https://github.com/aws/aws-cdk/blob/5af718bab8522f1a4e7f70e7221f4878a15aa4a4/packages/%40aws-cdk/aws-eks/lib/cluster.ts#L779-L785

Seems like a more reasonable default in this case would be to use `UpdateType.NONE` instead of `UpdateType.RollingUpdate`. 

Note that in such a case, even if the user explicitly changes the machine image configuration (by specifying a different `machineImageType`), node replacement will not occur, even though `cdk diff` will clearly show a configuration change.

In any case, the `updateType` can always be explicitly passed to mitigate any issue caused by the default behavior. 

### `addAutoScalingGroup`

When one uses `cluster.addAutoScalingGroup`, the `AutoScalingGroup` is created by the user. The default value for `updateType` in the `AutoScalingGroup` construct is `UpdateType.NONE`, so unless the user explicitly configured `UpdateType.RollingUpdate` - node replacement should not occur. 

Having said that, when a user specifies `UpdateType.RollingUpdate`, its not super intuitive that this update might happen without any explicit configuration change, and in fact this is actually documented in the images that use SSM to fetch the API:

https://github.com/aws/aws-cdk/blob/5af718bab8522f1a4e7f70e7221f4878a15aa4a4/packages/%40aws-cdk/aws-ec2/lib/machine-image.ts#L216-L226

-------------------------------------------

There is no way for us to selectively apply the update policy, we either dont use it at all, meaning intentional user changes won't replace nodes as well, or we use it for all, meaning implicit changes will cause it.

Ideally, we should consider moving away from using these managed SSM params in launch configurations, but that requires some additional investigation. 

The PR simply suggests to remove the `UpdateType.RollingUpdate` default from the `addCapacity` method, as a form of balance between all the considerations mentioned above.  

Fixes #7273

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Configure `comma-spacing`, `no-multi-spaces`, `array-bracket-spacing`,
`array-bracket-newline`, `object-curly-spacing`, `object-curly-newline` and
`object-property-newline` to uniformize arrays and objects.

* Valid arrays (no bracket spacing, no space before comma, a single space after
comma):

```ts
[1, 2, 3]

[
  1,
  2,
  3,
]

[
  1, 2,
  3, 4,
]
```
* Valid objects (curly spacing):

```ts
{ key: 'value' }

{ key1: 'value1', key2: 'value2 }

{
  key1: 'value1',
  key2: 'value2',
}
```

----

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

follow up fix to #9285

currently the lambda construct provides support for profiling group creation via a boolean prop. however, the profiling group creation doesn't set the ComputePlatform value which is required to profile in lambda compute environment.

this PR explicitly sets the ComputePlatform when defining the profiling group in the Function construct. 

----

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

Do not rename the dist file if it's already named `index.js`.

Fixes #9709


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Enable users to associate one or more alternate domain names with a
distribution. Originally, the plan was for this to come directly from the
certificate (if provided); however, the `ICertificate` does not include the
certificate domains.

Given adding a certificate without specifying the aliases is effectively a
no-op (the certificate will never be used), opted to make this an error instead
of a warning (a breaking change). Open to discussion and debate on this point.

BREAKING CHANGE: Distribution: `.domains` must be specified if `certificate` is provided.


----

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

Fix latest AWS SDK installation for `AwsCustomResource` and add option to
disable it.

Closes #9289
Closes #9322


----

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

Cloudformation Init (cfn-init) support was introduced in #9065 with a minimal
set of support for various init element types. This PR is a continuation of
that support (based on the original #8788), and adds the remaining init element
types: files, packages, sources, users, and groups.

With this PR, CloudFormation init support for EC2 instances is complete. A final
PR will be submitted to extend this support to auto-scaling groups (again, based
on the original work done in #8788).

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
With these changes AWS CDK now supports `mfa_serial` field so when profile has `mfa_serial` set the user is asked for MFA token. If user then adds corrects short lived token they will get access to environment.

Example config for assume role with MFA that will be supported after these changes.
```
[profile mfa]
region=eu-west-1

[profile mfa-role]
source_profile=mfa
role_arn=arn:aws:iam::account:role/role
mfa_serial=arn:aws:iam::account:mfa/user
```

These changes currently only have one test as I don't have enough knowledge of the code base to write better tests. Current test only checks that user is asked for token by looking at the error message which should result in invalid token.

Fixes: #1248

----

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

<!-- 
Please read the contribution guidelines and follow the pull-request checklist:
https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md
 -->
fixes #9687


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixing the typo in doc string in applicationautoscaling.

Fixes : #9678


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
[Problem]
CDK documentation for Cognito specifies an incorrect property (accountRecoverySettings -> accountRecovery)

[Solution]
Updated the documentation to use the correct property.


----

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

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ers in a FilterGroup (#9725)

Remove blocking validation on GitHub webhook file path filter when `event` is `PUSH` only.

Fixes #8867

----

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

Closes #9524

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Bundle locally if Parcel v2 is installed.

Closes #9120
Closes #9639
Closes #9153 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.3.1 to 7.3.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Hi there, the actual option for DatabaseInstance is vpcPlacement, not vpcSubnets which is for DatabaseCluster. Still, I wonder if the two options should be aligned.

Thanks!

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.20.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.19...4.17.20)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.17.27 to 10.17.28.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
robertd and others added 22 commits August 18, 2020 20:03
…9810)

Minor fix:  parameter name in aws-cloudfront module docs.

----

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

Windows Server 2019 based images should have environment type
WINDOWS_SERVER_2019_CONTAINER. WindowsBuildImage uses the
WINDOWS_CONTAINER environment type. This patch solves this by adding a
WindowsImageType enum to the options passed the WindowsBuildImage
constructor that is used to correctly populate the type field.

fixes #9484

----

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

Artifact path was incorrectly set to use the artifact location instead of the filename.

Fixes #9767

---

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

Minor refactoring of the README to inline the examples (from the `.lit.ts`
files), and to explicitly call out the yearly certificate limit.

fixes #5889

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.735.0 to 2.736.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.735.0...v2.736.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
…string values (#9814)

----

Closes #9813 

This allows

`DependsOn: "A"` and `DependsOn: ["A"]`

and

`DependsOn: ["A", "B"]` and `DependsOn: ["B", "A"]` to be equivalent.

----

It also fixes a bug that would cause 

`BucketName: { 'Fn::Select': [0, ['name2', 'name1']] }`

and

`BucketName: { 'Fn::Select': [0, ['name1', 'name2']] }`

to be equal.

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

`aws-lambda-python` originally used `rsync` to move lambda code into `/asset-output`, but I switched to `cp` in #9355 to resolve #9349 as `rsync` isn't installed in the python3.8 sam docker image.

This change introduces a Dockerfile derived from the `bundlingDockerImage` of the runtime which installs `rsync` if it's missing.

While this feels a bit heavy-handed, I had been planning to introduce a Dockerfile to setup a working pip cache after #9582 lands.

I'm also happy to take a different approach if you'd prefer, @eladb. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The constructor was getting a bit long (~200 lines), so did a quick refactor to
pull out the import/export and instance creation into their own methods. Also
added some optional chaining and fixed a typo in the README.

----

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

Fixes #9711

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This builds on #9772 to add validation for the types of logs that are available
on each cluster type (by engine).

Notes:
* Currently a draft: I want feedback on this approach before either adding some
  constants for ease-of-use and porting a similar approach to instances.
* This is built off of #9772, so includes the changes from #9772 while it is
  pending a push/merge.
* Added pr-linter/exempt-readme label (for now) as the current change is validation only.
  Will add README changes if/when this includes some usable constants.

----

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

Check version and function compatibility when a Lambda is used for
Lambda@Edge. Environment variables can be marked as "removable" when
used for Lambda@Edge.

Closes #9328
Closes #9453


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Make CLI and `cdk-assets` use regional endpoints by setting
`AWS_STS_REGIONAL_ENDPOINTS=regional`.

While we are configuring the SDK by setting global environment
variables anyway (*shudder*), might as well improve performance
a bit by enabling keepalive on the connections (by setting
`AWS_NODEJS_CONNECTION_REUSE_ENABLED=1`).

Fixes #9223.


----

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

Replaces the single hard-coded value for the origin access identity comment
field with one that refernces the origin's ID.

fixes #9580


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This was missed in #9635; the property was added to DistributionProps but not
included in the underlying CfnDistribution.

fixes #9824

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
unused imports makes the jsii fail because jsii has no chill.

```
.test.ts:1:45 - error TS6133: 'SynthUtils' is declared but its value is never read.
1 import { expect as expectCDK, haveResource, SynthUtils } from '@aws-cdk/assert';
                                              ~~~~~~~~~~
```
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
In #9795, I was under the impression that the `DescribeStackEvents`
would list events in chronological order.

This was a misunderstanding resulting from not reading the documentation--
in fact, the events are returned in reverse chronological order.

The paging logic was therefore wrong and the events would be fed into
the activity printer in the wrong order, leading to incorrect progress
reporting.

This is a critical bug and must be fixed immediately!

While I was in there, fixed two other paper cuts around the
printer at the same time:

- Events occurring near the start of the monitor would be missed. This
  was because time-based filtering would be employed based on the
  client machine's local clock, which might be out of sync with the
  remote clock. Use the server's clock instead, by using the
  `CreationTime` of the ChangeSet as the start time.

- Events occurring near the end of the monitor would be missed. This
  was because `DescribeStackStatus` might return a completion state
  before the monitor had polled the events that led up to the completion.
  Fix by doing a final poll after the stop call has been received,
  so we are guaranteed to have seen all events.

The actual claim in that PR was incorrect. We were *not* quadratic (we
wouldn't list all pages on every tick), we were just more linear than
necessary (we *would* list all pages on the *first* tick... which is still
a lot). The current PR properly fixes the issue by stopping paging
not just if we've already seen the events, but also if the events are
starting to fall outside the time window we are interested in.

This *actually* fixes #9470.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Similarly like we added for the PR build in #9809.

----

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

Fixes #9712

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add the `account` and `region` properties to the `IResource` interface and `Resource` class.
By default, these are equal to the account and region of the Stack the resource belongs to;
however, they can be set to different values in resources that are imported.

Use those new properties in two places:
* In CodePipeline, to determine whether a given action is cross-account
  (with support for specifying the account and region in S3's `BucketAttributes`,
  as a first use case).
* IAM's `addToPrincipalOrResource()`, to correctly know when to modify the receiver's resource policy.
  This is aided by adding an optional `principalAccount` property to `IPrincipal`,
as a way to compare to the account present in the passed `IResource` instance.

Fixes #2807
Fixes #5740
Fixes #7012

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@aws-cdk-automation aws-cdk-automation added the pr/no-squash This PR should be merged instead of squash-merging it label Aug 19, 2020
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@MrArnoldPalmer MrArnoldPalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1️⃣ . 6️⃣ 0️⃣ . 0️⃣

@aws-cdk-automation
Copy link
Collaborator Author

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: cf6c03c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

mergify bot commented Aug 19, 2020

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

@skinny85 skinny85 merged commit 8e3f53a into release Aug 19, 2020
@skinny85 skinny85 deleted the bump/1.60.0 branch August 19, 2020 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.