The following code forces the updateType prop when constructing the subsequent ASG cluster:
|
updateType: options.updateType || autoscaling.UpdateType.REPLACING_UPDATE, |
The updateType prop is of type UpdateType which is now deprecated in favor of passing an UpdatePolicy but the two arguments are mutually exclusive. If you try to pass an updatePolcy prop into this function, the following error is output:
Error: Cannot set 'signals'/'updatePolicy' and 'updateType' together. Prefer 'signals'/'updatePolicy'
The only way for callers to override the default is to supply an updateType prop to override the Cluster's default behavior when using .addCapacity(...). This means the caller must use a deprecated API which is not ideal and causes linter warnings unless they are dismissed/disabled.
I believe this could be fixed by making this wrapper method aware of the mutually-exclusive props and if neither is specified, pass updatePolicy: UpdatePolicy.rollingUpdate().
The following code forces the
updateTypeprop when constructing the subsequent ASG cluster:aws-cdk/packages/@aws-cdk/aws-ecs/lib/cluster.ts
Line 203 in 0b058f3
The
updateTypeprop is of typeUpdateTypewhich is now deprecated in favor of passing anUpdatePolicybut the two arguments are mutually exclusive. If you try to pass anupdatePolcyprop into this function, the following error is output:The only way for callers to override the default is to supply an
updateTypeprop to override theCluster's default behavior when using.addCapacity(...). This means the caller must use a deprecated API which is not ideal and causes linter warnings unless they are dismissed/disabled.I believe this could be fixed by making this wrapper method aware of the mutually-exclusive props and if neither is specified, pass
updatePolicy: UpdatePolicy.rollingUpdate().