mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-21 09:01:47 -05:00
[PR #17431] [CLOSED] refactor: move core config logic into differnet files (2/4) #24428
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/17431
Author: @luxass
Created: 9/14/2025
Status: ❌ Closed
Base:
dev← Head:refactor/extract-core-config📝 Commits (10+)
5ee3521refactor: move config.py into config/ package structure61ce6c4refactor(logging): move logging setup to a dedicated modulec9639ddrefactor(config): reorganize configuration modules and enhance structured300bdfchore: format5efefcbMerge branch 'dev' into refactor/move-to-config-module8b67a4aMerge branch 'dev' into refactor/move-to-config-module5d1ae32chore: format56bfb79Merge branch 'refactor/move-to-config-module' into refactor/extract-core-config44a40c9Merge branch 'dev' into refactor/move-to-config-module3ed1b5bMerge branch 'refactor/move-to-config-module' into refactor/extract-core-config📊 Changes
6 files changed (+323 additions, -282 deletions)
View changed files
➕
backend/open_webui/config/__init__.py(+23 -0)➕
backend/open_webui/config/base.py(+171 -0)➕
backend/open_webui/config/database.py(+79 -0)📝
backend/open_webui/config/legacy.py(+30 -281)➕
backend/open_webui/config/logging.py(+15 -0)📝
backend/open_webui/utils/oauth.py(+5 -1)📄 Description
⚠️ DEPENDS ON PR #17430
This PR builds on the changes from PR #17430. The diff currently shows cumulative changes from both PRs. Once PR #17430 is merged, I will rebase this branch and the diff will show only the changes specific to this PR.
Part 2/4 of the config refactoring series.
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Extract database configuration, Redis management, and logging setup from
config/legacy.pyinto dedicated modules. This is part 2 of 4 in the config.py refactoring series, continuing the modularization by separating core infrastructure concerns into logical modules.Added
backend/open_webui/config/database.py:run_migrations()function for Alembic migration handlingConfigSQLAlchemy model for persistent configuration storagebackend/open_webui/config/redis.py:backend/open_webui/config/logging.py:EndpointFilterclass for filtering health check logsbackend/open_webui/config/base.py:PersistentConfigclass for environment-backed configurationAppConfigclass for application state managementChanged
config/legacy.pyto dedicated modulesconfig/__init__.pyimports to reference new modular structureDeprecated
Removed
config/legacy.py(moved todatabase.py)config/legacy.py(moved toredis.py)config/legacy.py(moved tologging.py)config/legacy.py(moved tobase.py)Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.