Skip to content

CI: macOS runner intermittently fails on brew install qpdf during R setup #1565

@weiconghe

Description

@weiconghe

Description

The macOS CI job (Tests on macos-latest) intermittently fails during the r-lib/actions/setup-r@v2 step with the following error:

##[error]Failed to get R 4.4.2: Failed to get R 4.4.2: Failed to install qpdf: Error: The process /opt/homebrew/bin/brew failed with exit code 1

The failure occurs before any project code runs — it happens during environment setup (installing R 4.4.2 via setup-r, which depends on qpdf).

Evidence

  • Failed run: PR #1560 macOS jobbrew install qpdf failed, 10m53s, conclusion: failure
  • Successful run (same commit on main): PR #1537 macOS job — all 3 platforms passed ~12 hours earlier

This indicates the failure is intermittent and depends on the macOS runner environment state at the time of the run, not on code changes.

Impact

  • PRs from fork contributors may get blocked by a failing macOS check that is unrelated to their changes
  • Ubuntu jobs may be cancelled as a side effect (GitHub Actions cancels remaining jobs when one fails), wasting runner minutes

Possible mitigation

  • Add continue-on-error: true to the R setup step, or wrap it with a retry
  • Alternatively, check if R/qpdf is actually needed for the test suite; if not, the step could be made conditional
  • Rerunning the failed job usually succeeds

Environment

  • Runner: macos-15-arm64
  • Image version: 20260527.0100.1
  • Step: r-lib/actions/setup-r@v2 with r-version: 4.4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions