Skip to content

Commit 74cbe27

Browse files
authored
chore: convert SkipReplicaDeletion custom resource property to boolean for replica table (#34056)
### Issue # (if applicable) Closes NA ### Reason for this change Currently CloudFormation sends the DynamoDB table replica `onEvent` and `isComplete` handler requests with `skipReplicaDeletion` property as string (e.g., "true") rather than boolean (true). Cloudformation converts non string to string for custom resource properties when calling the handler. However, the handlers were checking for boolean value which caused the `isComplete` handler to timeout during delete operation when `skipReplicaDeletion` was enabled. This property was introduced in this PR #33953 ### Description of changes Modified both `onEvent` and `isComplete` handlers to explicitly convert `skipReplicaDeletion` from string to boolean using comparison. ### Describe any new or updated permissions being added NA ### Description of how you validated changes Ran Unit test ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 994e952 commit 74cbe27

File tree

15 files changed

+31
-30
lines changed

15 files changed

+31
-30
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.7e256f5e4a92713cc232cd23819cb666756ee6023ce380130abac3b6a3fcea6a/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/asset.beee194466d406430def0e84ec8b17a0aeb98fe29f5660882cb01e9db355d7c8/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
{
292292
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
293293
},
294-
"/db84cdae632e6cba2f8e4a431d3f3a350218ac90c39e5eb62fff4a6737994230.json"
294+
"/6404b9024d11579260b30a5c13511e95bdd5ff70c55d7879655b34940a2ca38a.json"
295295
]
296296
]
297297
}

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
"S3Bucket": {
251251
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
252252
},
253-
"S3Key": "beee194466d406430def0e84ec8b17a0aeb98fe29f5660882cb01e9db355d7c8.zip"
253+
"S3Key": "7e256f5e4a92713cc232cd23819cb666756ee6023ce380130abac3b6a3fcea6a.zip"
254254
},
255255
"Handler": "index.onEventHandler",
256256
"Role": {
@@ -313,7 +313,7 @@
313313
"S3Bucket": {
314314
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
315315
},
316-
"S3Key": "beee194466d406430def0e84ec8b17a0aeb98fe29f5660882cb01e9db355d7c8.zip"
316+
"S3Key": "7e256f5e4a92713cc232cd23819cb666756ee6023ce380130abac3b6a3fcea6a.zip"
317317
},
318318
"Handler": "index.isCompleteHandler",
319319
"Role": {

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.7e256f5e4a92713cc232cd23819cb666756ee6023ce380130abac3b6a3fcea6a/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/asset.beee194466d406430def0e84ec8b17a0aeb98fe29f5660882cb01e9db355d7c8/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.assets.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)