Skip to content

resonate ecs setup - #4824

Open
marcoacierno wants to merge 5 commits into
resonatefrom
resonate-ecs-setup
Open

marcoacierno wants to merge 5 commits into
resonatefrom
resonate-ecs-setup

Conversation

@marcoacierno

Copy link
Copy Markdown
Member
  • Build the Resonate client in one expression
  • Run Resonate and its worker on the ECS cluster

What

ToDo

The wiring was assembled into a kwargs dict so two of its entries could be
left out conditionally; passing the SDK's own defaults (`url=None`,
`sources=None`) says the same thing in one call.
The durable workflows had nowhere to run outside a laptop. This adds both
halves: a Resonate server task on the cluster, next to redis and clamav,
and a `backend-resonate-worker` service running `manage.py
resonate_worker` off the backend image.

The server keeps its promises on the database instance the backend
already uses, in a database of its own. Terraform cannot create that
database (the instance is private), so a short container does it with
`createdb` before the server starts, on every deploy, doing nothing after
the first; Resonate creates its own schema from there.

Port 8001 is reachable only from the cluster's own security group, the
way redis and clamav are, and `RESONATE_URL` goes to every backend task:
the worker executes workflows, the admin starts them.
@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pycon Ready Ready Preview Sep 20, 2026 7:38pm UTC

@claude

claude Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Adds an ECS-hosted Resonate server + worker service and wires RESONATE_URL to the backend; also simplifies _build() in resonate_app.py into a single expression.

No issues found.

The resonate module was the only one in applications.tf splitting its
inputs into two groups.
@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.47%. Comparing base (bd31258) to head (1765b37).

Additional details and impacted files
@@             Coverage Diff              @@
##           resonate    #4824      +/-   ##
============================================
+ Coverage     92.43%   92.47%   +0.04%     
============================================
  Files           358      358              
  Lines         11272    11267       -5     
  Branches        911      909       -2     
============================================
  Hits          10419    10419              
+ Misses          742      737       -5     
  Partials        111      111              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Review follow-ups on the ECS setup.

`createdb ... || true` exited zero whatever happened, so the server's
SUCCESS dependency on it only promised that the container had run: a
wrong password or an unreachable instance was swallowed, the server
started anyway, and the only evidence sat in a log stream nobody would
think to open. Falling back to a `select 1` against the database instead
makes the container exit zero if and only if the database is there, and
stops it logging `already exists` on every task start.

The health check also had no start period and three retries, giving the
server ~30 seconds to come up -- the same 30 seconds it spends waiting on
the database pool before giving up, and before creating its schema on
first boot. It now gets the room docker-compose already gave it.
The bootstrap container is gone: the `resonate` database has to exist on
the instance before this deploys.

This branch was successfully deployed

1 active deployment
Preview 1765b37a Deployed Sep 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant