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

merging new changes from master of aws/aws-cdk #1

Merged
merged 25 commits into from
Sep 26, 2020
Merged

Conversation

ap00rv
Copy link
Owner

@ap00rv ap00rv commented Sep 26, 2020


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

AWS CDK Team and others added 25 commits September 22, 2020 03:05
…anges (#10483)

----

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

Caused by JSII issue: aws/jsii#2040

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
See [CHANGELOG](https://github.com/aws/aws-cdk/blob/merge-back/1.64.0/CHANGELOG.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Now that we suppress output of non-failing tests, it becomes
all the more important to have detailed information for failing tests.


----

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

The change introduced in #9576 did not handle the "staging disabled"
case. As a consequence, when bundling the staged path was always
relative.

Revert to the behavior that was present before this change: when staging
is disabled the staged path is absolute (whether bundling or not).

Closes #10367


----

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

We can't actually do this. There are tests that check that the output of the `cdk` command is *exactly* "some value", and adding the logging in breaks the expectation.

Revert the `-v` to allow the tests to go back to passing 90% of the time.
…stances (#10324)

fixes #9926

Added the following parameters to DatabaseCluster.
* AutoMinorVersionUpgrade
* AllowMajorVersionUpgrade
* DeleteAutomatedBackups

#10092 as a reference, only defined simple parameters.

----

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

Closes #8953

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ependency and breaks deployment (#10536)

In version [`1.62.0`](https://github.com/aws/aws-cdk/releases/tag/v1.62.0) we introduced the ability to run `kubectl` commands on imported clusters. (See #9802).

Part of this change included some refactoring with regards to how we use and create the `KubectlProvider`.
Looks like we didn't consistently apply the same logic across all constructs that use it.

Case in point:

https://github.com/aws/aws-cdk/blob/e349004a522e2123c1e93bd3402dd7c3f9c5c17c/packages/%40aws-cdk/aws-eks/lib/k8s-manifest.ts#L58

Notice that here we use `this` as the scope to the `getOrCreate` call. Same goes for:

https://github.com/aws/aws-cdk/blob/e349004a522e2123c1e93bd3402dd7c3f9c5c17c/packages/%40aws-cdk/aws-eks/lib/k8s-object-value.ts#L64

However, `KubernetesPatch` use `scope` instead.

https://github.com/aws/aws-cdk/blob/e349004a522e2123c1e93bd3402dd7c3f9c5c17c/packages/%40aws-cdk/aws-eks/lib/k8s-patch.ts#L74

This means that the entire `scope` of the `KubernetesPatch` now depends, among others, on the `kubectlBarrier`. 
The scope will usually be either the cluster itself (when using `FargateCluster`), or the entire stack (when using `new KubernetesPatch`). In any case, the scope will most likely contain the cluster VPC.

This creates the following dependency cycle: `Cluster => ClusterVpc => KubectlBarrier => Cluster`.

The fix aligns the `KubernetesPatch` behavior to all other `kubectl` constructs and uses `this` as the scope, which will only add dependency on the barrier to the custom resource representing the patch.

Fixes #10528
Fixes #10537

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Following up on #10503, enabling verbose logging for integ tests. 
opt out for tests that relies on exact match of the output:

* 'cdk synth' - match the output of `synth`. 
* 'Two ways of shoing the version' - This one is tricker. Since `--version` is implemnted using `.version()` of `yargs` it ignores the `-v` argument, but `version` (no dash) which is our implementation respect it. 
```
$cdk version -v
CDK toolkit version: 1.63.0 (build 7a68125)
.... blah blah                                                                                                                                                                                                                          
```
 vs:

```
$cdk --version -v 
1.63.0 (build 7a68125)
```

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ependency and breaks deployment (#10536)

In version [`1.62.0`](https://github.com/aws/aws-cdk/releases/tag/v1.62.0) we introduced the ability to run `kubectl` commands on imported clusters. (See #9802).

Part of this change included some refactoring with regards to how we use and create the `KubectlProvider`.
Looks like we didn't consistently apply the same logic across all constructs that use it.

Case in point:

https://github.com/aws/aws-cdk/blob/e349004a522e2123c1e93bd3402dd7c3f9c5c17c/packages/%40aws-cdk/aws-eks/lib/k8s-manifest.ts#L58

Notice that here we use `this` as the scope to the `getOrCreate` call. Same goes for:

https://github.com/aws/aws-cdk/blob/e349004a522e2123c1e93bd3402dd7c3f9c5c17c/packages/%40aws-cdk/aws-eks/lib/k8s-object-value.ts#L64

However, `KubernetesPatch` use `scope` instead.

https://github.com/aws/aws-cdk/blob/e349004a522e2123c1e93bd3402dd7c3f9c5c17c/packages/%40aws-cdk/aws-eks/lib/k8s-patch.ts#L74

This means that the entire `scope` of the `KubernetesPatch` now depends, among others, on the `kubectlBarrier`. 
The scope will usually be either the cluster itself (when using `FargateCluster`), or the entire stack (when using `new KubernetesPatch`). In any case, the scope will most likely contain the cluster VPC.

This creates the following dependency cycle: `Cluster => ClusterVpc => KubectlBarrier => Cluster`.

The fix aligns the `KubernetesPatch` behavior to all other `kubectl` constructs and uses `this` as the scope, which will only add dependency on the barrier to the custom resource representing the patch.

Fixes #10528
Fixes #10537

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
See [CHANGELOG](https://github.com/aws/aws-cdk/blob/patch/v1.64.1/CHANGELOG.md)

----

*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*
…10546)

As it turns out, `Fn::GetAtt` can be passed a string argument not only in YAML,
but in JSON CloudFormation templates as well.
Handle that case in our template parser for `cfn-include`.

This handling allows us to stop special-casing transforming the short-form
`!GetAtt` in our YAML parsing.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
One more resource attribute that we missed,
and that is needed for cfn-include to be able to handle ingesting all templates.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@ap00rv ap00rv self-assigned this Sep 26, 2020
@ap00rv ap00rv merged commit 1aacd1c into ap00rv:master Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants