You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(ecs-patterns): remove references to REMOVE_DEFAULT_DESIRED_COUNT (#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*
Copy file name to clipboardExpand all lines: packages/aws-cdk-lib/aws-ecs-patterns/README.md
-50
Original file line number
Diff line number
Diff line change
@@ -921,56 +921,6 @@ const scheduledFargateTask = new ecsPatterns.ScheduledFargateTask(this, 'Schedul
921
921
});
922
922
```
923
923
924
-
### Use the REMOVE_DEFAULT_DESIRED_COUNT feature flag
925
-
926
-
The REMOVE_DEFAULT_DESIRED_COUNT feature flag is used to override the default desiredCount that is autogenerated by the CDK. This will set the desiredCount of any service created by any of the following constructs to be undefined.
927
-
928
-
* ApplicationLoadBalancedEc2Service
929
-
* ApplicationLoadBalancedFargateService
930
-
* NetworkLoadBalancedEc2Service
931
-
* NetworkLoadBalancedFargateService
932
-
* QueueProcessingEc2Service
933
-
* QueueProcessingFargateService
934
-
935
-
If a desiredCount is not passed in as input to the above constructs, CloudFormation will either create a new service to start up with a desiredCount of 1, or update an existing service to start up with the same desiredCount as prior to the update.
936
-
937
-
To enable the feature flag, ensure that the REMOVE_DEFAULT_DESIRED_COUNT flag within an application stack context is set to true, like so:
0 commit comments