Skip to content

Fix Firebase initialization crash and add .env.example configuration#24

Open
aacritea wants to merge 3 commits into
ruxailab:mainfrom
aacritea:firebase-init-fix
Open

Fix Firebase initialization crash and add .env.example configuration#24
aacritea wants to merge 3 commits into
ruxailab:mainfrom
aacritea:firebase-init-fix

Conversation

@aacritea

Copy link
Copy Markdown

Summary

This PR fixes an issue where the application crashed during startup when FIREBASE_STORAGE_BUCKET was not configured. It also improves developer onboarding by adding a clearer .env.example configuration.

Problem

The Firebase service was initialized at import time in video_routes.py. If FIREBASE_STORAGE_BUCKET was not set, the application crashed during startup, preventing local development and testing.

Solution

  • Implemented conditional Firebase initialization
  • Added warning log when Firebase configuration is missing
  • Ensured application starts successfully without Firebase configuration
  • Added/updated .env.example to guide developers on required environment variables

Changes

  • Updated Firebase initialization logic in routes/video_routes.py
  • Added clearer environment variable configuration in .env.example
  • Updated .gitignore where necessary

Impact

  • Prevents application startup crashes
  • Improves developer experience
  • Enables easier local development
  • Improves application robustness

Testing

  • Verified application starts successfully without FIREBASE_STORAGE_BUCKET
  • Confirmed Firebase-dependent endpoint raises appropriate error when configuration is missing

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.

1 participant