Skip to content

Commit e4a2c01

Browse files
authored
2 parents 8e95c37 + 515aeb6 commit e4a2c01

File tree

483 files changed

+16771
-5247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

483 files changed

+16771
-5247
lines changed

.github/workflows/pr-linter.yml

+3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ on:
1212
- opened
1313
- synchronize
1414
- reopened
15+
status:
1516

1617
jobs:
1718
validate-pr:
1819
permissions:
1920
contents: read
2021
pull-requests: write
22+
statuses: read
23+
issues: read
2124
runs-on: ubuntu-latest
2225
steps:
2326

.github/workflows/yarn-upgrade.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
(cd $(dirname $pj) && ncu --upgrade --reject='constructs,${{ steps.list-packages.outputs.list }}')
6868
done
6969
# Upgrade dependencies at an aws-eks integ test docker image
70-
cd packages/aws-cdk-lib/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject=',${{ steps.list-packages.outputs.list }}'
70+
cd packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject=',${{ steps.list-packages.outputs.list }}'
7171
7272
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn upgrade" to run)
7373
- name: Run "yarn install"

CHANGELOG.v2.alpha.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
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.
44

5+
## [2.79.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.78.0-alpha.0...v2.79.0-alpha.0) (2023-05-10)
6+
7+
8+
### Bug Fixes
9+
10+
* **servicecatalogappregistry:** Revert deprecated method to keep deprecated method in alpha version ([b20b123](https://github.com/aws/aws-cdk/commit/b20b1f231e12007e7d064cdc4f0c9dc7354827a3))
11+
* **batch:** JobDefinition's ContainerDefinition's Image is synthesized with `[Object object]` ([#25250](https://github.com/aws/aws-cdk/issues/25250)) ([b3d0d57](https://github.com/aws/aws-cdk/commit/b3d0d570fe02e124f4497e35eb87c96c0eb8a1d5))
12+
513
## [2.78.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.77.0-alpha.0...v2.78.0-alpha.0) (2023-05-03)
614

715
## [2.77.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.76.0-alpha.0...v2.77.0-alpha.0) (2023-04-26)

CHANGELOG.v2.md

+19
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
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.
44

5+
## [2.79.0](https://github.com/aws/aws-cdk/compare/v2.78.0...v2.79.0) (2023-05-10)
6+
7+
8+
### Features
9+
10+
* **cfnspec:** cloudformation spec v121.0 ([#25499](https://github.com/aws/aws-cdk/issues/25499)) ([c2ef657](https://github.com/aws/aws-cdk/commit/c2ef6571b7971384a60866b14371f204d30756cd))
11+
* **ecr:** grantRead on repositories ([#25445](https://github.com/aws/aws-cdk/issues/25445)) ([ce7bdea](https://github.com/aws/aws-cdk/commit/ce7bdea1d1b79de517b2b7ff6d4d73212f8a84c3))
12+
* **logs:** support DataProtectionPolicy in LogGroup construct ([#23402](https://github.com/aws/aws-cdk/issues/23402)) ([ed3962a](https://github.com/aws/aws-cdk/commit/ed3962af3a7e532d9a4d16fadb5f472dd065b43f)), closes [#23399](https://github.com/aws/aws-cdk/issues/23399)
13+
14+
15+
### Bug Fixes
16+
17+
* **batch:** JobDefinition's ContainerDefinition's Image is synthesized with `[Object object]` ([#25466](https://github.com/aws/aws-cdk/issues/25466)) ([b3d0d57](https://github.com/aws/aws-cdk/commit/b3d0d570fe02e124f4497e35eb87c96c0eb8a1d5)), closes [#25250](https://github.com/aws/aws-cdk/issues/25250)
18+
* **cfn2ts:** doesn't handle property types with the same type as a primitive type ([#25460](https://github.com/aws/aws-cdk/issues/25460)) ([b76c182](https://github.com/aws/aws-cdk/commit/b76c18287ce452f5b5d27af68028e9f6b47d67b5)), closes [aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json#L1437-L1442](https://github.com/aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json/issues/L1437-L1442) [aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json#L1727-L1742](https://github.com/aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json/issues/L1727-L1742) [#22732](https://github.com/aws/aws-cdk/issues/22732)
19+
* **core:** crossRegionReferences don't work across multiple regions ([#25384](https://github.com/aws/aws-cdk/issues/25384)) ([65265e1](https://github.com/aws/aws-cdk/commit/65265e1297f47a5e8e85ade620095c5af1082290)), closes [#25190](https://github.com/aws/aws-cdk/issues/25190) [#25377](https://github.com/aws/aws-cdk/issues/25377)
20+
* **dynamodb:** fix hardcoded partition in replica-provider IAM policy ([#25428](https://github.com/aws/aws-cdk/issues/25428)) ([b5b4f66](https://github.com/aws/aws-cdk/commit/b5b4f66396cdc1fae3887f82509d30c4c4c6f6d4)), closes [#25407](https://github.com/aws/aws-cdk/issues/25407)
21+
* **elasticloadbalancingv2:** ALB auth return internal server error ([#24510](https://github.com/aws/aws-cdk/issues/24510)) ([75212eb](https://github.com/aws/aws-cdk/commit/75212ebc7a30d822097223ea39a0d58da6fe8d43)), closes [#21939](https://github.com/aws/aws-cdk/issues/21939) [#19035](https://github.com/aws/aws-cdk/issues/19035) [#18944](https://github.com/aws/aws-cdk/issues/18944)
22+
* **servicecatalogappregistry:** Revert deprecated method removing PR to keep deprecated method in alpha version ([#25454](https://github.com/aws/aws-cdk/issues/25454)) ([b20b1f2](https://github.com/aws/aws-cdk/commit/b20b1f231e12007e7d064cdc4f0c9dc7354827a3))
23+
524
## [2.78.0](https://github.com/aws/aws-cdk/compare/v2.77.0...v2.78.0) (2023-05-03)
625

726

CONTRIBUTING.md

+17
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,23 @@ CDK integration tests.
542542
* Make sure to update the PR title/description if things change. The PR title/description are going to be used as the
543543
commit title/message and will appear in the CHANGELOG, so maintain them all the way throughout the process.
544544

545+
#### Getting a review from a maintainer
546+
547+
We get A LOT of pull requests, which is a great thing! To help us prioritize
548+
which pull requests to review we first make sure that the pull request is in a
549+
mergeable state. This means that the pull request:
550+
551+
1. Is ready for review (not a draft)
552+
2. Does not have any merge conflicts
553+
3. Has a passing build
554+
4. Does not have any requested changes by a maintainer
555+
5. Has a passing `PR Linter` workflow **OR** the contributor has requested
556+
an exemption/clarification.
557+
558+
To make this easier we have a `pr/needs-review` label that we can add to each
559+
PR. If you do not see this label on your PR then it means that something needs
560+
to be fixed before it can be reviewed.
561+
545562
#### Adding construct runtime dependencies
546563

547564
Any tool that is not part of the CDK, and needs to be used by a construct during

build.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ check_prereqs="true"
88
check_compat="true"
99
ci="false"
1010
scope=""
11+
concurrency=""
1112
while [[ "${1:-}" != "" ]]; do
1213
case $1 in
1314
-h|--help)
@@ -32,6 +33,10 @@ while [[ "${1:-}" != "" ]]; do
3233
--ci)
3334
ci=true
3435
;;
36+
-c|--concurrency)
37+
concurrency="$2"
38+
shift
39+
;;
3540
*)
3641
echo "Unrecognized parameter: $1"
3742
exit 1
@@ -93,8 +98,14 @@ if [ "$run_tests" == "true" ]; then
9398
runtarget="$runtarget,test"
9499
fi
95100

96-
# Limit top-level concurrency to available CPUs - 1 to limit CPU load.
97-
concurrency=$(node -p 'Math.max(1, require("os").cpus().length - 1)')
101+
if [[ "$concurrency" == "" ]]; then
102+
# Auto-limit top-level concurrency to:
103+
# - available CPUs - 1 to limit CPU load
104+
# - total memory / 4GB (N.B: constant here may need to be tweaked, configurable with $CDKBUILD_MEM_PER_PROCESS)
105+
mem_per_process=${CDKBUILD_MEM_PER_PROCESS:-4_000_000_000}
106+
concurrency=$(node -p "Math.max(1, Math.min(require('os').cpus().length - 1, Math.round(require('os').totalmem() / $mem_per_process)))")
107+
echo "Concurrency: $concurrency"
108+
fi
98109

99110
flags=""
100111
if [ "$ci" == "true" ]; then

docs/DESIGN_GUIDELINES.md

+21
Original file line numberDiff line numberDiff line change
@@ -1523,6 +1523,27 @@ information that can be obtained from the stack trace.
15231523

15241524
* Do not use FnSub
15251525

1526+
### Lazys
1527+
1528+
Do not use a `Lazy` to perform a mutation on the construct tree. For example:
1529+
1530+
```ts
1531+
constructor(scope: Scope, id: string, props: MyConstructProps) {
1532+
this.lazyProperty = Lazy.any({
1533+
produce: () => {
1534+
return props.logging.bind(this, this);
1535+
},
1536+
});
1537+
}
1538+
```
1539+
1540+
`bind()` methods mutate the construct tree, and should not be called from a callback
1541+
in a `Lazy`.
1542+
1543+
* The why:
1544+
- `Lazy`s are called after the construct tree has already been sythesized. Mutating it
1545+
at this point could have not-obvious consequences.
1546+
15261547
## Documentation
15271548

15281549
Documentation style (copy from official AWS docs) No need to Capitalize Resource

package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
"build-all": "tsc -b"
1616
},
1717
"devDependencies": {
18-
"@nrwl/cli": "^15.9.1",
19-
"@nrwl/workspace": "^15.9.1",
18+
"@nrwl/cli": "^15.9.4",
19+
"@nrwl/workspace": "^15.9.4",
2020
"@types/node": "18.11.19",
2121
"@types/prettier": "2.6.0",
2222
"@yarnpkg/lockfile": "^1.1.0",
23-
"cdk-generate-synthetic-examples": "^0.1.173",
23+
"cdk-generate-synthetic-examples": "^0.1.235",
2424
"conventional-changelog-cli": "^2.2.2",
2525
"fs-extra": "^9.1.0",
26-
"graceful-fs": "^4.2.10",
26+
"graceful-fs": "^4.2.11",
2727
"jest-junit": "^13.2.0",
28-
"jsii-diff": "1.78.1",
29-
"jsii-pacmak": "1.78.1",
30-
"jsii-reflect": "1.78.1",
28+
"jsii-diff": "1.80.0",
29+
"jsii-pacmak": "1.80.0",
30+
"jsii-reflect": "1.80.0",
3131
"jsii-rosetta": "~5.0.7",
3232
"lerna": "^6.6.1",
33-
"nx": "^15.9.1",
33+
"nx": "^15.9.4",
3434
"patch-package": "^6.5.1",
3535
"semver": "^6.3.0",
3636
"standard-version": "^9.5.0",

packages/@aws-cdk-testing/cli-integ/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"dependencies": {
4141
"@octokit/rest": "^18.12.0",
42-
"aws-sdk": "^2.1329.0",
42+
"aws-sdk": "^2.1373.0",
4343
"axios": "^0.27.2",
4444
"fs-extra": "^9.1.0",
4545
"glob": "^7.2.3",
@@ -48,10 +48,10 @@
4848
"make-runnable": "^1.4.1",
4949
"npm": "^8.19.4",
5050
"p-queue": "^6.6.2",
51-
"semver": "^7.3.8",
51+
"semver": "^7.5.0",
5252
"ts-mock-imports": "^1.3.8",
5353
"yaml": "1.10.2",
54-
"yargs": "^17.7.1"
54+
"yargs": "^17.7.2"
5555
},
5656
"repository": {
5757
"url": "https://github.com/aws/aws-cdk.git",

packages/@aws-cdk-testing/framework-integ/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
},
3838
"dependencies": {
3939
"@aws-cdk/integ-tests-alpha": "0.0.0",
40-
"@aws-cdk/lambda-layer-kubectl-v24": "^2.0.100",
40+
"@aws-cdk/lambda-layer-kubectl-v24": "^2.0.186",
4141
"aws-cdk-lib": "0.0.0",
42-
"aws-sdk": "^2.1317.0",
42+
"aws-sdk": "^2.1373.0",
4343
"aws-sdk-mock": "5.6.0",
44-
"cdk8s": "^2.7.15",
45-
"cdk8s-plus-24": "2.4.40",
44+
"cdk8s": "^2.7.56",
45+
"cdk8s-plus-24": "2.7.22",
4646
"constructs": "^10.0.0"
4747
},
4848
"repository": {

packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/cross-region-producer.assets.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
}
3030
}
3131
},
32-
"a645bb0b063dc77d60a1af0c1e427999161c49fe9008543153cb48fed642a943": {
32+
"f93ad4a2004b446276ef3fac1ada613b58a45257e6bfd66f18ab8119232f6131": {
3333
"source": {
3434
"path": "cross-region-producer.template.json",
3535
"packaging": "file"
3636
},
3737
"destinations": {
3838
"current_account-us-east-1": {
3939
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1",
40-
"objectKey": "a645bb0b063dc77d60a1af0c1e427999161c49fe9008543153cb48fed642a943.json",
40+
"objectKey": "f93ad4a2004b446276ef3fac1ada613b58a45257e6bfd66f18ab8119232f6131.json",
4141
"region": "us-east-1",
4242
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1"
4343
}

packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/cross-region-producer.template.json

+12
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@
9898
":parameter/cdk/exports/*"
9999
]
100100
]
101+
},
102+
{
103+
"Fn::Join": [
104+
"",
105+
[
106+
"arn:aws:ssm:us-west-2:",
107+
{
108+
"Ref": "AWS::AccountId"
109+
},
110+
":parameter/cdk/exports/*"
111+
]
112+
]
101113
}
102114
],
103115
"Action": [

packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/crossregionreferencesDefaultTestDeployAssertAB7415FD.assets.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
}
1515
}
1616
},
17-
"a916bc3a5655b0f9f8fc2ca727c849da1870288a890fc7a778f18859c60dc3b2": {
17+
"abfdad43ef2795ab9e253a1b3cb3bfd72c1d00fa011b42ce99ffdff17b83c947": {
1818
"source": {
1919
"path": "crossregionreferencesDefaultTestDeployAssertAB7415FD.template.json",
2020
"packaging": "file"
2121
},
2222
"destinations": {
2323
"current_account-current_region": {
2424
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25-
"objectKey": "a916bc3a5655b0f9f8fc2ca727c849da1870288a890fc7a778f18859c60dc3b2.json",
25+
"objectKey": "abfdad43ef2795ab9e253a1b3cb3bfd72c1d00fa011b42ce99ffdff17b83c947.json",
2626
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
2727
}
2828
}

packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/crossregionreferencesDefaultTestDeployAssertAB7415FD.template.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"StackName": "cross-region-producer"
1616
},
1717
"flattenResponse": "false",
18-
"salt": "1682378118042"
18+
"salt": "1682942114901"
1919
},
2020
"UpdateReplacePolicy": "Delete",
2121
"DeletionPolicy": "Delete"
@@ -118,7 +118,7 @@
118118
"StackName": "cross-region-producer"
119119
},
120120
"flattenResponse": "false",
121-
"salt": "1682378118042"
121+
"salt": "1682942114901"
122122
},
123123
"DependsOn": [
124124
"AwsApiCallCloudFormationdeleteStack"

packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-cross-region-references.js.snapshot/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"validateOnSynth": false,
1818
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/a645bb0b063dc77d60a1af0c1e427999161c49fe9008543153cb48fed642a943.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/f93ad4a2004b446276ef3fac1ada613b58a45257e6bfd66f18ab8119232f6131.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [
@@ -328,7 +328,7 @@
328328
"validateOnSynth": false,
329329
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
330330
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
331-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a916bc3a5655b0f9f8fc2ca727c849da1870288a890fc7a778f18859c60dc3b2.json",
331+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/abfdad43ef2795ab9e253a1b3cb3bfd72c1d00fa011b42ce99ffdff17b83c947.json",
332332
"requiresBootstrapStackVersion": 6,
333333
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
334334
"additionalDependencies": [

0 commit comments

Comments
 (0)