From a244b916f0c136235e43181dfd58a3287889553f Mon Sep 17 00:00:00 2001 From: Rishabh Singh Date: Tue, 10 Sep 2024 18:09:10 -0700 Subject: [PATCH] Revert "Bump opensearch-benchmark docker version to 1.9.0 (#5011)" This reverts commit e6ff4761c60de20fcd882cfbeb105230220518a3. --- .../benchmark_test_suite_compare.py | 2 +- .../benchmark_test_suite_execute.py | 2 +- tests/test_run_compare.py | 2 +- .../test_benchmark_test_suite.py | 18 +++++++++--------- .../test_benchmark_test_suite_compare.py | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/test_workflow/benchmark_test/benchmark_test_suite_compare.py b/src/test_workflow/benchmark_test/benchmark_test_suite_compare.py index c20fc367e2..ea8cd27049 100644 --- a/src/test_workflow/benchmark_test/benchmark_test_suite_compare.py +++ b/src/test_workflow/benchmark_test/benchmark_test_suite_compare.py @@ -30,7 +30,7 @@ def form_command(self) -> str: self.command = f'docker run --name docker-container-{self.args.stack_suffix} ' if self.args.benchmark_config: self.command += f" -v {self.args.benchmark_config}:/opensearch-benchmark/.benchmark/benchmark.ini " - self.command += f"opensearchproject/opensearch-benchmark:1.9.0 " \ + self.command += f"opensearchproject/opensearch-benchmark:1.6.0 " \ f"compare --baseline={self.args.baseline} --contender={self.args.contender} " if self.args.results_format: diff --git a/src/test_workflow/benchmark_test/benchmark_test_suite_execute.py b/src/test_workflow/benchmark_test/benchmark_test_suite_execute.py index d68e537b67..11f0d33be9 100644 --- a/src/test_workflow/benchmark_test/benchmark_test_suite_execute.py +++ b/src/test_workflow/benchmark_test/benchmark_test_suite_execute.py @@ -39,7 +39,7 @@ def form_command(self) -> str: self.command = f'docker run --name docker-container-{self.args.stack_suffix}' if self.args.benchmark_config: self.command += f" -v {self.args.benchmark_config}:/opensearch-benchmark/.benchmark/benchmark.ini" - self.command += f" opensearchproject/opensearch-benchmark:1.9.0 execute-test --workload={self.args.workload} " \ + self.command += f" opensearchproject/opensearch-benchmark:1.6.0 execute-test --workload={self.args.workload} " \ f"--pipeline=benchmark-only --target-hosts={self.endpoint}" if self.args.workload_params: diff --git a/tests/test_run_compare.py b/tests/test_run_compare.py index d54bc5c8f6..6bae1a2741 100644 --- a/tests/test_run_compare.py +++ b/tests/test_run_compare.py @@ -111,7 +111,7 @@ def test_form_compare_command(self, *mocks: Any) -> None: # define the expected command expected_command = ( f"docker run --name docker-container-{args.stack_suffix} " - "opensearchproject/opensearch-benchmark:1.9.0 " + "opensearchproject/opensearch-benchmark:1.6.0 " "compare --baseline=12345 --contender=54321 " "--results-format=markdown " "--results-numbers-align=right " diff --git a/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite.py b/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite.py index 64c2e136fa..ce78bd548b 100644 --- a/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite.py +++ b/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite.py @@ -48,7 +48,7 @@ def test_execute_default(self, mock_check_call: Mock) -> None: test_suite.execute() self.assertEqual(mock_check_call.call_count, 2) self.assertEqual(test_suite.command, - f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.9.0 execute-test ' + f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.6.0 execute-test ' f'--workload=nyc_taxis --pipeline=benchmark-only --target-hosts=abc.com:80 --client-options="timeout:300" --results-file=final_result.md') @patch('test_workflow.benchmark_test.benchmark_test_suite_execute.subprocess.check_call') @@ -62,7 +62,7 @@ def test_execute_security_enabled_version_212_or_greater(self, mock_convert: Moc mock_check_call.assert_called_with( f"docker rm -f docker-container-{test_suite.args.stack_suffix}", cwd=os.getcwd(), shell=True) self.assertEqual(test_suite.command, - f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.9.0 execute-test' + f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.6.0 execute-test' f' --workload=nyc_taxis --pipeline=benchmark-only ' f'--target-hosts=abc.com:443 ' f'--client-options="timeout:300,use_ssl:true,verify_certs:false,basic_auth_user:\'admin\',basic_auth_password:\'myStrongPassword123!\'" --results-file=final_result.md') @@ -78,7 +78,7 @@ def test_execute_security_enabled(self, mock_convert: Mock, mock_check_call: Moc mock_check_call.assert_called_with( f"docker rm -f docker-container-{test_suite.args.stack_suffix}", cwd=os.getcwd(), shell=True) self.assertEqual(test_suite.command, - f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.9.0 execute-test ' + f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.6.0 execute-test ' '--workload=nyc_taxis --pipeline=benchmark-only ' '--target-hosts=abc.com:443 --client-options="timeout:300,use_ssl:true,' 'verify_certs:false,basic_auth_user:\'admin\',basic_auth_password:\'admin\'" --results-file=final_result.md') @@ -100,7 +100,7 @@ def test_execute_default_with_optional_args(self, mock_convert: Mock, mock_check self.assertEqual(test_suite.command, f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:' '/opensearch-benchmark/.benchmark/benchmark.ini ' - 'opensearchproject/opensearch-benchmark:1.9.0 execute-test ' + 'opensearchproject/opensearch-benchmark:1.6.0 execute-test ' '--workload=nyc_taxis ' '--pipeline=benchmark-only --target-hosts=abc.com:80 ' '--workload-params \'{"number_of_replicas":"1"}\' ' @@ -121,7 +121,7 @@ def test_execute_default_with_no_telemetry_params(self, mock_convert: Mock, mock self.assertEqual(test_suite.command, f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:' '/opensearch-benchmark/.benchmark/benchmark.ini ' - 'opensearchproject/opensearch-benchmark:1.9.0 execute-test ' + 'opensearchproject/opensearch-benchmark:1.6.0 execute-test ' '--workload=nyc_taxis ' '--pipeline=benchmark-only --target-hosts=abc.com:80 ' '--workload-params \'{"number_of_replicas":"1"}\' ' @@ -143,7 +143,7 @@ def test_execute_with_test_procedure_params(self, mock_convert: Mock, mock_check self.assertEqual(test_suite.command, f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:' '/opensearch-benchmark/.benchmark/benchmark.ini ' - 'opensearchproject/opensearch-benchmark:1.9.0 execute-test ' + 'opensearchproject/opensearch-benchmark:1.6.0 execute-test ' '--workload=nyc_taxis ' '--pipeline=benchmark-only --target-hosts=abc.com:80 ' '--workload-params \'{"number_of_replicas":"1"}\' ' @@ -167,7 +167,7 @@ def test_execute_with_include_exclude_params(self, mock_convert: Mock, mock_chec self.assertEqual(test_suite.command, f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:' '/opensearch-benchmark/.benchmark/benchmark.ini ' - 'opensearchproject/opensearch-benchmark:1.9.0 execute-test ' + 'opensearchproject/opensearch-benchmark:1.6.0 execute-test ' '--workload=nyc_taxis ' '--pipeline=benchmark-only --target-hosts=abc.com:80 ' '--workload-params \'{"number_of_replicas":"1"}\' ' @@ -190,7 +190,7 @@ def test_execute_with_all_benchmark_optional_params(self, mock_convert: Mock) -> f"docker rm -f docker-container-{test_suite.args.stack_suffix}", cwd=os.getcwd(), shell=True) self.assertEqual(test_suite.command, f'docker run --name docker-container-{test_suite.args.stack_suffix} -v /home/test/benchmark.ini:' '/opensearch-benchmark/.benchmark/benchmark.ini ' - 'opensearchproject/opensearch-benchmark:1.9.0 execute-test ' + 'opensearchproject/opensearch-benchmark:1.6.0 execute-test ' '--workload=nyc_taxis ' '--pipeline=benchmark-only --target-hosts=abc.com:80 ' '--workload-params \'{"number_of_replicas":"1"}\' ' @@ -213,7 +213,7 @@ def test_execute_cluster_endpoint(self, mock_convert: Mock, mock_check_call: Moc mock_check_call.assert_called_with( f"docker rm -f docker-container-{test_suite.args.stack_suffix}", cwd=os.getcwd(), shell=True) self.assertEqual(test_suite.command, - f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.9.0 execute-test ' + f'docker run --name docker-container-{test_suite.args.stack_suffix} opensearchproject/opensearch-benchmark:1.6.0 execute-test ' '--workload=nyc_taxis --pipeline=benchmark-only ' '--target-hosts=abc.com:443 --client-options="timeout:300,use_ssl:true,' 'verify_certs:false,basic_auth_user:\'admin\',basic_auth_password:\'admin\'" --results-file=final_result.md') diff --git a/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite_compare.py b/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite_compare.py index c51be7eac2..afa8d995f4 100644 --- a/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite_compare.py +++ b/tests/tests_test_workflow/test_benchmark_workflow/benchmark_test/test_benchmark_test_suite_compare.py @@ -34,7 +34,7 @@ def test_execute(self, mock_cleanup: Mock, mock_copy_results: Mock, mock_check_c mock_check_call.assert_called_once() self.assertEqual(compare.command, 'docker run --name docker-container-test-suffix ' - 'opensearchproject/opensearch-benchmark:1.9.0 compare ' + 'opensearchproject/opensearch-benchmark:1.6.0 compare ' '--baseline=baseline-id --contender=contender-id --results-format=markdown ' '--results-numbers-align=right --results-file=final_result.md ' '--show-in-results=all ') @@ -51,7 +51,7 @@ def test_execute_with_benchmark_config(self, mock_cleanup: Mock, mock_copy_resul mock_check_call.assert_called_once() self.assertEqual(compare.command, 'docker run --name docker-container-test-suffix -v ' '/some/path/benchmark.ini:/opensearch-benchmark/.benchmark/benchmark.ini ' - 'opensearchproject/opensearch-benchmark:1.9.0 compare ' + 'opensearchproject/opensearch-benchmark:1.6.0 compare ' '--baseline=baseline-id --contender=contender-id --results-format=markdown ' '--results-numbers-align=right --results-file=final_result.md ' '--show-in-results=all ')