-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
aws-cdk-libRelated to the aws-cdk-lib packageRelated to the aws-cdk-lib packagebugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp1package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI
Description
Describe the bug
Methods testFutureBehavior and testLegacyBehavior were modified for CDK v2 development:
testFutureBehaviorignores feature flags in CDK v2 because all feature flags are enabled by default- Tests in
testLegacyBehaviorwill be ignored because there is no legacy behavior when CDK v2 was released
This logic was correct during the development of CDK v2. Now, it must be possible to add new feature flags.
Instead of checking for version 2 in the following line, we need to change it to version 3:
| if (major === 2) { |
Expected Behavior
testFutureBehaviorsupports new feature flagstestLegacyBehaviorexecutes tests without feature flag
Current Behavior
testFutureBehaviordoesn't support adding feature flags- Tests in
testLegacyBehaviorwill be skipped
Reproduction Steps
Test cases in PR #18140 fail because testFutureBehavior doesn't execute the correct behavior after target branch of this PR was changed to v2 main branch.
Possible Solution
Replace version 2 by 3 in the following lines:
| if (major === 2) { |
| if (major === 2) { |
Additional Information/Context
No response
CDK CLI Version
2.29.0
Framework Version
No response
Node.js Version
v16.15.1
OS
MacOS
Language
Typescript
Language Version
No response
Other information
I can create a PR to fix this issue. Please let me know if the proposed solution is correct.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
aws-cdk-libRelated to the aws-cdk-lib packageRelated to the aws-cdk-lib packagebugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp1package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI