Skip to content

feat: warn on missing startup env vars#413

Draft
saurabhhhcodes wants to merge 1 commit into
Kuldeeep18:mainfrom
saurabhhhcodes:codex/startup-settings-validation
Draft

feat: warn on missing startup env vars#413
saurabhhhcodes wants to merge 1 commit into
Kuldeeep18:mainfrom
saurabhhhcodes:codex/startup-settings-validation

Conversation

@saurabhhhcodes

Copy link
Copy Markdown
Contributor

What changed

  • Added a small startup helper that warns when essential runtime env vars are missing.
  • Hooked the check into both WSGI and ASGI startup paths.
  • Added a test that verifies the warning is printed for missing Gemini/Google OAuth settings.

Why

  • The app could start successfully and only fail later when a feature needed an unset credential.
  • A clear startup warning makes misconfiguration easier to catch before deployment.

Validation

  • python3 -m py_compile backend/backend/startup.py backend/backend/wsgi.py backend/backend/asgi.py backend/users/tests.py
  • git diff --check
  • python3 backend/manage.py test users.tests.StartupValidationTests -v 2

Closes #405

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 704a83f3-a1bb-4c05-9bfd-a8d4a427c203

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LO-068 [Easy]: Add Django Settings Validation on Startup

1 participant