From 197b72098874115c4e4bb6f14663dbea902a64ec Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 17 Nov 2025 22:49:30 +0000 Subject: [PATCH 1/2] [CI] Gracefully Fail when Job Completion Timestamp is None 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. --- .ci/metrics/metrics.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.ci/metrics/metrics.py b/.ci/metrics/metrics.py index a6d6edbd547e7..4e665adaca3ae 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( + "Workflow {} 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 From 4c0462761f3cd90ccaa65acf7909f5f6f6f9183b Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 17 Nov 2025 23:52:26 +0000 Subject: [PATCH 2/2] fix --- .ci/metrics/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/metrics/metrics.py b/.ci/metrics/metrics.py index 4e665adaca3ae..ac39a47d43c07 100644 --- a/.ci/metrics/metrics.py +++ b/.ci/metrics/metrics.py @@ -372,7 +372,7 @@ def github_get_metrics( if completed_at is None: logging.info( - "Workflow {} is marked completed but has a job without a " + f"Workflow {task.id} is marked completed but has a job without a " "completion timestamp." ) continue