Skip to content

Commit

Permalink
Revert "Bump opensearch-benchmark docker version to 1.9.0 (#5011)"
Browse files Browse the repository at this point in the history
This reverts commit e6ff476.
  • Loading branch information
rishabh6788 authored Sep 11, 2024
1 parent e6ff476 commit a244b91
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_run_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand All @@ -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')
Expand All @@ -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"}\' '
Expand All @@ -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"}\' '
Expand All @@ -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"}\' '
Expand All @@ -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"}\' '
Expand All @@ -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"}\' '
Expand All @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ')
Expand 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 ')
Expand Down

0 comments on commit a244b91

Please sign in to comment.