aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

fix(ecs): enableDeploymentAlarms should mutate the alarmNames property

Open vito-laurenza-zocdoc opened this issue 2 weeks ago • 4 comments

Issue #36308

Closes #36308

Reason for this change

Fixes a silent bug in the ecs module.

Description of changes

The code is mistakenly using concat() which returns a new array rather than modifying the existing one (which was the original intent of the code).

Describe any new or updated permissions being added

n/a

Description of how you validated changes

test case added

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

vito-laurenza-zocdoc avatar Dec 05 '25 16:12 vito-laurenza-zocdoc

TestsPassed ☑️SkippedFailed ❌️
Security Guardian Results26 ran24 passed2 failed
TestResult
Security Guardian Results
packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.blue-green-deployment-strategy.js.snapshot/aws-ecs-blue-green-deployment.template.json
ec2-no-open-security-groups.guard❌ failure
iam-no-wildcard-actions-inline.guard❌ failure

github-actions[bot] avatar Dec 05 '25 16:12 github-actions[bot]

TestsPassed ☑️SkippedFailed ❌️
Security Guardian Results with resolved templates26 ran24 passed2 failed
TestResult
Security Guardian Results with resolved templates
packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.blue-green-deployment-strategy.js.snapshot/aws-ecs-blue-green-deployment.template.json
ec2-no-open-security-groups.guard❌ failure
iam-no-wildcard-actions-inline.guard❌ failure

github-actions[bot] avatar Dec 05 '25 16:12 github-actions[bot]

This PR is currently blocked by this:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

You will need to add/update integ test to unblock this or if you think integ tests are not necessary, please follow the suggestion https://github.com/aws/aws-cdk/pull/36309#pullrequestreview-3545387881

pahud avatar Dec 08 '25 03:12 pahud

This PR is currently blocked by this:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

You will need to add/update integ test to unblock this or if you think integ tests are not necessary, please follow the suggestion #36309 (review)

Thanks. I've added basic coverage for this case in the existing integration test as it was not exercised there before.

vito-laurenza-zocdoc avatar Dec 08 '25 17:12 vito-laurenza-zocdoc

@pahud can you advise about these security guardian failures?

vito-laurenza-zocdoc avatar Dec 15 '25 15:12 vito-laurenza-zocdoc