Slack CI bot: set default result for non-existing artifacts (#39499)

* Set default result for non-existing artifacts

* FMT

* Address review comments
This commit is contained in:
Ákos Hadnagy
2025-07-18 13:45:47 +02:00
committed by GitHub
parent 4ded9a4113
commit fb58377700

View File

@@ -1426,7 +1426,17 @@ if __name__ == "__main__":
if len(matrix_job_results) > 0: if len(matrix_job_results) > 0:
target_results = matrix_job_results target_results = matrix_job_results
else: else:
target_results = additional_results[job_to_test_map[job_name]] default_result = {
"failed": {"unclassified": 0, "single": 0, "multi": 0},
"success": 0,
"time_spent": "",
"error": False,
"failures": {},
"job_link": {},
}
key = job_to_test_map.get(job_name)
target_results = additional_results.get(key, default_result) if key is not None else default_result
# Make the format uniform between `model_results` and `additional_results[XXX]` # Make the format uniform between `model_results` and `additional_results[XXX]`
if "failures" in target_results: if "failures" in target_results: