From 6fa32c3bdce31f22a42d5592f8c14d09f7b59f8f Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 17 Jun 2025 09:18:27 +0200 Subject: [PATCH] workflows/labels: skip old PRs without the right artifacts We don't need to handle the differently named artifacts in a special way, because they have been expired anyway. But, we must handle the case to not cause the job to fail. (cherry picked from commit 5343c50acdb8c7540e74243d7878e7110be076af) --- .github/workflows/labels.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 1eabb41ab558..a694f3b1c1ac 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -130,8 +130,10 @@ jobs: // Instead of checking the boolean artifact.expired, we will give us a minute to // actually download the artifact in the next step and avoid that race condition. + // Older PRs, where the workflow run was already eval.yml, but the artifact was not + // called "comparison", yet, will be skipped as well. log('Artifact expires at', artifact?.expires_at ?? '') - if (new Date(artifact.expires_at) < new Date(new Date().getTime() + 60 * 1000)) return; + if (new Date(artifact?.expires_at ?? 0) < new Date(new Date().getTime() + 60 * 1000)) return; await artifactClient.downloadArtifact(artifact.id, { findBy: {