mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
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/16160
Author: @erhhung
Created: 7/30/2025
Status: ❌ Closed
Base:
dev← Head:redis-cluster📝 Commits (3)
b2715a4enh: support for Redis in cluster mode3c60b8aMerge branch 'dev' into redis-cluster9ba668bMerge branch 'dev' into redis-cluster📊 Changes
7 files changed (+39 additions, -23 deletions)
View changed files
📝
Dockerfile(+1 -0)📝
backend/open_webui/config.py(+6 -4)📝
backend/open_webui/env.py(+6 -9)📝
backend/open_webui/main.py(+4 -1)📝
backend/open_webui/socket/main.py(+7 -1)📝
backend/open_webui/socket/utils.py(+4 -4)📝
backend/open_webui/utils/redis.py(+11 -4)📄 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
Introduced two new boolean environment variables,
REDIS_CLUSTER_MODEandWEBSOCKET_REDIS_CLUSTER_MODE(TrueorFalse), that trigger the use ofredis.cluster.RedisClusterandredis.asyncio.cluster.RedisClusterclient classes from theredis-pypackage in order to properly support connections to Redis in cluster mode.Setting these new environment variables will require also setting
REDIS_URLand/orWEBSOCKET_REDIS_URL, and they have lower precedence thanREDIS_SENTINEL_HOSTSandWEBSOCKET_SENTINEL_HOSTSvariables if the latter are also defined, i.e., they have no effect if connecting to sentinel hosts.Added
REDIS_CLUSTER_MODEandWEBSOCKET_REDIS_CLUSTER_MODEChanged
redis-pyclient classes based on desired mode: single instance, sentinel hosts, or cluster modeDeprecated
None
Removed
None
Fixed
#16157: Backend cannot connect to Redis in cluster mode
Security
None
Breaking Changes
None
Additional Information
I need help to write unit tests for using the new Redis clients as I'm not familiar with mocking using
pytest.Corresponding documentation changes for the new environment variables submitted in
open-webui/docsPR #638.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.