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:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests for validating the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
This builds off of #2666 that refused to cooperate with SQLite. Now the backend should automatically attempt to reconnect with the SQLite or Postgres DBs if the connection is dropped.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/3221
**Author:** [@perfectra1n](https://github.com/perfectra1n)
**Created:** 6/16/2024
**Status:** ✅ Merged
**Merged:** 6/19/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `feature-external-db-reconnect`
---
### 📝 Commits (10+)
- [`dfbc125`](https://github.com/open-webui/open-webui/commit/dfbc12594702bf601c4c391cfe080f8e0844d01e) Reconnect to postgresql & mysql external databases when getting disconnected
- [`e1fa453`](https://github.com/open-webui/open-webui/commit/e1fa453edae689c5eea6af0b23e3dc1e158b302f) Test reconnection to postgres in gh actions
- [`e59e1f5`](https://github.com/open-webui/open-webui/commit/e59e1f5049c1b3d9b5ff7f61d7f6051cd2950b22) Fix rebase artifacts
- [`ad32a2e`](https://github.com/open-webui/open-webui/commit/ad32a2ef3cc508d6540b16a762dec31b773818c6) Drop mysql restarts
- [`75d7130`](https://github.com/open-webui/open-webui/commit/75d713057c8e2707d35ded7bf33769f9ae7bbf85) Merge remote-tracking branch 'upstream/main' into feature-external-db-reconnect
- [`10fa887`](https://github.com/open-webui/open-webui/commit/10fa887eab491f1fcfb175b9c458d202e2198732) fix peewee and playhouse connections to retry
- [`9e4dd4b`](https://github.com/open-webui/open-webui/commit/9e4dd4b86f77653b59dc1fa97fe3f72e8252b359) Merge pull request #3159 from open-webui/dev
- [`981866e`](https://github.com/open-webui/open-webui/commit/981866eb930b4ef26bd93b89313c70983951ee75) use autoconnect and stop using the mixin
- [`5c655f2`](https://github.com/open-webui/open-webui/commit/5c655f298b6b692dc936eae0e81f39bd174e54b6) stop even using pooled DBs in peewee
- [`48e1356`](https://github.com/open-webui/open-webui/commit/48e1356ed9cc54b2ca3852a2349b6f74871dc5f9) add logging for user upon db connection
### 📊 Changes
**3 files changed** (+113 additions, -8 deletions)
<details>
<summary>View changed files</summary>
📝 `.github/workflows/integration-test.yml` (+20 -0)
📝 `backend/apps/webui/internal/db.py` (+21 -8)
➕ `backend/apps/webui/internal/wrappers.py` (+72 -0)
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [ ] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [ ] **Description:** Provide a concise description of the changes made in this pull request.
- [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [ ] **Testing:** Have you written and run sufficient tests for validating the changes?
- [ ] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [ ] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
This builds off of #2666 that refused to cooperate with SQLite. Now the backend should automatically attempt to reconnect with the SQLite or Postgres DBs if the connection is dropped.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/3221
Author: @perfectra1n
Created: 6/16/2024
Status: ✅ Merged
Merged: 6/19/2024
Merged by: @tjbck
Base:
dev← Head:feature-external-db-reconnect📝 Commits (10+)
dfbc125Reconnect to postgresql & mysql external databases when getting disconnectede1fa453Test reconnection to postgres in gh actionse59e1f5Fix rebase artifactsad32a2eDrop mysql restarts75d7130Merge remote-tracking branch 'upstream/main' into feature-external-db-reconnect10fa887fix peewee and playhouse connections to retry9e4dd4bMerge pull request #3159 from open-webui/dev981866euse autoconnect and stop using the mixin5c655f2stop even using pooled DBs in peewee48e1356add logging for user upon db connection📊 Changes
3 files changed (+113 additions, -8 deletions)
View changed files
📝
.github/workflows/integration-test.yml(+20 -0)📝
backend/apps/webui/internal/db.py(+21 -8)➕
backend/apps/webui/internal/wrappers.py(+72 -0)📄 Description
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
This builds off of #2666 that refused to cooperate with SQLite. Now the backend should automatically attempt to reconnect with the SQLite or Postgres DBs if the connection is dropped.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.