Skip to content

ci: pin RLTest fork dependency to a commit SHA instead of a branch name - #531

Merged
fcostaoliveira merged 1 commit into
masterfrom
ci/pin-rltest-fork-sha
Oct 12, 2026
Merged

fcostaoliveira merged 1 commit into
masterfrom
ci/pin-rltest-fork-sha

Conversation

@fcostaoliveira

@fcostaoliveira fcostaoliveira commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

tests/test_requirements.txt points at git+https://github.com/fcostaoliveira/RLTest.git@fix/cluster-aware-replicas -- a mutable branch name on a personal fork. A force-push, rename, or deletion of that branch could silently change what every CI cell installs, with no diff anywhere in this repo to show it happened.

Pins to the branch's current commit SHA (4808b5f6) instead. No functional change -- same fork, same commit, just addressed immutably from here on.

Split out of PR #526's review thread (raised there across several rounds) so this CI-dependency change can land independently of that feature's review. The broader "should CI depend on a personal fork's continued availability at all" question is tracked separately in #530 -- this PR only closes the mutation/force-push angle, not the availability one.

Test plan

  • pip install -r tests/test_requirements.txt installs cleanly at the pinned SHA.
  • No other files changed; this is a one-line dependency pin.

Note

Low Risk
Test dependency pinning only; no runtime or application behavior change.

Overview
Pins the temporary RLTest fork in tests/test_requirements.txt from the mutable branch fix/cluster-aware-replicas to commit 4808b5f63f55788c094b111e1adecd00b9716a00. Same fork and same code as before; only the install reference is immutable.

Comments now explain that SHA pinning prevents a force-push, rename, or branch delete on the fork from changing what CI installs without a visible change in this repo. Upstream revert path (RedisLabsModules/RLTest master after PR #253) is unchanged.

Reviewed by Cursor Bugbot for commit 734b45f. Bugbot is set up for automated code reviews on this repo. Configure here.

tests/test_requirements.txt pointed at
git+https://github.com/fcostaoliveira/RLTest.git@fix/cluster-aware-replicas
-- a mutable branch name on a personal fork. A force-push, rename, or
deletion of that branch could silently change what every CI cell installs
without a diff anywhere in this repo to show it.

Pins to the branch's current commit SHA instead. No functional change --
same commit, just addressed immutably. Split out of PR #526 (per review
discussion there) so this CI-dependency change isn't gated on an
unrelated feature's review.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
fcostaoliveira added a commit that referenced this pull request Aug 28, 2026
#531)

tests/test_requirements.txt reverted to match master exactly -- the
branch->SHA pin now lives in PR #531 instead, opened off master directly,
so that CI-dependency change isn't gated on this feature's review (asked
across rounds 23/26/28). Once #531 merges, this branch will pick up the
SHA pin on the next rebase/merge from master with no separate action
needed here.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
fcostaoliveira added a commit that referenced this pull request Aug 28, 2026
…a-test gate, MONITOR-registration race fix, comment trims, README relocation

