Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend: Update deployment config on app start #921

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tianjing-li
Copy link
Collaborator

@tianjing-li tianjing-li commented Jan 24, 2025

AI Description

This PR introduces changes to the deployment configuration process, primarily involving the deployment_service module. The key modifications include:

  • Renaming the update_config function to update_db_config in src/backend/routers/deployment.py and src/backend/services/deployment.py.
  • Replacing deployment_service.update_config with deployment_service.update_db_config in the update_config function in src/backend/routers/deployment.py.
  • Adding a new function update_db_config_from_env in src/backend/services/deployment.py to update the database configuration from the environment.
  • Updating the test_update_config_db and test_update_config_no_db_deployments test functions in src/backend/tests/unit/services/test_deployment.py to use the new update_db_config function.
  • Importing the get_session function from backend.database_models.database and calling deployment_service.update_db_config_from_env(next(get_session())) in src/backend/main.py.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 66.66667% with 7 lines in your changes missing coverage. Please review.

Project coverage is 77.25%. Comparing base (ec0c043) to head (5f884ca).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/backend/services/deployment.py 53.33% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #921      +/-   ##
==========================================
- Coverage   77.26%   77.25%   -0.01%     
==========================================
  Files         281      281              
  Lines       11485    11502      +17     
==========================================
+ Hits         8874     8886      +12     
- Misses       2611     2616       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

3 participants