Repository navigation
ci(workerd): Hyperdrive in front of Supabase on the edge - #158
Merged
Merged
Conversation
okomarov
force-pushed
the
edge-supabase
branch
2 times, most recently
from
October 19, 2026 10:36
29ca709 to
ed443c9
Compare
okomarov
force-pushed
the
edge-supabase
branch
from
October 19, 2026 11:37
ed443c9 to
7de3b8e
Compare
…gainst Supabase on the edge The edge runner retried a Cloudflare error page once. On the Workers Free plan Cloudflare throttled every request to the Preview for about 95 seconds after repeated exceededCpu outcomes (run 39229088257), serving its own HTTP 500 page. The runner now waits Retry-After when Cloudflare sends one, otherwise 2 s doubling to 30 s, for up to 180 s per scenario, and reports platformErrors and waitedMs. The two edge jobs share one Neon database and run at the same time; one dropped and recreated the subscribe publication between the other's drop and create (42710, run 39232289023). The scenario now creates it once. A Hyperdrive config in front of a free Supabase project's direct connection, verify-full against Supabase's root CA uploaded to Cloudflare. The host is IPv6-only on the Free plan and Hyperdrive reaches it. It connects as a dedicated postgresjs_ci role confined to its own schema; the password lives only in the Hyperdrive config, so the workflow needs no new secret. The docs name Supabase as a private-CA server that Workers reach through Hyperdrive. Hyperdrive in front of Supavisor's transaction pooler failed every round on both builds and dates with prepare: true: prepared statement does not exist (26000), CONNECTION_CLOSED and timeouts (run 39234865111). Supavisor's transaction mode does not support prepared statements (Supabase's connection docs), and Cloudflare's Supabase guide points Hyperdrive at the direct connection while its postgres.js page discourages prepare: false. That setup stays out of CI and the docs say so, citing both (#154, porsager#960). With three configs, five rounds cost about 6,000 queries per push against the Free plan's 100,000 a day, so PR and main runs make one round; longer runs stay on workflow_dispatch with hyperdrive_rounds.
okomarov
force-pushed
the
edge-supabase
branch
from
October 19, 2026 13:17
7de3b8e to
063909d
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.
Stacked on #157.
Adds a Hyperdrive config in front of a free Supabase project's direct connection (
postgresjs-ci, eu-west-1). It usesverify-fullagainst Supabase's root CA, uploaded to Cloudflare assupabase-root-2021. The host is IPv6-only on the Free plan, and Hyperdrive reaches it. The config connects as a dedicatedpostgresjs_cirole with its own schema. The password exists only inside the Hyperdrive config, so the workflow needs no new secret.Edge runs now make one Hyperdrive round by default, about 1,200 queries per push against the Free plan's 100,000 a day.
hyperdrive_roundson workflow_dispatch runs more.Hyperdrive in front of Supavisor's transaction pooler (6543) failed every round on both builds and both dates with
prepare: true(run 39234865111):prepared statement does not exist(26000),CONNECTION_CLOSEDand timeouts. Both vendors' docs already rule this setup out:prepare: falseis discouraged behind Hyperdrive.That setup stays out of CI, and
docs/api.mdsays so with links. This is the evidence for #154 (porsager#960).A
prepare: falserun (39236978516) also failed. During that run, the CI role's connection limit (20, since raised to 40) was refusing connections (53300 too many connectionsin Supavisor's logs), so that run is not evidence either way.