Wrangler Local Dev Broken

Ah, 3.84.1 works locally? Does it cooperate with local dev against a remote connection string?
12 Replies
AJR
AJROPā€¢22h ago
Moving this to a thread so I can keep things straight
alex (he/him)
alex (he/him)ā€¢22h 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
AJROPā€¢22h ago
No, workerd interpolates. I wonder if this is the workerd change, then.
alex (he/him)
alex (he/him)ā€¢22h 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
Slylencerā€¢22h ago
Can confirm 3.85.0 works locally for me as well
AJR
AJROPā€¢22h ago
I've messaged the team, and we'll take a look. Thank you.
alex (he/him)
alex (he/him)ā€¢22h 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
thomasgauvinā€¢21h 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)ā€¢21h 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
Slylencerā€¢21h ago
I'm fine
alex (he/him)
alex (he/him)ā€¢17h ago
AJR
AJROPā€¢16h 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
Want results from more Discord servers?
Add your server