Skip to content

Commit 842201c

Browse files
authored
fix(efs): cannot run an integ test when transitionToArchivePolicy is specified and throughputMode is undefined (#33713)
### Issue # (if applicable) N/A ### Reason for this change I encountered this problem when fixing a bug. This PR fixes an issue where we cannot rerun [test/aws-efs/test/integ.efs-transition.js](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk-testing/framework-integ/test/aws-efs/test/integ.efs-transition.ts). When attempting to rerun this test, the following error is encountered: ```sh The ThroughputMode value for the file system does not support TransitionToArchive. Either change the ThroughputMode value to Elastic or remove the TransitionToArchive parameter. ``` When `throughputMode` is `undefined`, throughput mode is set to `Bursting`. However, `transitionToArchive` is only supported in the Elastic throughput mode. ([Ref](https://docs.aws.amazon.com/efs/latest/ug/API_PutLifecycleConfiguration.html)) > The Archive storage class is available only for file systems that use the Elastic throughput mode and the General Purpose performance mode. ### Description of changes Set `throughputMode` to `Elastic` when `transitionToArchivePolicy` is specified in a unit test and an integ test. I also considered adding validations. However, I decided against it as it might cause regression issues. ### Describe any new or updated permissions being added Nothing ### Description of how you validated changes Successfully reran the integration 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 25619a0 commit 842201c

File tree

9 files changed

+322
-58
lines changed

9 files changed

+322
-58
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-efs/test/integ.efs-transition.js.snapshot/cdk.out

+1-1
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-efs/test/integ.efs-transition.js.snapshot/integ.json

+1-1
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-efs/test/integ.efs-transition.js.snapshot/manifest.json

+152-2
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-efs/test/integ.efs-transition.js.snapshot/test-efs-transition-integ.assets.json

+3-3
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-efs/test/integ.efs-transition.js.snapshot/test-efs-transition-integ.template.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,8 @@
395395
{
396396
"TransitionToArchive": "AFTER_90_DAYS"
397397
}
398-
]
398+
],
399+
"ThroughputMode": "elastic"
399400
},
400401
"UpdateReplacePolicy": "Retain",
401402
"DeletionPolicy": "Retain"

packages/@aws-cdk-testing/framework-integ/test/aws-efs/test/integ.efs-transition.js.snapshot/testefsintegtestDefaultTestDeployAssert7E1529D5.assets.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)