[llvm] [CI] Gracefully Fail when Job Completion Timestamp is None (#168457) (PR #168543)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 06:28:20 PST 2025


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/168543

There seem to be cases where the workflow status is completed but the
jobs have not completed. We need to gracefully handle these changes to
avoid a crash loop in the metrics container.


>From e331867073ec3178f3fdd4dd82ecd0c3cdf76459 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Tue, 18 Nov 2025 14:28:07 +0000
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
 =?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.7
---
 .ci/metrics/metrics.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/.ci/metrics/metrics.py b/.ci/metrics/metrics.py
index a6d6edbd547e7..ac39a47d43c07 100644
--- a/.ci/metrics/metrics.py
+++ b/.ci/metrics/metrics.py
@@ -370,6 +370,13 @@ def github_get_metrics(
             started_at = job.started_at
             completed_at = job.completed_at
 
+            if completed_at is None:
+                logging.info(
+                    f"Workflow {task.id} is marked completed but has a job without a "
+                    "completion timestamp."
+                )
+                continue
+
             # GitHub API can return results where the started_at is slightly
             # later then the created_at (or completed earlier than started).
             # This would cause a -23h59mn delta, which will show up as +24h



More information about the llvm-commits mailing list