From 03d03914fef6624e8aa4d884fa5c0ff2880d056d Mon Sep 17 00:00:00 2001 From: Divya Madala Date: Thu, 27 Jun 2024 09:21:09 -0700 Subject: [PATCH] Archive .json Signed-off-by: Divya Madala --- jenkins/opensearch/benchmark-test-endpoint.jenkinsfile | 4 ++-- src/test_workflow/benchmark_test/benchmark_create_cluster.py | 2 +- src/test_workflow/benchmark_test/benchmark_test_suite.py | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jenkins/opensearch/benchmark-test-endpoint.jenkinsfile b/jenkins/opensearch/benchmark-test-endpoint.jenkinsfile index 9631f0acda..2e5bc3c4c5 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*.csv', name: "benchmark" + stash includes: 'test_execution*.*', name: "benchmark" } } post { always { unstash "benchmark" - archiveArtifacts artifacts: 'test_execution*.csv' + archiveArtifacts artifacts: 'test_execution*.*' postCleanup() } } diff --git a/src/test_workflow/benchmark_test/benchmark_create_cluster.py b/src/test_workflow/benchmark_test/benchmark_create_cluster.py index 969334c999..a49ff792cf 100644 --- a/src/test_workflow/benchmark_test/benchmark_create_cluster.py +++ b/src/test_workflow/benchmark_test/benchmark_create_cluster.py @@ -60,7 +60,7 @@ def __init__( else: params_list.append(f" -c {key}={value}") role_params = ( - f" --require-approval=never" + " --require-approval=never" ) self.params = "".join(params_list) + role_params self.password = None if self.args.insecure else get_password(self.args.distribution_version) diff --git a/src/test_workflow/benchmark_test/benchmark_test_suite.py b/src/test_workflow/benchmark_test/benchmark_test_suite.py index 7b95d52e33..ca86e44c17 100644 --- a/src/test_workflow/benchmark_test/benchmark_test_suite.py +++ b/src/test_workflow/benchmark_test/benchmark_test_suite.py @@ -92,6 +92,7 @@ def convert(self) -> None: with TemporaryDirectory() as work_dir: subprocess.check_call(f"docker cp docker-container-{self.args.stack_suffix}:opensearch-benchmark/. {str(work_dir.path)}", cwd=os.getcwd(), shell=True) file_path = glob.glob(os.path.join(str(work_dir.path), "test_executions", "*", "test_execution.json")) + shutil.copy(file_path[0], os.path.join(os.getcwd(), f"test_execution._{self.args.stack_suffix}.json")) with open(file_path[0]) as file: data = json.load(file) formatted_data = pd.json_normalize(data["results"]["op_metrics"])