Closed androa closed 10 months ago
Yeah, it'd probably be a simple change:
diff --git a/bot/kodiak/redis_client.py b/bot/kodiak/redis_client.py
index 524da4b..2d64145 100644
--- a/bot/kodiak/redis_client.py
+++ b/bot/kodiak/redis_client.py
@@ -14,6 +14,7 @@ def create_connection() -> "redis.Redis[bytes]":
host=conf.REDIS_URL.hostname or "localhost",
port=conf.REDIS_URL.port or 6379,
password=conf.REDIS_URL.password,
+ username=conf.REDIS_URL.username or "default",
ssl=conf.REDIS_URL.scheme == "rediss",
db=redis_db,
socket_keepalive=True,
Out of curiosity, how are you running Redis so that it's not using the default username?
I'm trying to set up self-hosted Kodiak, but I'm not able to make it connect to the Redis instance.
My Redis instance is dependent on both username and password, but it seems like this snippet of code is overriding the username and password I set in the URL.
https://github.com/chdsbd/kodiak/blob/729e64dbc1211117a1d83aaccc0bcbd0967e550a/bot/kodiak/redis_client.py#L13-L18
Would be possible to expand this to include the possiblity of setting username as well?