mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 21:06:50 +00:00
[CI] Detect step failures in metrics job (#122564)
This patch makes the metrics job also detect failures in individual steps. This is necessary now that we are setting continue-on-error in the premerge jobs to prevent sending out unnecessary email to detect what jobs actually fail.
This commit is contained in:
parent
4f4e2abb1a
commit
eabf9313d4
@ -80,6 +80,18 @@ def get_metrics(github_repo: github.Repository, workflows_to_track: dict[str, in
|
||||
completed_at = workflow_jobs[0].completed_at
|
||||
|
||||
job_result = int(workflow_jobs[0].conclusion == "success")
|
||||
if job_result:
|
||||
# We still might want to mark the job as a failure if one of the steps
|
||||
# failed. This is required due to use setting continue-on-error in
|
||||
# the premerge pipeline to prevent sending emails while we are
|
||||
# testing the infrastructure.
|
||||
# TODO(boomanaiden154): Remove this once the premerge pipeline is no
|
||||
# longer in a testing state and we can directly assert the workflow
|
||||
# result.
|
||||
for step in workflow_jobs[0].steps:
|
||||
if step.conclusion != "success":
|
||||
job_result = 0
|
||||
break
|
||||
|
||||
queue_time = started_at - created_at
|
||||
run_time = completed_at - started_at
|
||||
|
Loading…
x
Reference in New Issue
Block a user