Skip to content

AbstractListReporter.onMaxFailuresReached and GithubMdBuilder omit retry count for unfinished checks stopped by --max-failures #1565

Closed

Description

@shafiktanbir

Description

When running checkly test or checkly trigger with --max-failures and --retries, checks that have already completed one or more retry attempts (numRetries > 0) before the run is aborted early by --max-failures lose their retry count in AbstractListReporter (list / ci reporters) and GithubMdBuilder (github reporter).

Steps to Reproduce

  1. Run a suite with --max-failures 1 --retries 2 where Check A fails immediately and Check B fails its first attempt (incrementing entry.numRetries to 1) and is mid-retry when --max-failures is reached.
  2. Observe the NOT_FINISHED summary output in AbstractListReporter.onMaxFailuresReached (packages/cli/src/reporters/abstract-list.ts) and GithubMdBuilder.render (packages/cli/src/reporters/github.ts).

Root Cause

In commit 25ab41e8 (feat(test,trigger): add --max-failures to stop early after N failed checks), JsonBuilder (packages/cli/src/reporters/json.ts, line 118) records retries: numRetries for unfinished checks (!result).

However:

  1. AbstractListReporter.onMaxFailuresReached (packages/cli/src/reporters/abstract-list.ts, line 168) calls:
    lines.push('    ' + formatCheckTitle(CheckStatus.NOT_FINISHED, entry.check))
    without passing { includeSourceFile: false, retries: entry.numRetries } (unlike onCheckEnd on line 183, which passes { includeSourceFile: false, retries: checkStatus.numRetries }).
  2. GithubMdBuilder.render (packages/cli/src/reporters/github.ts, line 77) hardcodes '⏹️ Not finished' instead of appending the retry count when numRetries > 0.

Expected vs Actual Behavior

  • Expected: Unfinished checks that already retried before --max-failures stopped the run include their retry count (e.g., ⏹ Retrying Check (1 retry) / ⏹️ Not finished (1 retry)), consistent with onCheckEnd and JsonBuilder.
  • Actual: The retry count is omitted for NOT_FINISHED checks in AbstractListReporter and GithubMdBuilder.

Visual Proof

checkly-cli --max-failures retry count proof

Environment

  • checkly-cli version: 7.2.0 (main branch at 25ab41e8)
  • Node.js version: v22.14.0
  • OS: Ubuntu 24.04 LTS (Linux x86_64)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions