Skip to content

Add Redis ACL username support for Sentinel connections#312

Merged
sibson merged 1 commit into
mainfrom
claude/evaluate-redbeat-pr-7AL4M
Mar 28, 2026
Merged

Add Redis ACL username support for Sentinel connections#312
sibson merged 1 commit into
mainfrom
claude/evaluate-redbeat-pr-7AL4M

Conversation

@sibson
Copy link
Copy Markdown
Owner

@sibson sibson commented Mar 26, 2026

$(cat <<'EOF'

Summary

Based on the approach in #311, with the following improvements:

  • Comment accuracy: The original comment said username is "not included in Sentinel initialization" but it is passed via **connection_kwargs. Updated comment explains why it uses connection_kwargs (compatibility with redis<3.4.0).
  • is not None check: Changed if username: to if username is not None: to avoid silently ignoring an empty-string username, consistent with how password is handled (passed unconditionally).
  • Simplified test assertion: Replaced two assert lines with a single assert ... == 'acl-user' which also implicitly checks key presence.

Test plan

  • pytest tests/test_scheduler.py -k sentinel — all 8 sentinel tests pass
    EOF
    )

Adds username support when connecting to Redis via Sentinel, enabling
Redis 6.0+ ACL authentication. Uses connection_kwargs to maintain
compatibility with redis>=3.2 where Sentinel does not accept username
as a named argument. Fixes truthy check to `is not None` for correctness.

https://claude.ai/code/session_01SZGPPwrfF3re26pXsiiuyE
@sibson sibson force-pushed the claude/evaluate-redbeat-pr-7AL4M branch from 40e9bcb to 73e0d2a Compare March 28, 2026 10:37
@sibson sibson merged commit 471d5b1 into main Mar 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants