Skip to content

fix(infra): scope the DAO API DB image and cover its entrypoint in CI - #2105

Open
brunod-e wants to merge 2 commits into
chore/dao-api-db-imagefrom
chore/dao-api-db-guardrails
Open

fix(infra): scope the DAO API DB image and cover its entrypoint in CI#2105
brunod-e wants to merge 2 commits into
chore/dao-api-db-imagefrom
chore/dao-api-db-guardrails

Conversation

@brunod-e

@brunod-e brunod-e commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Targets chore/dao-api-db-image, not dev — this is the two mechanical items from my review on #2099, so they can land without you re-deriving them. The two findings that need your judgement (the postgres-exporter dependency and the max_connections floor vs the API's three pools) are deliberately not touched here.

1. watchPatterns on the DB image

Railway watches the whole repo when watchPatterns is unset. Once the 17 Postgres services are pointed at dao-api-db.railway.toml, every merge to dev would rebuild and restart the entire database fleet on commits that cannot affect them. Scoped to infra/dao-api-db/**, which is the only directory that changes what these services run.

Correcting myself from the review: I also flagged the missing [environments.pr.deploy] NOOP block there, on the grounds that every other repo-backed service carries one. That was wrong and I did not implement it. The DAO APIs are not NOOP'd in PR environments, so they need a live database to serve against — NOOPing the DB would break every preview rather than save anything. postgres-exporter can carry the NOOP because it is only a scraper. The absence is correct; only watchPatterns was missing.

2. The self-test runs in CI

entrypoint.dao-api-db.sh ships assertions for the four fleet tiers, both clamp boundaries and both fallback paths, and #2099 cites them as verification — but nothing executes them. A wrong derivation mis-provisions every DAO database simultaneously, and the tiers it keys off live in the Railway UI, so the repo has no other way to notice the table drifting from the fleet.

New dao-api-db-entrypoint job in tests.yaml: checkout, then bash infra/dao-api-db/entrypoint.dao-api-db.sh --self-test. No pnpm install, no paths filter — running it unconditionally is cheaper than deciding whether it needed to run.

Verified

  • bash infra/dao-api-db/entrypoint.dao-api-db.sh --self-testself-test OK, exit 0, from the repo root exactly as the job invokes it
  • tests.yaml parses; the job resolves to runs-on: ubuntu-latest with the two expected steps
  • dao-api-db.railway.toml still parses with build.watchPatterns as a list
  • Empty changeset, matching yellow-windows-swim.md on the base branch — infra and CI only, no workspace package changes

Railway watches the entire repo when watchPatterns is unset, so once the 17
Postgres services are pointed at this config, every merge to dev would rebuild
and restart the whole database fleet at the same time. Restarting a stateless
service on an unrelated commit is cheap; doing it to 17 production databases is
not.

Nothing outside infra/dao-api-db can change what these services run, so the
pattern is the image's own directory, identical for every DB service.

Deliberately no [environments.pr.deploy] NOOP, unlike the other services: the
DAO APIs are not NOOP'd in PR environments, so they need their database to
actually be serving there. A NOOP'd database is a broken preview, not a saved
dollar.
The entrypoint already ships assertions for the four fleet tiers, both clamp
boundaries and both fallback paths, and the PR that introduced it cites them as
verification — but nothing runs them. A wrong derivation mis-provisions every DAO
database at once, and the memory tiers it keys off are set in the Railway UI, so
the repo gives no other signal that the table drifted from the fleet.

Two seconds of bash, no dependencies, no paths filter: the job is cheaper than
deciding whether it needed to run.
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
anticapture-storybook Ready Ready Preview Aug 5, 2026 5:38pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
anticapture Ignored Ignored Aug 5, 2026 5:38pm

Request Review

@railway-app

railway-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

🚅 Deployed to the anticapture-pr-2105 environment in anticapture-infra

Service Status Web Updated (UTC)
gitcoin-indexer-offchain ✅ Success (View Logs) Aug 5, 2026 at 9:15 pm
shutter-indexer-offchain ✅ Success (View Logs) Aug 5, 2026 at 9:15 pm
compound-indexer-offchain ✅ Success (View Logs) Aug 5, 2026 at 9:13 pm
uniswap-indexer-offchain ✅ Success (View Logs) Aug 5, 2026 at 9:13 pm
ens-indexer-offchain ✅ Success (View Logs) Aug 5, 2026 at 9:13 pm
prometheus ✅ Success (View Logs) Aug 5, 2026 at 6:45 pm
grafana ✅ Success (View Logs) Web Aug 5, 2026 at 6:44 pm
docs ✅ Success (View Logs) Web Aug 5, 2026 at 5:51 pm
mcp ✅ Success (View Logs) Web Aug 5, 2026 at 5:51 pm
gateful ❌ Build Failed (View Logs) Web Aug 5, 2026 at 5:51 pm
aave-api ✅ Success (View Logs) Aug 5, 2026 at 5:47 pm
tornado-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:47 pm
fluid-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:47 pm
lil-nouns-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:47 pm
aave-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:47 pm
shutter-api ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
nouns-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
otelcol ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
tornado-api ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
ens-api ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
fluid-api ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
gitcoin-api ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
shutter-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
uniswap-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
compound-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
scroll-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
address-enrichment ✅ Success (View Logs) Web Aug 5, 2026 at 5:46 pm
lil-nouns-api ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
nouns-api ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
uniswap-api ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
compound-api ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
obol-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
gitcoin-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
ens-indexer ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
ens-relayer ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
obol-api ❌ Build Failed (View Logs) Aug 5, 2026 at 5:46 pm
erpc ✅ Success (View Logs) Web Aug 5, 2026 at 5:46 pm
nodeful ✅ Success (View Logs) Aug 5, 2026 at 5:46 pm
tempo ✅ Success (View Logs) Aug 5, 2026 at 5:45 pm
alertmanager ✅ Success (View Logs) Web Aug 5, 2026 at 5:44 pm
user-api ✅ Success (View Logs) Web Aug 5, 2026 at 5:44 pm
loki ✅ Success (View Logs) Aug 5, 2026 at 5:43 pm
scroll-api ✅ Success (View Logs) Aug 5, 2026 at 5:42 pm
authful ✅ Success (View Logs) Web Aug 5, 2026 at 5:41 pm

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