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
fix(ec2): don't use inferenceAccellerators in the constructors if not needed (#34618)
### Issue # (if applicable)
Closes#33505
### Reason for this change
The Ec2TaskDefinition should not pass the `@deprecated` `props.inferenceAccelerators` property if it's unset or empty, because this results in showing deprecation notices in the console.
See [this comment](#33505 (comment)).
### Description of changes
Do not rely only on passing the props, but check if the array actually contains any elements.
### Describe any new or updated permissions being added
### Description of how you validated changes
Cannot test by hand due to #34610.
UPDATE: manually tested in a production CDK stack. Result as expected, warnings are not shown during `cdk diff`.
### 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*
0 commit comments