Skip to content

feat(checks-rs): make the cargo-tarpaulin install optional - #126

Merged
jleni merged 1 commit into
mainfrom
feat/optional-tarpaulin-install
Aug 12, 2026
Merged

feat(checks-rs): make the cargo-tarpaulin install optional#126
jleni merged 1 commit into
mainfrom
feat/optional-tarpaulin-install

Conversation

@jleni

@jleni jleni commented Aug 12, 2026

Copy link
Copy Markdown
Member

Value

  • Removes the least reliable step in the Rust job for consumers that don't use tarpaulin. On Zondax's shared macOS runners this download has failed three times in one day, killing the job before a single test ran.
  • Backward compatible by defaultinstall_tarpaulin defaults to true, so every existing consumer behaves exactly as today. Only a repo that opts out changes.
  • Saves a download + install on every Rust job for opted-out repos (both platforms, every push and PR).

Technical

  • The step is currently gated on enable_coverage alone:

    - name: Install cargo-tarpaulin for coverage
      if: inputs.enable_coverage

    That is correct for consumers on the default coverage_command (cargo tarpaulin --all-features --out Json --output-dir .), and pure overhead for anyone who overrides it with a different engine.

  • Concrete case. kunobi-frontend made cargo-llvm-cov its primary engine in 2026-07 and supplies it via mise.toml; its coverage_command runs a dual-engine dispatcher that logs run-rust-coverage: auto-selected engine 'llvm'. Tarpaulin is downloaded on every Rust job and never invoked.

  • Why it matters beyond the wasted minute. The same step is a recurring hard failure on the shared mac runners, in two forms:

    mv: rename cargo-tarpaulin to /Users/zondax-ci/.cargo/bin/cargo-tarpaulin: No such file or directory
    sha256sum: *tmp: No such file or directory
    

    Both kill the job during setup. Roughly a coin flip per macOS job recently.

  • Adds install_tarpaulin (boolean, default true) and changes the condition to inputs.enable_coverage && inputs.install_tarpaulin. No other behaviour changes; validated that the workflow YAML still parses and the input is declared as expected.

Follow-up: once this lands and v12 is re-pointed, kunobi-frontend sets install_tarpaulin: false on its two _checks-rs jobs. Per the pin policy this is an additive, non-breaking input, so moving the floating major is appropriate — but consumers pinned to v12.0.0 are unaffected either way.

The step installs cargo-tarpaulin whenever enable_coverage is set, which is
right for consumers on the default coverage_command (`cargo tarpaulin ...`)
and wasted work for anyone who overrides it with another engine.

kunobi-frontend moved to cargo-llvm-cov as its primary engine in 2026-07 and
supplies llvm-cov through mise, so its coverage run logs "auto-selected
engine 'llvm'" and never invokes tarpaulin — but every Rust job still
downloads it. On the shared macOS runners that download is also the least
reliable step in the job: it has failed three times in a day, alternating
between "mv: rename cargo-tarpaulin to $CARGO_HOME/bin/...: No such file or
directory" and "sha256sum: *tmp: No such file or directory", killing the job
before a single test runs.

Add install_tarpaulin, defaulting to true so every existing consumer keeps
today's behaviour, and gate the step on it.
@jleni
jleni merged commit d607a51 into main Aug 12, 2026
1 check passed
@jleni
jleni deleted the feat/optional-tarpaulin-install branch August 12, 2026 11:06
jleni added a commit that referenced this pull request Aug 12, 2026
…#127)

#126 added install_tarpaulin defaulting to true, so every consumer that does
not use tarpaulin had to know to opt out. That is backwards: across both orgs
there are three consumers of this workflow, and none of them installs and
uses tarpaulin — the default was protecting a case with no occurrences.

Derive it from coverage_command instead, keeping an explicit override:

  if: enable_coverage && (force_tarpaulin_install || contains(coverage_command, 'tarpaulin'))

- Default coverage_command names tarpaulin, so a consumer on the default
  still gets it installed. A bare `default: false` would have broken them
  with "cargo tarpaulin: command not found".
- Consumers on another engine skip the download with no configuration.
- force_tarpaulin_install covers commands that reach tarpaulin indirectly
  (a make target, a wrapper script), where the string cannot be seen.

Renamed from install_tarpaulin to match the narrower meaning. The old name
shipped hours ago and has no consumers yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant