Repository navigation
Forward REDIS_PASSWORD to memtier in the test harness - #841
Merged
Merged
Conversation
run_tests.sh starts the servers with REDIS_PASSWORD, but memtier only got it in tests that added --authenticate themselves, so most tests drove memtier into NOAUTH replies and many still passed. memtier_auth_args() adds --authenticate with the env's password unless the args already carry credentials or select a memcache protocol; add_required_env_arguments() and the tests that build their own command lines use it. The MGET protocol tests' MONITOR connection authenticates too, and tests that set a password restore the env's own. A CI cell runs the standalone suite with a password. Fixes #826 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 Automated first-pass review — a human maintainer's review is still required before merge. Thanks, the write-up makes this easy to follow. Putting it in
The harness change itself looks solid to me. I'd just like the first point answered, even if the answer is that it's out of scope for this PR. (would file this as a comment, not a formal block) |
As in memtier, only the last --uri and --protocol count when deciding whether memtier_auth_args adds --authenticate. test_reconnections uses it instead of its own copy, and the empty-password fuzz case skips when the server requires a password, as it no longer tests what it names. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
Thanks. Both points are taken, and I've moved them to a follow-up, #842, so this PR stays a plain forwarding fix.
|
fcostaoliveira
added a commit
that referenced
this pull request
Oct 24, 2026
Picks up #812, the reconnect deadline-clock fix for the never-started client test that failed this branch's plaintext job, plus #828, #838 and #841. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #826.
Problem
tests/run_tests.shstarts the servers withREDIS_PASSWORD(RLTest--oss_password), but memtier only got the password in tests that added--authenticatethemselves. With a password set, most tests drove memtier into-NOAUTH Authentication requiredand many still passed. Forwarding the password fromadd_required_env_arguments()alone is not enough: in a full standalone run with only that, 47 of 2,633 memtier invocations still got NOAUTH (tests that build their own command line), and 12 tests failed only for that reason.Change
tests/include.py:memtier_auth_args(env, args)returns--authenticate <password>with the env's password (RLTest node info, so it also works with--oss_passworddirectly). It returns nothing when there is no password, when the args already carry credentials (-a/--authenticate, or-u/--uriwith userinfo), or when they select a memcache protocol, which cannot AUTH as a Redis client.add_required_env_arguments()uses it.test_prometheus,test_prometheus_redaction,test_cli_fuzz_phase1(at run time, so the empty-password and memcache cases stay as they are),test_retry_on_error,test_cli_validation_count_flags,test_cli_validation_sampler,test_sigpipe_immunity,test_reconnections.test_mget_protocol: its MONITOR connection authenticates. Its thread swallowed NOAUTH, so each test saw 0 MGETs.test_prometheus_redaction,test_retry_on_error: after setting a test password they restore the env's own, not"".ci.yml: a "Single Endpoint: TCP Plaintext with auth" cell runs the standalone suite withREDIS_PASSWORD, so auth handling is covered suite-wide.Without a password nothing is added, so memtier's arguments are unchanged.
Validation
REDIS_PASSWORD: 866 run, 0 failed; 0 of 2,633 memtier invocations got NOAUTH (47 when onlyadd_required_env_arguments()forwarded it).tests_oss_simple_flow,test_config_password_redaction,test_realtime_latencies,test_verify_exit,test_unix_socket: 275 run, 0 failed.test_prometheus,test_prometheus_redaction: 38 run, 0 failed.test_426_17_wait_ratio_unsatisfiableexits 2 with and without authentication; it passed unauthenticated only because NOAUTH replies to WAIT count as responses. Not a memtier bug.Affected versions
Test harness only.
REDIS_PASSWORDsupport came in 62b237c (#809), which is in no release tag.🤖 Generated with Claude Code
Note
Low Risk
Test-harness and CI matrix changes only; no memtier_benchmark runtime or production auth behavior is modified.
Overview
Fixes #826 by making the RLTest harness pass
REDIS_PASSWORDthrough to memtier as--authenticate, so password-protected Redis envs no longer hit NOAUTH while tests still pass.tests/include.pyaddsmemtier_auth_args(env, args)(with_option_valuesfor CLI parsing): it appends auth when the node has a password and skips when credentials are already present, URI userinfo is set, or memcache protocol is selected.add_required_env_arguments()uses it for the standard benchmark path.Tests that build their own argv (prometheus, reconnections, cli fuzz, validation, sigpipe, retry_on_error, etc.) call the same helper;
test_reconnectionsdrops its local_add_auth_args.test_mget_protocolauthenticates MONITOR/redis-py connections.test_prometheus_redactionandtest_retry_on_errorrestore the env password after temporaryrequirepasschanges instead of clearing it.test_cli_fuzz_phase1skips the empty-password/no-auth case when the server requires auth.CI adds a "Single Endpoint: TCP Plaintext with auth" matrix cell;
run_tests.shhelp text notes memtier forwarding.Reviewed by Cursor Bugbot for commit e9a1f45. Bugbot is set up for automated code reviews on this repo. Configure here.