Skip to content

fix(containerfile): add --locked flag to cargo binstall calls for cargo-nextest#1850

Merged
josecelano merged 2 commits into
torrust:developfrom
josecelano:fix/containerfile-cargo-nextest-locked
Jun 1, 2026
Merged

fix(containerfile): add --locked flag to cargo binstall calls for cargo-nextest#1850
josecelano merged 2 commits into
torrust:developfrom
josecelano:fix/containerfile-cargo-nextest-locked

Conversation

@josecelano
Copy link
Copy Markdown
Member

Problem

The Container workflow started failing after the last merged PR with:

error: Nextest does not support being installed without --locked. To install nextest from source, run:
       cargo install --locked cargo-nextest

cargo-nextest enforces installation with --locked at compile time via the locked-tripwire crate. When cargo-binstall cannot find a pre-built binary and falls back to source compilation, it calls cargo install without --locked, triggering this compile-time error.

Fix

Add --locked to both cargo binstall invocations in the Containerfile (the chef and tester image stages). This flag is forwarded by cargo-binstall to the underlying cargo install call when falling back to source compilation.

Changes

  • Containerfile: cargo binstall --no-confirmcargo binstall --no-confirm --locked (both occurrences)

…go-nextest

cargo-nextest requires --locked when built from source (enforced by the
locked-tripwire crate). When cargo-binstall falls back to source compilation
it calls 'cargo install' without --locked, triggering a compile-time error.

Passing --locked to cargo-binstall propagates the flag to the underlying
cargo install invocation, fixing the Container workflow build failure.
Copilot AI review requested due to automatic review settings June 1, 2026 10:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the failing container build by ensuring cargo-nextest can be installed even when cargo-binstall falls back to compiling from source, by forwarding --locked to the underlying cargo install invocation.

Changes:

  • Add --locked to the cargo binstall invocation in the chef stage (installing cargo-chef and cargo-nextest).
  • Add --locked to the cargo binstall invocation in the tester stage (installing cargo-nextest).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.80%. Comparing base (aaf4b42) to head (0baeaba).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1850      +/-   ##
===========================================
- Coverage    77.85%   77.80%   -0.05%     
===========================================
  Files          380      380              
  Lines        28647    28648       +1     
  Branches     28647    28648       +1     
===========================================
- Hits         22304    22291      -13     
- Misses        6036     6052      +16     
+ Partials       307      305       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano josecelano self-assigned this Jun 1, 2026
…rait impls

Four async trait impl functions in rw_lock_std_mutex_tokio.rs had no .await
expressions, triggering clippy::unused_async_trait_impl (-D clippy::pedantic).

Replace async fn with fn returning impl Future<Output = ...> + Send using
std::future::ready(), matching the trait signature and removing the unnecessary
async overhead.
@josecelano
Copy link
Copy Markdown
Member Author

ACK 0baeaba

@josecelano josecelano merged commit 9f67bad into torrust:develop Jun 1, 2026
13 checks passed
@josecelano josecelano deleted the fix/containerfile-cargo-nextest-locked branch June 1, 2026 12:26
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.

2 participants