feature(nemesis): Migrate extracted nemesis precheck guards - #15723
feature(nemesis): Migrate extracted nemesis precheck guards#15723pehala wants to merge 4 commits into
Conversation
4a02b5e to
fc20e1f
Compare
✅ Test Summary: PASSED✅ Precommit: PASSED
✅ Tests: PASSED
|
|
@claude review |
|
Claude finished @pehala's task in 2m 48s —— View job Code Review
The PR is a clean, well-scoped migration. The core logic is correct across all three modules. A few observations below — two worth addressing, one nit.
|
The SLA preconditions (sla param, Scylla Enterprise, authenticator,
prepare_write_cmd) are all static config/edition checks, so they were
re-evaluated on every nemesis cycle behind the expensive cluster health
check and target-node selection.
Move them into SlaMonkeyBase.precheck(), which the runner evaluates once
before the run loop. The prepare_write_cmd gate is guarded by the new
requires_prefilled_cs_data class attribute, set to False on
RemoveServiceLevelMonkey which operates on pre-defined roles instead.
The raise inside get_stress_params() is kept as an in-method safety net,
since skip_optional_stage("prepare_write") can skip the prepare load even
when the param is set.
Dynamic checks (tester.roles, remaining service-level slots) stay in
disrupt().
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
extra_network_interface is a test-config flag and the scylladb#6522 skip is a static issue gate, yet both were re-checked on every cycle after the cluster health check and node selection had already run. Move them into precheck(): RandomInterruptionNetworkMonkey and BlockNetworkMonkey return no reason on Kubernetes, where the Chaos Mesh path needs no secondary interface; StopStartInterfacesNetworkMonkey always requires it. RejectInterNodeNetworkMonkey reports the SkipPerIssues gate. install_traffic_control() stays in disrupt() — it installs a package on the target node, which is a mutating action rather than a static probe. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test_config.MULTI_REGION is fixed for the whole run, so the multi-dc skip belongs in precheck() where it is evaluated once and prunes the nemesis from the rotation. The prepare_phase_active check stays in disrupt(): it reflects live test state that changes as the prepare phase starts and ends. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…dary Phases 3 and 4 split the migration by skip category, but a single nemesis module holds guards of both categories, so no PR could ever complete one phase on its own. Split them by where the guard lives instead: Phase 3 covers the classes under sdcm/nemesis/monkey/ that already own their disruption logic, Phase 4 the guards still sitting in NemesisRunner.disrupt_* behind the thin wrappers. The Category 1/2/3 taxonomy keeps deciding which guards may move, it just no longer defines the phase boundary. Also correct the Phase 3 adaptation note: it classified get_cassandra_stress_write_cmds() as a Category 3 data-presence gate, read from the skip message rather than the code. The helper only reads the prepare_write_cmd config param and never touches the cluster, so it is Category 1. Phase 3 is complete with this PR, so mark it done in the plan, the PR history and progress.json (4 of 5 phases). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
fc20e1f to
201bfde
Compare
Migrate extracted nemesis into using precheck.
Testing
PR pre-checks (self review)
backportlabels