From a6cd3cfa8269a356d04476abbb78148fc6eeb628 Mon Sep 17 00:00:00 2001 From: Divya Madala Date: Tue, 7 May 2024 19:22:50 -0700 Subject: [PATCH] add requested changes Signed-off-by: Divya Madala --- jenkins/opensearch/benchmark-test-endpoint.jenkinsfile | 4 ++-- .../benchmark_test/benchmark_test_runner_opensearch.py | 2 +- src/test_workflow/benchmark_test/benchmark_test_suite.py | 4 ++-- .../benchmark-test-endpoint-insecure.jenkinsfile.txt | 4 ++-- .../opensearch/benchmark-test-endpoint-secure.jenkinsfile.txt | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/jenkins/opensearch/benchmark-test-endpoint.jenkinsfile b/jenkins/opensearch/benchmark-test-endpoint.jenkinsfile index 5ed0bcfaa3..9631f0acda 100644 --- a/jenkins/opensearch/benchmark-test-endpoint.jenkinsfile +++ b/jenkins/opensearch/benchmark-test-endpoint.jenkinsfile @@ -130,14 +130,14 @@ parameters { captureSegmentReplicationStat: CAPTURE_SEGMENT_REPLICATION_STAT, telemetryParams: TELEMETRY_PARAMS ) - stash includes: 'test_execution.*', name: "benchmark" + stash includes: 'test_execution*.csv', name: "benchmark" } } post { always { unstash "benchmark" - archiveArtifacts artifacts: 'test_execution.*' + archiveArtifacts artifacts: 'test_execution*.csv' postCleanup() } } diff --git a/src/test_workflow/benchmark_test/benchmark_test_runner_opensearch.py b/src/test_workflow/benchmark_test/benchmark_test_runner_opensearch.py index f8f1823655..5a7df886a1 100644 --- a/src/test_workflow/benchmark_test/benchmark_test_runner_opensearch.py +++ b/src/test_workflow/benchmark_test/benchmark_test_runner_opensearch.py @@ -57,6 +57,6 @@ def run_tests(self) -> None: with BenchmarkCreateCluster.create(self.args, self.test_manifest, config, current_workspace) as test_cluster: benchmark_test_suite = BenchmarkTestSuite(test_cluster.endpoint_with_port, self.security, self.args, test_cluster.fetch_password()) try: - benchmark_test_suite.execute() + retry_call(benchmark_test_suite.execute, tries=3, delay=60, backoff=2) finally: subprocess.check_call(f"docker rm docker-container-{self.args.stack_suffix}", cwd=os.getcwd(), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) diff --git a/src/test_workflow/benchmark_test/benchmark_test_suite.py b/src/test_workflow/benchmark_test/benchmark_test_suite.py index 9949e61ce8..371083b9be 100644 --- a/src/test_workflow/benchmark_test/benchmark_test_suite.py +++ b/src/test_workflow/benchmark_test/benchmark_test_suite.py @@ -91,8 +91,8 @@ def convert(self, results: str) -> None: with open(results) as file: data = json.load(file) formatted_data = pd.json_normalize(data["results"]["op_metrics"]) - formatted_data.to_csv(os.path.join(os.getcwd(), "test_execution.csv"), index=False) - df = pd.read_csv(os.path.join(os.getcwd(), "test_execution.csv")) + formatted_data.to_csv(os.path.join(os.getcwd(), f"test_execution_{self.args.stack_suffix}.csv"), index=False) + df = pd.read_csv(os.path.join(os.getcwd(), f"test_execution_{self.args.stack_suffix}.csv")) pd.set_option('display.width', int(2 * shutil.get_terminal_size().columns)) pd.set_option('display.max_rows', None) pd.set_option('display.max_columns', None) diff --git a/tests/jenkins/jenkinsjob-regression-files/opensearch/benchmark-test-endpoint-insecure.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/opensearch/benchmark-test-endpoint-insecure.jenkinsfile.txt index b289928efc..79874e3899 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch/benchmark-test-endpoint-insecure.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch/benchmark-test-endpoint-insecure.jenkinsfile.txt @@ -29,8 +29,8 @@ runBenchmarkTestScript.readFile({file=/tmp/workspace/benchmark.ini}) runBenchmarkTestScript.writeFile({file=/tmp/workspace/benchmark.ini, text=}) runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test --cluster-endpoint opensearch-ABCxdfdfhyfk.com --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:true --suffix 307 --test-procedure append-no-conflicts --telemetry-params '{"telemetry_setting":"value"}') - benchmark-test-endpoint.stash({includes=test_execution.*, name=benchmark}) + benchmark-test-endpoint.stash({includes=test_execution*.csv, name=benchmark}) benchmark-test-endpoint.unstash(benchmark) - benchmark-test-endpoint.archiveArtifacts({artifacts=test_execution.*}) + benchmark-test-endpoint.archiveArtifacts({artifacts=test_execution*.csv}) benchmark-test-endpoint.postCleanup() postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true}) diff --git a/tests/jenkins/jenkinsjob-regression-files/opensearch/benchmark-test-endpoint-secure.jenkinsfile.txt b/tests/jenkins/jenkinsjob-regression-files/opensearch/benchmark-test-endpoint-secure.jenkinsfile.txt index b289928efc..79874e3899 100644 --- a/tests/jenkins/jenkinsjob-regression-files/opensearch/benchmark-test-endpoint-secure.jenkinsfile.txt +++ b/tests/jenkins/jenkinsjob-regression-files/opensearch/benchmark-test-endpoint-secure.jenkinsfile.txt @@ -29,8 +29,8 @@ runBenchmarkTestScript.readFile({file=/tmp/workspace/benchmark.ini}) runBenchmarkTestScript.writeFile({file=/tmp/workspace/benchmark.ini, text=}) runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test --cluster-endpoint opensearch-ABCxdfdfhyfk.com --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:true --suffix 307 --test-procedure append-no-conflicts --telemetry-params '{"telemetry_setting":"value"}') - benchmark-test-endpoint.stash({includes=test_execution.*, name=benchmark}) + benchmark-test-endpoint.stash({includes=test_execution*.csv, name=benchmark}) benchmark-test-endpoint.unstash(benchmark) - benchmark-test-endpoint.archiveArtifacts({artifacts=test_execution.*}) + benchmark-test-endpoint.archiveArtifacts({artifacts=test_execution*.csv}) benchmark-test-endpoint.postCleanup() postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})