diff --git a/.github/scripts/extract_benchmark_results.py b/.github/scripts/extract_benchmark_results.py index f0540edb2c4..bbfb4ba6015 100755 --- a/.github/scripts/extract_benchmark_results.py +++ b/.github/scripts/extract_benchmark_results.py @@ -341,6 +341,7 @@ def transform( benchmark_results: List, benchmark_config: Dict[str, str], job_name: str, + job_report: Any = {}, ) -> List: """ Transform the benchmark results into the format writable into the benchmark database @@ -361,6 +362,7 @@ def transform( # Just keep a copy of the benchmark config here "benchmark_config": json.dumps(benchmark_config), "job_conclusion": "SUCCESS", + "job_arn": job_report.get("arn", ""), }, }, "model": { @@ -446,6 +448,7 @@ def transform_failure_record( "app_type": app_type, "job_conclusion": result, "failure_type": level, + "job_arn": report.get("arn", ""), "job_report": json.dumps(report), }, }, @@ -512,6 +515,7 @@ def get_benchmark_config( def extract_benchmark_result_from_artifact( artifact: Dict[str, Any], benchmark_config: Dict[str, str], + job_report: Any, ) -> List[Any]: job_name = artifact.get("job_name", "") artifact_type = artifact.get("type", "") @@ -532,7 +536,9 @@ def extract_benchmark_result_from_artifact( ) if not benchmark_results: return [] - return transform(app_type, benchmark_results, benchmark_config, job_name) + return transform( + app_type, benchmark_results, benchmark_config, job_name, job_report + ) def get_app_type(type: str): @@ -674,7 +680,7 @@ def process_benchmark_results(content: Any, app: str, benchmark_configs: str): for job_artifact in job_artifacts: # generate result for each schema results = extract_benchmark_result_from_artifact( - job_artifact, benchmark_config + job_artifact, benchmark_config, job_report ) all_benchmark_results.extend(results) return all_benchmark_results