Describe the bug
The releaser for AWS ECS plugin checks for unhealthy targets in a target group, but reports healthy if there is no target in the target group at all. The deploy step does not wait for the tasks to be in "running" state before moving to the release step, which at that point in time the tasks (which are in "pending" state) has yet to be registered as targets in the new target group.
Steps to Reproduce
Run waypoint deploy with aws-ecs apps.
Describe the bug The releaser for AWS ECS plugin checks for unhealthy targets in a target group, but reports healthy if there is no target in the target group at all. The deploy step does not wait for the tasks to be in "running" state before moving to the release step, which at that point in time the tasks (which are in "pending" state) has yet to be registered as targets in the new target group.
Steps to Reproduce Run
waypoint deploy
withaws-ecs
apps.Despite the ECS task is still starting up and the target group being empty, the release step will reports all targets are healthy:
Expected behavior The releaser should treat a target group with no targets as "unhealthy", and report that accordingly.
Waypoint Platform Versions Additional version and platform information to help triage the issue if applicable:
aws/ecs
Additional context Relevant code snippet: https://github.com/hashicorp/waypoint/blob/d65a8d95289eb172cb07c21e8a99581ca250352e/builtin/aws/ecs/releaser.go#L147-L158