- run_tests.sh: the OSS_CLUSTER_REPLICAS=1 block now sets
  MEMTIER_CLUSTER_REPLICAS_EXPECTED=1 inside its own subshell only (not
  globally). test_client_no_touch_cluster.py's replica test now hard-
  requires that dedicated, purpose-built signal instead of inferring
  "--use-slaves was passed" from env_started_with_slaves() -- the bot's
  point: a gate whose failure mode is "silently skip and the cell goes
  green having only exercised the non-seed-primary case" is the wrong
  shape for a test deliberately made assert-rather-than-skip, since any
  future drift in the inference (env var scoping, sys.argv contents,
  RLTest's own CLI shape) fails toward silence instead of noise. Re-ran
  the OSS_CLUSTER=1 OSS_CLUSTER_REPLICAS=1 scenario end-to-end: plain pass
  skips, replicas pass passes (2/2), same as before but now via an
  explicit declaration instead of an inference.
- test_client_no_touch_resent_after_reconnect: replaced the fixed 0.15s
  sleep before snapshotting client ids with an active poll for the MONITOR
  connection to actually show up in CLIENT LIST (flags contains 'O').
  conn.monitor()'s underlying socket connects lazily on first use, so a
  fixed delay could race on a loaded runner -- if the snapshot fired before
  MONITOR registered, the kill step would treat the MONITOR connection
  itself as "new" (looks like memtier's) and kill it.
- Sanitizer-cell cost of collecting test_client_no_touch_cluster.py with no
  TEST: pin (asked, not code): checked a completed ASAN OSS-CLUSTER API:
  TCP Plaintext run -- both tests' cluster boot+run+teardown took ~15-20s
  combined inside a ~13m job that also runs every other OSS-CLUSTER test
  file. Not a meaningful driver of that cell's duration.
- Trimmed PR-review-history language from env_started_with_slaves()'s
  docstring and the rt_no_touch snprintf comment -- kept the technical
  why, dropped the "an earlier version got this wrong" framing.
- README: "Known limitations" (#527) is no longer a sibling of "Testing
  limitations" buried in the middle of the Read Preference / cluster-mode
  material -- promoted to its own top-level section, placed right after
  "Using memtier_benchmark"'s subsections and before "Crash Reporting", so
  it isn't nested inside content specific to a feature #527 has nothing to
  do with.
- Generic connection-setup-command hook: still #528, no new example this
  round (CLIENT NO-EVICT/TRACKING/SETINFO/SETNAME/REPLY already listed).
- Noted on #527 (comment, no issue-body change) that --client-no-touch
  widens its window slightly since NO-TOUCH arms on every connection,
  unlike READONLY's replica-only scope -- a marginally larger window for
  the same pre-existing bug, not a new instance of it.

The RLTest SHA-pin split (also asked this round) is done as of the prior
commit -- PR #531.

Verified locally: test_client_no_touch.py 4/4 (polling fix), and the
exact OSS_CLUSTER=1 OSS_CLUSTER_REPLICAS=1 scenario end-to-end (plain
pass skips, replicas pass 2/2) with the new dedicated env var.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
fcostaoliveira added a commit that referenced this pull request Aug 28, 2026
…e, fix stale PR description

- Investigated whether the "evbuffer notify callback doesn't re-arm
  EPOLLOUT on the first user-level send" claim (originally written for
  READONLY, copied for CLIENT NO-TOUCH) actually holds for discovered
  connections in general, since HELLO already goes out via the identical
  plain evbuffer_add path on the identical connection type. Empirically:
  attached MONITOR to a non-seed shard in a local 3-node cluster and ran
  memtier --cluster-mode against the bootstrap seed only -- real SET/GET
  traffic flowed on the non-seed connection, which requires m_hello to
  have reached setup_done, meaning HELLO's plain-evbuffer-add write did
  flush and get acknowledged there. Also: bufferevent_enable(m_bev,
  EV_READ | EV_WRITE) already ran unconditionally at BEV_EVENT_CONNECTED
  before the original READONLY bug was even diagnosed (present before
  PR #456 merged). The original bug-fix commit also fixed an unrelated
  fill_pipeline spin that could have starved BEV_EVENT_CONNECTED from
  ever firing for the replica connection at all -- a plausible alternate
  explanation for what was actually observed. Filed #532 for someone to
  actually isolate the two changes and confirm which one was load-bearing,
  rather than resolving it unilaterally in this PR (bufferevent_write is
  safe regardless either way -- same wire bytes -- just possibly
  over-justified). Reworded the CLIENT NO-TOUCH comment to say it follows
  READONLY's precedent rather than independently asserting the same
  causal claim, and points at #532.
- PR description: fixed the stale claim that this branch carries the
  RLTest SHA pin (it doesn't -- split to #531, landing separately) and
  explained the run_tests.sh MEMTIER_CLUSTER_REPLICAS_EXPECTED addition
  that IS still in this PR.
- The benchmark_error_log NULL-arg nitpick and env_started_with_slaves()
  redundancy question are answered in the PR thread, not with a code
  change: the NULL-arg style matches the sibling AUTH/READONLY cases
  (consistency, not a new gap), and env_started_with_slaves() still has
  one real (if lower-stakes) consumer -- the defensive stderr warning in
  get_cluster_replica_connections(), not currently expected to fire but
  still useful if the fork ever does regress.

Verified locally: test_client_no_touch.py 4/4. Rebuilt clean (comment-only
change to shard_connection.cpp), format-check clean.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
fcostaoliveira added a commit that referenced this pull request Aug 28, 2026
…icting comment, consistent #532 framing

- Removed env_started_with_slaves() entirely. Now that
  MEMTIER_CLUSTER_REPLICAS_EXPECTED answers "did this invocation ask for
  replicas" correctly (round 28), it's the same question the sys.argv
  helper existed to answer -- get_cluster_replica_connections()'s warning
  path now reads the env var directly instead of keeping two mechanisms
  for one question.
- peer_client_has_any_setup_in_progress()'s pre-existing top comment said
  "not yet ready for reads (HELLO/CLUSTER SLOTS/READONLY pending)", which
  contradicts the comment three lines below it (correctly stating
  is_ready_for_reads() doesn't gate on HELLO) -- and is_ready_for_reads()'s
  own definition confirms the lower comment is the accurate one. Fixed the
  top comment instead of leaving the two disagreeing.
- Made the bufferevent_write/EPOLLOUT framing consistent at one confidence
  level everywhere it's told: the PR description and
  test_client_no_touch_cluster.py's docstring both asserted the original
  diagnosis as fact while the code comment (since round 29) calls it an
  open question tracked in #532. Reworded both to match the code: this
  follows READONLY's precedent, whether the precedent's diagnosis holds is
  open (and empirically doubtful -- HELLO already flushes fine via the
  plain path on the same connection type), bufferevent_write is safe
  either way.
- #531 ordering and the test-infra-scope nitpick are answered in the PR
  thread: I don't have authority to merge #531 myself (branch protection
  requires a review, and self-approving my own PR isn't something to do
  unilaterally) -- that one now needs an actual human maintainer action,
  not another review round.

Verified locally: the OSS_CLUSTER=1 OSS_CLUSTER_REPLICAS=1 scenario
end-to-end again after removing env_started_with_slaves() (plain pass
skips, replicas pass 2/2) -- confirms the consolidated warning-path signal
didn't regress anything. Rebuilt clean, format-check clean.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
fcostaoliveira added a commit that referenced this pull request Aug 28, 2026
…op redundant import, trim caller-list and #532 comments further

- test_client_no_touch_resent_after_reconnect: replaced the fixed 2.0s
  sleep before the kill step with a poll on the already-populated
  `results` list for the first CLIENT NO-TOUCH ON to show up (bounded,
  15s). Same class of fix as round 30's MONITOR-registration poll: this
  file has no TEST: pin in the asan.yml/tsan.yml/ubsan.yml OSS_STANDALONE
  plaintext cells, where a 2s startup budget is the tightest -- a fixed
  sleep firing before memtier connects left `new_ids` empty, a hard assert
  with no retry.
- Dropped the redundant function-local `import os` in
  get_cluster_replica_connections() -- os is already imported at module
  scope, unlike the sys/redis imports next to it which genuinely aren't.
- get_redis_conn_for_node()'s docstring no longer enumerates its callers
  by name -- it was already stale inside this same PR
  (test_client_no_touch.py calls it directly too, not just through
  test_mget_protocol.py's wrapper) and will just go stale again next time
  another test picks it up.
- Trimmed the CLIENT NO-TOUCH block's comment in send_conn_setup_commands()
  further, per round 30's own ask: kept "follows READONLY's precedent,
  whether that precedent holds is open -- see #532 -- bufferevent_write is
  safe either way" and the ordering-consistency sentence, dropped the rest.

#531 ordering: same answer as last round -- open, green, needs a human
maintainer to actually merge it, not another review pass.

Verified locally: test_client_no_touch.py 4/4 (poll-based kill wait),
dedicated replica cell 2/2 (import cleanup didn't regress the warning
path). Rebuilt clean, format-check clean.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
fcostaoliveira added a commit that referenced this pull request Aug 28, 2026
…plica-expected signals, older-server help clause

- Lifted _wait_for_monitor_registered()/_client_list() out of
  test_client_no_touch.py into include.py (client_list()/
  wait_for_monitor_registered()) and switched test_client_no_touch_cluster.py's
  _run_and_check_no_touch() from a flat time.sleep(0.15) to the same poll.
  That file is collected by the asan/tsan/ubsan cluster cells -- the
  slowest runners, where a missed MONITOR attach costs a red build. Needed
  its own control connection to the specific node being monitored (CLIENT
  LIST is per-server) built via get_redis_conn_for_node() from conn's
  host/port -- first attempt at this used
  redis.Redis(**conn.connection_pool.connection_kwargs), which blows up
  with "unexpected keyword argument 'himport_registry'" since
  ConnectionPool.connection_kwargs carries internal bookkeeping keys, not
  just constructor args; caught locally before push by re-running the
  OSS_CLUSTER=1 OSS_CLUSTER_REPLICAS=1 scenario end-to-end.
- get_cluster_replica_connections()'s and test_client_no_touch_cluster.py's
  hard-fail gate now both call a shared replicas_expected()
  (tests/include.py), which ORs MEMTIER_CLUSTER_REPLICAS_EXPECTED with the
  sys.argv --use-slaves check instead of relying on the env var alone --
  round 30 fully removed the argv fallback, which meant invoking RLTest
  directly with --use-slaves (bypassing run_tests.sh) silently degraded
  the hard-fail to a skip. One shared signal instead of duplicating the
  OR in two places.
- --help/man page: added "the connection fails loudly rather than
  silently running with the flag doing nothing" for what happens against
  a pre-7.2 or rejecting server.

#531 ordering and the README/#462 scope nitpick: same answers as prior
rounds, nothing new to add.

Verified locally: test_client_no_touch.py 4/4, and (after finding and
fixing the connection_kwargs bug) the OSS_CLUSTER=1 OSS_CLUSTER_REPLICAS=1
scenario end-to-end -- plain pass 2/2 (pass + skip), replicas pass 2/2
(pass + pass). Rebuilt clean, format-check clean.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@fcostaoliveira
fcostaoliveira merged commit 0333be0 into master Oct 12, 2026
119 of 120 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.

1 participant