chore(deploy): Gate hosted SQLite recovery behind explicit flag #31#32
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR makes the hosted “SQLite recovery” behavior an explicit operator opt-in by introducing DJANGO_ENABLE_HOSTED_SQLITE_FALLBACK, and documents/tests the intended emergency-only workflow for Vercel-hosted deployments.
Changes:
- Add
DJANGO_ENABLE_HOSTED_SQLITE_FALLBACKand computeHOSTED_SQLITE_FALLBACKto gate cookie-backed sessions/messages in hosted + SQLite mode. - Add regression tests asserting the hosted SQLite fallback is off by default and only activates when explicitly enabled.
- Document the emergency hosted SQLite recovery mode and the new environment variable.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
deep_workflow/settings.py |
Introduces DJANGO_ENABLE_HOSTED_SQLITE_FALLBACK and gates cookie-backed session/message backends behind a hosted+SQLite+flag condition. |
core/tests/test_deployment.py |
Adds subprocess-based tests to validate the new flag behavior in settings import-time logic. |
README.md |
Documents the emergency-only flag and explains when/how to use hosted SQLite recovery. |
|
@copilot apply changes based on the comments in this thread Resolve all discussions at #32 (review) when each comment is tackled. |
Agent-Logs-Url: https://github.com/mathemage/deep-workflow/sessions/443c7d6a-3fb6-46e8-afcf-bf5946cd691a Co-authored-by: mathemage <3373514+mathemage@users.noreply.github.com>
…holder DB creds Agent-Logs-Url: https://github.com/mathemage/deep-workflow/sessions/443c7d6a-3fb6-46e8-afcf-bf5946cd691a Co-authored-by: mathemage <3373514+mathemage@users.noreply.github.com>
All 4 review discussions addressed in commits 36cf212 and f90ebe3:
Helper also renamed from |
|
@copilot apply changes based on the comments in this thread Resolve discussion at #32 (review) once each comment is fixed |
…flag Agent-Logs-Url: https://github.com/mathemage/deep-workflow/sessions/849021ef-a502-4f93-918d-5088bc04d46c Co-authored-by: mathemage <3373514+mathemage@users.noreply.github.com>
Fixed in 6815141. The hosted SQLite guard message now explicitly says hosted deploys require a valid PostgreSQL Validation passed with |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(1) PostgreSQL `DATABASE_URL`, or (2) `DJANGO_ENABLE_HOSTED_SQLITE_FALLBACK=1` + a SQLite `DATABASE_URL` (emergency only) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
DJANGO_ENABLE_HOSTED_SQLITE_FALLBACK=1opt-in before hosted SQLite recovery activatesDATABASE_URLis missing or invalidWhy
The SQLite rescue path is useful during an outage, but it should never activate silently during normal hosted deploys. This PR keeps the recovery option available while making it a deliberate operator choice.
Closes #31