-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
aws-cdk-lib.aws_ecs_patterns module: REMOVE_DEFAULT_DESIRED_COUNT is no longer supported in cdkv2 #29325
Labels
aws-cdk-lib
Related to the aws-cdk-lib package
documentation
This is a problem with documentation.
effort/small
Small work item – less than a day of effort
p2
Comments
Thank you for the heads-up and report. I guess we should remove that from the doc. Are you interested to submit a PR for that? |
Sure, coming up shortly. |
1 task
mergify bot
pushed a commit
that referenced
this issue
Mar 4, 2024
…#29344) ### Issue # (if applicable) Closes # 29325 ### Reason for this change The `REMOVE_DEFAULT_DESIRED_COUNT` feature flag is always enabled in CDKv2, and throws builds errors if explicitly set. The `ecs-patterns` docs still reference it as "opt-in", which is misleading. Ref: [list of deprecated feature flags for v2](https://github.com/aws/aws-cdk/blob/3cbad4a2164a41f5529e04aba4d15085c71b7849/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md?plain=1#L145) See [Issue 29325](#29325) for a sample build error when trying to follow the current example code in docs for enabling the flag. I did NOT remove the actual conditionals in the construct code, that check the (now always true) feature flag. This is dead code that can probably be removed as a chore task. My focus here was on removing friction for developers reading documentation. ### Description of changes I removed the section in the README of `ecs-patterns` showing how to manually enable this flag. I also updated the default cases in docstrings that referenced the flag. ### Description of how you validated changes Doc change only, no functional changes. I did double check that the defaults described in the docstrings (when the feature flag is enabled) were still accurate. ### 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*
|
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
aws-cdk-lib
Related to the aws-cdk-lib package
documentation
This is a problem with documentation.
effort/small
Small work item – less than a day of effort
p2
Describe the issue
Currently the
aws_ecs_patterns
module docs reference theREMOVE_DEFAULT_DESIRED_COUNT
flag in a few places:The overall readme, on the feature flag:
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns-readme.html#use-the-remove_default_desired_count-feature-flag
Similarly, individual patterns' docs reference the flag when discussing the
desiredCount
property, eg:https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedFargateService.html#desiredcount
However, when building a package using it, I see this error:
You can see it on the unsupported list for v2 here.
These references in the docs should be removed, in favor of describing the (now unconditional) behavior with the feature enabled.
Links
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns-readme.html#use-the-remove_default_desired_count-feature-flag
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedFargateService.html#desiredcount
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedEc2Service.html#desiredcount
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.ApplicationMultipleTargetGroupsEc2Service.html#desiredcount
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.ApplicationMultipleTargetGroupsFargateService.html#desiredcount
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.NetworkLoadBalancedEc2Service.html#desiredcount
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.NetworkLoadBalancedFargateService.html#desiredcount
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.NetworkMultipleTargetGroupsEc2Service.html#desiredcount
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.NetworkMultipleTargetGroupsFargateService.html#desiredcount
The text was updated successfully, but these errors were encountered: