From 9bde20b79268811612b2486d453b1e94be79d03e Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Sun, 21 Jun 2026 16:55:45 -0400 Subject: [PATCH] I am using the option name as the variable name everywhere to avoid magic mapping. --- solrorbit/benchmark.py | 10 +--------- solrorbit/test_run_orchestrator.py | 2 +- tests/test_execution_orchestrator_test.py | 6 +++--- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/solrorbit/benchmark.py b/solrorbit/benchmark.py index 24ea5ab4..c63a2afb 100644 --- a/solrorbit/benchmark.py +++ b/solrorbit/benchmark.py @@ -701,14 +701,6 @@ def add_workload_source(subparser): default=False, help="If any processes is running, it is going to kill them and allow solr-orbit to continue to run." ) - test_run_parser.add_argument( - "--allow-unsupported-user-managed", - action="store_true", - default=False, - help="Skip the SolrCloud mode requirement check and run against a user-managed " - "(non-cloud) target anyway (default: false). Use at your own risk; many operations only " - "work in SolrCloud mode." - ) test_run_parser.add_argument( "--latency-percentiles", help=f"A comma-separated list of percentiles to report for latency " @@ -1163,7 +1155,7 @@ def configure_test(arg_parser, args, cfg): "worker_coordinator", "worker_ips", opts.csv_to_list(args.worker_ips)) - cfg.add(config.Scope.applicationOverride, "solr", "allow.user.managed", args.allow_user_managed) + cfg.add(config.Scope.applicationOverride, "solr", "allow.unsupported.user.managed", args.allow_unsupported_user_managed) cfg.add(config.Scope.applicationOverride, "workload", "test.mode.enabled", args.test_mode) cfg.add(config.Scope.applicationOverride, "workload", "load.test.clients", int(args.load_test_qps)) if args.redline_test: diff --git a/solrorbit/test_run_orchestrator.py b/solrorbit/test_run_orchestrator.py index c579a744..891e53e7 100644 --- a/solrorbit/test_run_orchestrator.py +++ b/solrorbit/test_run_orchestrator.py @@ -381,7 +381,7 @@ def _check_cloud_mode(cfg): """Fail fast with a clear error if the target Solr cluster is not in SolrCloud mode.""" from solrorbit.client import SolrAdminClient, SolrClientError # local import to avoid circular - if cfg.opts("solr", "allow.user.managed", mandatory=False, default_value=False): + if cfg.opts("solr", "allow.unsupported.user.managed", mandatory=False, default_value=False): logging.getLogger(__name__).warning( "Skipping SolrCloud-mode requirement check (--allow-unsupported-user-managed). " "Some operations may fail if the target is not in SolrCloud mode." diff --git a/tests/test_execution_orchestrator_test.py b/tests/test_execution_orchestrator_test.py index 5c86a5e3..452d0d81 100644 --- a/tests/test_execution_orchestrator_test.py +++ b/tests/test_execution_orchestrator_test.py @@ -130,11 +130,11 @@ def test_runs_a_default_pipeline(benchmark_only_pipeline): benchmark_only_pipeline.target.assert_called_once_with(cfg) -def test_check_cloud_mode_skipped_when_allow_user_managed(): +def test_check_cloud_mode_skipped_when_allow_unsupported_user_managed(): # --allow-unsupported-user-managed must bypass the check entirely, without touching the network cfg = config.Config() cfg.add(config.Scope.benchmark, "client", "hosts", ["localhost:8983"]) - cfg.add(config.Scope.benchmark, "solr", "allow.user.managed", True) + cfg.add(config.Scope.benchmark, "solr", "allow.unsupported.user.managed", True) with mock.patch("solrorbit.client.SolrAdminClient") as admin_client: test_run_orchestrator._check_cloud_mode(cfg) @@ -145,7 +145,7 @@ def test_check_cloud_mode_skipped_when_allow_user_managed(): def test_check_cloud_mode_raises_for_standalone_solr(): cfg = config.Config() cfg.add(config.Scope.benchmark, "client", "hosts", opts.TargetHosts("localhost:8983")) - cfg.add(config.Scope.benchmark, "solr", "allow.user.managed", False) + cfg.add(config.Scope.benchmark, "solr", "allow.unsupported.user.managed", False) with mock.patch("solrorbit.client.SolrAdminClient") as admin_client: admin_client.return_value.is_cloud_mode.return_value = False