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

fix: remove .encode() from redis password #754

Merged
merged 1 commit into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions bot/kodiak/entrypoints/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ async def get_redis() -> asyncio_redis.Pool:
_redis = await asyncio_redis.Pool.create(
host=conf.REDIS_URL.hostname or "localhost",
port=conf.REDIS_URL.port or 6379,
password=(
conf.REDIS_URL.password.encode() if conf.REDIS_URL.password else None
),
password=conf.REDIS_URL.password,
# XXX: which var?
poolsize=conf.USAGE_REPORTING_POOL_SIZE,
ssl=conf.REDIS_URL.scheme == "rediss",
Expand Down
4 changes: 1 addition & 3 deletions bot/kodiak/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ async def get_redis() -> asyncio_redis.Pool:
_redis = await asyncio_redis.Pool.create(
host=conf.REDIS_URL.hostname or "localhost",
port=conf.REDIS_URL.port or 6379,
password=(
conf.REDIS_URL.password.encode() if conf.REDIS_URL.password else None
),
password=conf.REDIS_URL.password,
poolsize=conf.USAGE_REPORTING_POOL_SIZE,
encoder=asyncio_redis.encoders.BytesEncoder(),
ssl=conf.REDIS_URL.scheme == "rediss",
Expand Down
4 changes: 1 addition & 3 deletions bot/kodiak/redis_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ async def create_connection() -> asyncio_redis.Connection:
return await asyncio_redis.Connection.create(
host=conf.REDIS_URL.hostname or "localhost",
port=conf.REDIS_URL.port or 6379,
password=(
conf.REDIS_URL.password.encode() if conf.REDIS_URL.password else None
),
password=conf.REDIS_URL.password,
ssl=conf.REDIS_URL.scheme == "rediss",
db=redis_db,
)
4 changes: 1 addition & 3 deletions bot/kodiak/test_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,7 @@ async def setup_redis(github_installation_id: str) -> None:
r = await asyncio_redis.Connection.create(
host=host,
port=port,
password=(
conf.REDIS_URL.password.encode() if conf.REDIS_URL.password else None
),
password=conf.REDIS_URL.password,
)
key = f"kodiak:subscription:{github_installation_id}"
await r.hset(key, "account_id", "D1606A79-A1A1-4550-BA7B-C9ED0D792B1E")
Expand Down