chore(electric-proxy): local dev setup and worker cleanup#1464
Conversation
📝 WalkthroughWalkthroughThe electric-proxy application extracts its environment configuration interface to a dedicated file and refactors the main module to import it. Additionally, the logic for handling the ELECTRIC_SECRET parameter is updated to be conditional—it is only included in query parameters when present. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
…secret optional Move Env interface to dedicated env.ts file. Enable Cloudflare observability. Make ELECTRIC_SECRET optional for local dev without it.
af99d81 to
d6b33bf
Compare
Observability was enabled in #1464 but dropped when the proxy was re-created from scratch in #1867. Without it, every wrangler deploy reconciles Cloudflare back to logs/traces off, which is why the dashboard toggles kept reverting after each production deploy. Pin invocation_logs explicitly so future config drift can't silently disable it again. Audit logs are an account-level setting and still need to be re-enabled in the Cloudflare dashboard separately.
…3565) Observability was enabled in #1464 but dropped when the proxy was re-created from scratch in #1867. Without it, every wrangler deploy reconciles Cloudflare back to logs/traces off, which is why the dashboard toggles kept reverting after each production deploy. Pin invocation_logs explicitly so future config drift can't silently disable it again. Audit logs are an account-level setting and still need to be re-enabled in the Cloudflare dashboard separately.
Summary
bun dev(wrangler dev, Caddy HTTP/2 proxy, .dev.vars generation)Envinterface to dedicated file, enable Cloudflare observabilityELECTRIC_SECREToptional for local devChanges
.superset/setup.sh— Generateapps/electric-proxy/.dev.varswith local Electric/auth URLs; Caddy now reverse-proxies wrangler dev instead of the API server; addELECTRIC_PROXY_PORTandCADDY_ELECTRIC_PORTpackage.json— Include@superset/electric-proxyinbun devturbo.jsonc— AddNEXT_PUBLIC_ELECTRIC_URLandELECTRIC_PROXY_PORTto global envapps/electric-proxy/package.json— Dev script reads port from.envvia dotenvapps/electric-proxy/src/env.ts— ExtractedEnvinterfaceapps/electric-proxy/src/index.ts— Import from env.ts, make secret conditionalapps/electric-proxy/wrangler.jsonc— Bump compat date, enable observability.gitignore— Ignore.dev.varsTest Plan
.superset/setup.sh— verify.dev.varsgenerated inapps/electric-proxy/bun dev— verify electric-proxy starts alongside other servicesSummary by CodeRabbit
Release Notes
Bug Fixes
Chores