fix(infra): hand the ingest gateway a Postgres URL its client can parse - #979
Merged
Merged
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR #972 fed the fleet the pooled URL alchemy renders for the new PlanetScale role. alchemy writes it with sslmode=verify-full, and the gateway's tokio-postgres 0.7.18 knows only disable/prefer/require, so every task on revision 9 of the prd task definition exited 1 at boot with 'Key store init error: invalid MAPLE_PG_URL: invalid connection string'. ECS kept the revision 8 tasks serving, and the deploy of 3b300e6 failed on ServiceDidNotStabilize after 28 minutes. Rewrite the mode to require before it reaches the secret. The gateway's rustls connector verifies the chain and the hostname under require anyway, so the wire guarantee is unchanged.
Makisuo
force-pushed
the
fix/ingest-role-url-sslmode
branch
from
September 21, 2026 23:57
f6cda0d to
2e92863
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
The production deploy of 3b300e6 (#972) failed with
ServiceDidNotStabilizeon the ingest ECS service after 28 minutes. Every task on the new task-definition revision exits 1 at boot:ECS kept the previous revision's two tasks running, so ingest never stopped serving. The failed deployment is still cycling new tasks every five minutes until a good revision lands.
Why
#972 feeds the fleet's
maple-pg-urlsecret from the newPlanetscale.PostgresRole'sconnectionUrlPooled. alchemy renders that URL with?sslmode=verify-full. The gateway parses it with tokio-postgres 0.7.18, whose URL parser accepts onlydisable,preferandrequireand reports anything else as "invalid connection string" (the inner "invalid value for sslmode" is dropped by the{error}format, which only prints the top of the chain).Change
apps/ingest/alchemy.run.ts: map the role's URL throughOutput.mapand rewritesslmode=verify-fulltosslmode=requirebefore it reaches the secret. The gateway's rustls connector verifies the certificate chain and hostname underrequireregardless, so the connection guarantee is unchanged. Stages without a database branch still readMAPLE_INGEST_PG_URLuntouched.Follow-up worth doing separately: teach the Rust side to accept
verify-full(or print the error chain at that boundary) so the next unsupported option is diagnosable from the log line alone.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.