Skip to content

Add topology filter to runners.py #285

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

Merged
merged 4 commits into from
May 9, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,10 @@ def create_self_contained_coordinator_args(project_name):
default=100000,
help="Run a subset of the tests based uppon a preset priority. By default runs all tests.",
)
parser.add_argument(
"--topology",
type=str,
default="",
help="Filter tests to run only with the specified topology (e.g. oss-standalone)",
)
return parser
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,13 @@ def self_contained_coordinator_blocking_read(
if len(newTestInfo[0]) < 2 or len(newTestInfo[0][1]) < 1:
stream_id = ">"
else:
# Create args object with topology parameter
class Args:
def __init__(self):
self.topology = ""

args = Args()

(
stream_id,
overall_result,
Expand Down Expand Up @@ -406,6 +413,7 @@ def self_contained_coordinator_blocking_read(
default_metrics_str,
docker_keep_env,
restore_build_artifacts_default,
args,
)
num_process_streams = num_process_streams + 1
num_process_test_suites = num_process_test_suites + total_test_suite_runs
Expand Down Expand Up @@ -486,6 +494,7 @@ def process_self_contained_coordinator_stream(
default_metrics_str="ALL_STATS.Totals.Ops/sec",
docker_keep_env=False,
restore_build_artifacts_default=True,
args=None,
):
stream_id = "n/a"
overall_result = False
Expand Down Expand Up @@ -772,6 +781,18 @@ def process_self_contained_coordinator_stream(
for topology_spec_name in benchmark_config["redis-topologies"]:
setup_name = topology_spec_name
setup_type = "oss-standalone"

# Filter by topology if specified
if (
args is not None
and args.topology
and topology_spec_name != args.topology
):
logging.info(
f"Skipping topology {topology_spec_name} as it doesn't match the requested topology {args.topology}"
)
continue

if topology_spec_name in topologies_map:
topology_spec = topologies_map[topology_spec_name]
setup_type = topology_spec["type"]
Expand Down