fix(aws): converge release infrastructure exactly - #945
Conversation
| // Service.deploy now blocks until the exact task definition is the sole | ||
| // completed deployment, ECS counts have settled, and every registered | ||
| // target is healthy. Prove that contract immediately out-of-band. |
There was a problem hiding this comment.
This test change does a good job at indicating the problem solved by your change. We typically do this intentionally and prefer to resolve stabilization as far downstream as we can (for speed). But some times it is necessary to ensure a resource is stable before moving on. What did you run into specifically that triggered this change?
There was a problem hiding this comment.
Hey it's me the same person, I was just using my corpo acc.
Anyway, I was trying to get both health and live connectivity stats for all the services everytime I deploy to make sure "everything is working together" as the goal of IaC systems - I tried to connect from my ECS server with third party services like Trigger, Neon, PostHog, etc. I'm currently using a patch of this on my local server.
I'm new to both Effect and Alchemy, I love the concept of both Effect & Alchemy, I'm trying to migrate from SST with a hell lotta custom CI/CD scripts, so that I can spend my time on some actual features not just infra, and if I'm doing something wrong please don't mind me directing to the better way of doing this.
There was a problem hiding this comment.
The concrete failure was a release verifier reporting success against the previous ECS task: the replacement task started one second after verification had already finished. That allowed the workflow to attest the wrong image/task revision even though the service eventually converged.
For the ALB-backed API, the downstream capability probes must start only after ECS is serving the exact requested task definition, all previous tasks are drained, desired == running, pending == 0, and registered targets are healthy. The delete wait addresses the symmetric teardown race. This PR keeps the wait in the ECS resource boundary so every caller receives a truthful converged result; application-level probes still remain downstream and separate.
Summary
Validation
bun tsc -bbun run format:checkbun run lint:providersalchemy-testECR repositories, ECS clusters, or security-test S3 bucketsThe live suites use an explicit
AWS_ACCOUNT_IDresolved from STS because the current default AWS provider layer can deadlock while deriving it from the surrounding environment.