Wrangler Local Dev Broken

Ah, 3.84.1 works locally? Does it cooperate with local dev against a remote connection string?
20 Replies
AJR
AJROP4w ago
Moving this to a thread so I can keep things straight
alex (he/him)
alex (he/him)4w ago
3.84.1 works with localhost db but with remote neon db it does show
{"DB":{"connectionString":"postgresql://repguide_owner:[email protected]:5432/repguide?sslmode=disable","port":5432,"host":"bfa6001c99d06d2a8c5936d7aa551dac.hyperdrive.local","password":"XXX","user":"repguide_owner","database":"repguide"}}
✘ [ERROR] Uncaught (in promise) PostgresError: connection is insecure (try using `sslmode=require`)

at ErrorResponse
(file:///Users/alexanderniebuhr/Developer/Projects/frickegroup/workers/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/src/connection.js:790:26)
at handle
(file:///Users/alexanderniebuhr/Developer/Projects/frickegroup/workers/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/src/connection.js:475:7)
at data
(file:///Users/alexanderniebuhr/Developer/Projects/frickegroup/workers/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/src/connection.js:317:9)
at emit (node-internal:events:307:32)
at read
(file:///Users/alexanderniebuhr/Developer/Projects/frickegroup/workers/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/polyfills.js:202:13)
{"DB":{"connectionString":"postgresql://repguide_owner:[email protected]:5432/repguide?sslmode=disable","port":5432,"host":"bfa6001c99d06d2a8c5936d7aa551dac.hyperdrive.local","password":"XXX","user":"repguide_owner","database":"repguide"}}
✘ [ERROR] Uncaught (in promise) PostgresError: connection is insecure (try using `sslmode=require`)

at ErrorResponse
(file:///Users/alexanderniebuhr/Developer/Projects/frickegroup/workers/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/src/connection.js:790:26)
at handle
(file:///Users/alexanderniebuhr/Developer/Projects/frickegroup/workers/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/src/connection.js:475:7)
at data
(file:///Users/alexanderniebuhr/Developer/Projects/frickegroup/workers/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/src/connection.js:317:9)
at emit (node-internal:events:307:32)
at read
(file:///Users/alexanderniebuhr/Developer/Projects/frickegroup/workers/node_modules/.pnpm/[email protected]/node_modules/postgres/cf/polyfills.js:202:13)
Even if my connectionString is WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_DB="postgresql://repguide_owner:[email protected]/repguide?sslmode=require" So it doesn't take sslmode I set into consideration
AJR
AJROP4w ago
No, workerd interpolates. I wonder if this is the workerd change, then.
alex (he/him)
alex (he/him)4w ago
Correction, 3.85.0 also works, but only with localhost So it seems like > 3.86.0 breaks Okay so my guess <= 3.85.0 only works with localhost connectionString >= 3.86.0 doesn't work with any connectionString -> timeouts
Slylencer
Slylencer4w ago
Can confirm 3.85.0 works locally for me as well
AJR
AJROP4w ago
I've messaged the team, and we'll take a look. Thank you.
alex (he/him)
alex (he/him)4w ago
Thanks for taking a look so quick. And glad to hear that the intended behavior is, that even remote connection strings should be supported, so we can use solutions like Neon for development 🙂
thomasgauvin
thomasgauvin4w ago
Definitely, we want you to be able to use remote db's for dev, we added this a few versions ago @alex (he/him) @Slylencer while we investigate local dev, just making sure you're unblocked since npx wrangler dev --remote is working
alex (he/him)
alex (he/him)4w ago
For me not really. We have an architecture with multiple workers connected with service bindings to use RPC calls, that doesn't seem to work if we use --remote, since it doesn't find the scripts anymore
Slylencer
Slylencer4w ago
I'm fine
alex (he/him)
alex (he/him)4w ago
AJR
AJROP4w ago
Good catch. I've already opened up a revert to get us back to the prior state (https://github.com/cloudflare/workerd/pull/3148). We'll take another run at it working with remote DBs when we can.
GitHub
Build software better, together
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
From An unknown user
From An unknown user
From An unknown user
alex (he/him)
alex (he/him)4w ago
So this brings us back to the <= 3.85.0 behavior, which didn’t support remote db's for devs?
AJR
AJROP4w ago
For the time being, yes
piffie
piffie3w ago
also same issue for me - 3.85 works.
alex (he/him)
alex (he/him)3w ago
@AJR I know that’s hard to tell. But any ETA when to expect the reimplementation of the remote db support. I’m in the middle of migration a clients full backend architecture to CF. And it is planned to be finished by end of December. Would be great to at least be able to tell the client when it will work with remote db.
AJR
AJROP3w ago
It's not something I anticipate having cycles to tackle in December. I'd say, likely, it's something we'll try to fit into Q1. I can't promise anything here though, will need to coordinate with product a bit. The original behavior, with local dev on local DBs, will be restored with the next workerd release
AJR
AJROP2w ago
@elithrar This restores local support. It does not add remote DB support, as most remote DB options do not work with sslmode=disable
elithrar
elithrar2w ago
Yes sorry - this is just the local only fix (The title of this thread was local dev)
Want results from more Discord servers?
Add your server