Skip to content

Commit

Permalink
Merge branch 'master' into sdamle-s3
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] committed May 6, 2020
2 parents 73da3f0 + 8cabae0 commit acf5e5a
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 48 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
with:
# Setting messages to an empty string will cause the automation to skip
# that category
ancient-issue-message: This issue has not received any attention in 3 years. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
ancient-issue-message: This issue has not received any attention in 2 years. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
stale-issue-message: This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
stale-pr-message: This PR has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

# These labels are required
stale-issue-label: closing-soon
exempt-issue-label: no-autoclose
stale-pr-label: pr/no-activity
stale-pr-label: closing-soon
exempt-pr-label: no-autoclose
response-requested-label: response-requested

Expand All @@ -32,7 +32,7 @@ jobs:
# Issue timing
days-before-stale: 7
days-before-close: 4
days-before-ancient: 1095
days-before-ancient: 730

# If you don't want to mark a issue as being ancient based on a
# threshold of "upvotes", you can set this here. An "upvote" is
Expand All @@ -43,4 +43,4 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# loglevel: DEBUG
# Set dry-run to true to not perform label or close actions.
dry-run: true
dry-run: false
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"cdk-build-tools": "0.0.0",
"jest": "^25.5.4",
"pkglint": "0.0.0",
"ts-jest": "^25.4.0"
"ts-jest": "^25.5.0"
},
"dependencies": {
"@aws-cdk/cloudformation-diff": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"jest": "^25.5.4",
"pkglint": "0.0.0",
"sinon": "^9.0.2",
"ts-jest": "^25.4.0"
"ts-jest": "^25.5.0"
},
"dependencies": {
"@aws-cdk/aws-applicationautoscaling": "0.0.0",
Expand Down
13 changes: 10 additions & 3 deletions packages/@aws-cdk/aws-eks/lib/cluster-resource-handler/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,14 @@ export class ClusterResourceHandler extends ResourceHandler {

// if this is an EKS update, we will monitor the update event itself
if (this.event.EksUpdateId) {
return this.isEksUpdateComplete(this.event.EksUpdateId);
const complete = await this.isEksUpdateComplete(this.event.EksUpdateId);
if (!complete) {
return { IsComplete: false };
}

// fall through: if the update is done, we simply delegate to isActive()
// in order to extract attributes and state from the cluster itself, which
// is supposed to be in an ACTIVE state after the update is complete.
}

return this.isActive();
Expand Down Expand Up @@ -212,9 +219,9 @@ export class ClusterResourceHandler extends ResourceHandler {

switch (describeUpdateResponse.update.status) {
case 'InProgress':
return { IsComplete: false };
return false;
case 'Successful':
return { IsComplete: true };
return true;
case 'Failed':
case 'Cancelled':
throw new Error(`cluster update id "${eksUpdateId}" failed with errors: ${JSON.stringify(describeUpdateResponse.update.errors)}`);
Expand Down
47 changes: 24 additions & 23 deletions packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@
"Arn"
]
},
"version": "1.16",
"resourcesVpcConfig": {
"securityGroupIds": [
{
Expand Down Expand Up @@ -1322,7 +1323,7 @@
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"ImageId": {
"Ref": "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter"
"Ref": "SsmParameterValueawsserviceeksoptimizedami116amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter"
},
"InstanceType": "t2.medium",
"IamInstanceProfile": {
Expand Down Expand Up @@ -1912,7 +1913,7 @@
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"ImageId": {
"Ref": "SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter"
"Ref": "SsmParameterValueawsserviceeksoptimizedami116amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter"
},
"InstanceType": "t3.large",
"IamInstanceProfile": {
Expand Down Expand Up @@ -2223,7 +2224,7 @@
},
"/",
{
"Ref": "AssetParametersfa73027e9f72f21daca2d67aa5a23e88f87d90536a7e3c36de9adbfb27fa9103S3Bucket4281E0A4"
"Ref": "AssetParameters222a8e375c233b55d0c3e20bc9ac98ffc8e51132f82b0f12f3cd1b7b22c562c2S3BucketC839B0E2"
},
"/",
{
Expand All @@ -2233,7 +2234,7 @@
"Fn::Split": [
"||",
{
"Ref": "AssetParametersfa73027e9f72f21daca2d67aa5a23e88f87d90536a7e3c36de9adbfb27fa9103S3VersionKey3B54BD32"
"Ref": "AssetParameters222a8e375c233b55d0c3e20bc9ac98ffc8e51132f82b0f12f3cd1b7b22c562c2S3VersionKeyEEF27FE8"
}
]
}
Expand All @@ -2246,7 +2247,7 @@
"Fn::Split": [
"||",
{
"Ref": "AssetParametersfa73027e9f72f21daca2d67aa5a23e88f87d90536a7e3c36de9adbfb27fa9103S3VersionKey3B54BD32"
"Ref": "AssetParameters222a8e375c233b55d0c3e20bc9ac98ffc8e51132f82b0f12f3cd1b7b22c562c2S3VersionKeyEEF27FE8"
}
]
}
Expand All @@ -2256,11 +2257,11 @@
]
},
"Parameters": {
"referencetoawscdkeksclustertestAssetParametersc0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602S3Bucket38D74D5ERef": {
"Ref": "AssetParametersc0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602S3BucketD006BE3B"
"referencetoawscdkeksclustertestAssetParameters80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5S3Bucket278A73D2Ref": {
"Ref": "AssetParameters80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5S3Bucket91F3EC34"
},
"referencetoawscdkeksclustertestAssetParametersc0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602S3VersionKey189EBCBARef": {
"Ref": "AssetParametersc0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602S3VersionKeyEC71339F"
"referencetoawscdkeksclustertestAssetParameters80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5S3VersionKeyD7A198A8Ref": {
"Ref": "AssetParameters80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5S3VersionKey29EF2E8E"
},
"referencetoawscdkeksclustertestAssetParameters5e49cf64d8027f48872790f80cdb76c5b836ecf9a70b71be1eb937a5c25a47c1S3BucketC7CBF350Ref": {
"Ref": "AssetParameters5e49cf64d8027f48872790f80cdb76c5b836ecf9a70b71be1eb937a5c25a47c1S3Bucket663A709C"
Expand Down Expand Up @@ -2405,17 +2406,17 @@
}
},
"Parameters": {
"AssetParametersc0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602S3BucketD006BE3B": {
"AssetParameters80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5S3Bucket91F3EC34": {
"Type": "String",
"Description": "S3 bucket for asset \"c0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602\""
"Description": "S3 bucket for asset \"80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5\""
},
"AssetParametersc0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602S3VersionKeyEC71339F": {
"AssetParameters80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5S3VersionKey29EF2E8E": {
"Type": "String",
"Description": "S3 key for asset version \"c0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602\""
"Description": "S3 key for asset version \"80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5\""
},
"AssetParametersc0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602ArtifactHash35F5D0CC": {
"AssetParameters80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5ArtifactHash2145581C": {
"Type": "String",
"Description": "Artifact hash for asset \"c0e453b77d5ccf090915fba7c771380f8370da5cbcc3c7ed757c98addd75b602\""
"Description": "Artifact hash for asset \"80599c1e26718262302e982159fe61aff7a2bdd392db341e7e99cbfbf84a0be5\""
},
"AssetParameters5e49cf64d8027f48872790f80cdb76c5b836ecf9a70b71be1eb937a5c25a47c1S3Bucket663A709C": {
"Type": "String",
Expand All @@ -2441,17 +2442,17 @@
"Type": "String",
"Description": "Artifact hash for asset \"a6d508eaaa0d3cddbb47a84123fc878809c8431c5466f360912f70b5b9770afb\""
},
"AssetParametersfa73027e9f72f21daca2d67aa5a23e88f87d90536a7e3c36de9adbfb27fa9103S3Bucket4281E0A4": {
"AssetParameters222a8e375c233b55d0c3e20bc9ac98ffc8e51132f82b0f12f3cd1b7b22c562c2S3BucketC839B0E2": {
"Type": "String",
"Description": "S3 bucket for asset \"fa73027e9f72f21daca2d67aa5a23e88f87d90536a7e3c36de9adbfb27fa9103\""
"Description": "S3 bucket for asset \"222a8e375c233b55d0c3e20bc9ac98ffc8e51132f82b0f12f3cd1b7b22c562c2\""
},
"AssetParametersfa73027e9f72f21daca2d67aa5a23e88f87d90536a7e3c36de9adbfb27fa9103S3VersionKey3B54BD32": {
"AssetParameters222a8e375c233b55d0c3e20bc9ac98ffc8e51132f82b0f12f3cd1b7b22c562c2S3VersionKeyEEF27FE8": {
"Type": "String",
"Description": "S3 key for asset version \"fa73027e9f72f21daca2d67aa5a23e88f87d90536a7e3c36de9adbfb27fa9103\""
"Description": "S3 key for asset version \"222a8e375c233b55d0c3e20bc9ac98ffc8e51132f82b0f12f3cd1b7b22c562c2\""
},
"AssetParametersfa73027e9f72f21daca2d67aa5a23e88f87d90536a7e3c36de9adbfb27fa9103ArtifactHash733CC5DF": {
"AssetParameters222a8e375c233b55d0c3e20bc9ac98ffc8e51132f82b0f12f3cd1b7b22c562c2ArtifactHashAF96C5C2": {
"Type": "String",
"Description": "Artifact hash for asset \"fa73027e9f72f21daca2d67aa5a23e88f87d90536a7e3c36de9adbfb27fa9103\""
"Description": "Artifact hash for asset \"222a8e375c233b55d0c3e20bc9ac98ffc8e51132f82b0f12f3cd1b7b22c562c2\""
},
"AssetParameters36525a61abfaf5764fad460fd03c24215fd00da60805807d6138c51be4d03dbcS3Bucket2D824DEF": {
"Type": "String",
Expand All @@ -2465,9 +2466,9 @@
"Type": "String",
"Description": "Artifact hash for asset \"36525a61abfaf5764fad460fd03c24215fd00da60805807d6138c51be4d03dbc\""
},
"SsmParameterValueawsserviceeksoptimizedami114amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": {
"SsmParameterValueawsserviceeksoptimizedami116amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id"
"Default": "/aws/service/eks/optimized-ami/1.16/amazon-linux-2/recommended/image_id"
},
"SsmParameterValueawsservicebottlerocketawsk8s115x8664latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter": {
"Type": "AWS::SSM::Parameter::Value<String>",
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class EksClusterStack extends TestStack {
const cluster = new eks.Cluster(this, 'Cluster', {
mastersRole,
defaultCapacity: 2,
version: '1.16',
});

// // fargate profile for resources in the "default" namespace
Expand Down
12 changes: 10 additions & 2 deletions packages/@aws-cdk/aws-eks/test/test.cluster-resource-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ export = {
test.done();
},

async 'with "Successful" status, returns IsComplete=true'(test: Test) {
async 'with "Successful" status, returns IsComplete=true with "Data"'(test: Test) {
const event = mocks.newRequest('Update');
const isCompleteHandler = new ClusterResourceHandler(mocks.client, {
...event,
Expand All @@ -413,7 +413,15 @@ export = {
const response = await isCompleteHandler.isComplete();

test.deepEqual(mocks.actualRequest.describeUpdateRequest, { name: 'physical-resource-id', updateId: 'foobar' });
test.equal(response.IsComplete, true);
test.deepEqual(response, {
IsComplete: true,
Data: {
Name: 'physical-resource-id',
Endpoint: 'http://endpoint',
Arn: 'arn:cluster-arn',
CertificateAuthorityData: 'certificateAuthority-data',
},
});
test.done();
},

Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-sam/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"cfn2ts": "0.0.0",
"jest": "^25.5.4",
"pkglint": "0.0.0",
"ts-jest": "^25.4.0"
"ts-jest": "^25.5.0"
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cloudformation-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"fast-check": "^1.24.2",
"jest": "^25.5.4",
"pkglint": "0.0.0",
"ts-jest": "^25.4.0"
"ts-jest": "^25.5.0"
},
"repository": {
"url": "https://github.com/aws/aws-cdk.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@monocdk-experiment/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"cdk-build-tools": "0.0.0",
"jest": "^25.5.4",
"pkglint": "0.0.0",
"ts-jest": "^25.4.0",
"ts-jest": "^25.5.0",
"@monocdk-experiment/rewrite-imports": "0.0.0",
"monocdk-experiment": "0.0.0",
"constructs": "^3.0.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"mockery": "^2.1.0",
"pkglint": "0.0.0",
"sinon": "^9.0.2",
"ts-jest": "^25.4.0",
"ts-jest": "^25.5.0",
"ts-mock-imports": "^1.2.6"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion tools/cdk-build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"jsii-pacmak": "^1.4.1",
"nodeunit": "^0.11.3",
"nyc": "^15.0.1",
"ts-jest": "^25.4.0",
"ts-jest": "^25.5.0",
"tslint": "^5.20.1",
"typescript": "~3.8.3",
"yargs": "^15.3.1",
Expand Down
17 changes: 8 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8226,12 +8226,12 @@ mkdirp-promise@^5.0.1:
dependencies:
mkdirp "*"

mkdirp@*, mkdirp@1.x:
mkdirp@*:
version "1.0.4"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==

mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
version "0.5.5"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
Expand Down Expand Up @@ -10428,7 +10428,7 @@ resolve@1.1.7:
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=

resolve@1.x, resolve@^1.1.5, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2, resolve@^1.4.0:
resolve@^1.1.5, resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2, resolve@^1.4.0:
version "1.16.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.16.1.tgz#49fac5d8bacf1fd53f200fa51247ae736175832c"
integrity sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==
Expand Down Expand Up @@ -11766,10 +11766,10 @@ trivial-deferred@^1.0.1:
resolved "https://registry.yarnpkg.com/trivial-deferred/-/trivial-deferred-1.0.1.tgz#376d4d29d951d6368a6f7a0ae85c2f4d5e0658f3"
integrity sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=

ts-jest@^25.4.0:
version "25.4.0"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.4.0.tgz#5ad504299f8541d463a52e93e5e9d76876be0ba4"
integrity sha512-+0ZrksdaquxGUBwSdTIcdX7VXdwLIlSRsyjivVA9gcO+Cvr6ByqDhu/mi5+HCcb6cMkiQp5xZ8qRO7/eCqLeyw==
ts-jest@^25.5.0:
version "25.5.0"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.5.0.tgz#f56f039b6caa15d9e32d064b0a8902886ab2fe72"
integrity sha512-govrjbOk1UEzcJ5cX5k8X8IUtFuP3lp3mrF3ZuKtCdAOQzdeCM7qualhb/U8s8SWFwEDutOqfF5PLkJ+oaYD4w==
dependencies:
bs-logger "0.x"
buffer-from "1.x"
Expand All @@ -11778,8 +11778,7 @@ ts-jest@^25.4.0:
lodash.memoize "4.x"
make-error "1.x"
micromatch "4.x"
mkdirp "1.x"
resolve "1.x"
mkdirp "0.x"
semver "6.x"
yargs-parser "18.x"

Expand Down

0 comments on commit acf5e5a

Please sign in to comment.