Skip to content

Commit

Permalink
MAX_ATTEMPTS is actually defined at the workflow level here
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Aug 21, 2024
1 parent f54ad69 commit 9bd139f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/scripts/rerunFlakyTests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const MAX_ATTEMPTS = 5;

// If any job fails with a step starting with these it'll be considered flaky
const CONSIDERED_STEP_PREFIXES = [
"Build", // Nuget.org sporadic issues
Expand Down Expand Up @@ -32,10 +30,6 @@ async function getFailedJobsForRun(github, context, workflowRunId, runAttempt) {
}

export async function rerunFlakyTests({ github, context }) {
if (context.payload.workflow_run.run_attempt >= MAX_ATTEMPTS) {
console.log(`Jobs have reached maximum attempt count of ${context.payload.workflow_run.run_attempt}, Will not re-run.`)
}

const failingJobs = await getFailedJobsForRun(
github,
context,
Expand Down

0 comments on commit 9bd139f

Please sign in to comment.