From c5987590b56ec836a03f2294d0dd1af19adf9210 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 16 Aug 2024 22:44:29 -0400 Subject: [PATCH] Be more lenient on flaky test failure --- .github/workflows/scripts/rerunFlakyTests.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scripts/rerunFlakyTests.js b/.github/workflows/scripts/rerunFlakyTests.js index 5bacef1278..589d6d85c9 100644 --- a/.github/workflows/scripts/rerunFlakyTests.js +++ b/.github/workflows/scripts/rerunFlakyTests.js @@ -31,8 +31,8 @@ export async function rerunFlakyTests({ github, context }) { context.payload.workflow_run.run_attempt ); - if (failingJobs.length > 1) { - console.log("Multiple jobs failing. PROBABLY not flaky, not rerunning."); + if (failingJobs.length > 3) { + console.log("Many jobs failing. PROBABLY not flaky, not rerunning."); return; } @@ -40,8 +40,8 @@ export async function rerunFlakyTests({ github, context }) { console.log(`Failing job: ${job.name}`) return CONSIDERED_JOBS.some((title) => job.name.startsWith(title)); }); - if (filteredFailingJobs.length === 0) { - console.log("Failing jobs are NOT designated flaky. Not rerunning."); + if (filteredFailingJobs.length !== failingJobs.length) { + console.log("One or more failing jobs are NOT designated flaky. Not rerunning."); return; }