Skip to content

Conversation

@mulkieran
Copy link
Member

@mulkieran mulkieran commented Dec 10, 2025

@mulkieran mulkieran self-assigned this Dec 10, 2025
@mulkieran mulkieran added this to the 0.5.4 milestone Dec 10, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 10, 2025

Walkthrough

The PR migrates tests from the external once_cell crate to Rust's standard library LazyLock. once_cell was removed from Cargo.toml dev-dependencies, and the static LOCK in tests/util/mod.rs was changed from Lazy<Arc<Mutex<()>>> to LazyLock<Arc<Mutex<()>>> with the constructor updated accordingly.

Changes

Cohort / File(s) Summary
Dependency Removal
Cargo.toml
Removed once_cell = "1.19.0" from [dev-dependencies].
LazyLock Migration
tests/util/mod.rs
Replaced once_cell::sync::Lazy import with std::sync::LazyLock; changed static LOCK type from Lazy<Arc<Mutex<()>>> to LazyLock<Arc<Mutex<()>>> and Lazy::new(...) to LazyLock::new(...).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Verify LazyLock usage is compatible with the project's Rust toolchain/stability (Rust 1.80+).
  • Search for any remaining once_cell references.

Poem

🐰 Once in a cell, I waited and hopped,
Now stdlib LazyLock took over the spot.
No extra crate to carry my load,
I guard tests along the rabbit road.
Cheers to small moves that lighten the code!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing once_cell::Lazy with std::sync::LazyLock, which is clearly reflected in both the Cargo.toml dependency removal and the code changes in tests/util/mod.rs.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ccd64ba and faaa504.

📒 Files selected for processing (2)
  • Cargo.toml (0 hunks)
  • tests/util/mod.rs (1 hunks)
💤 Files with no reviewable changes (1)
  • Cargo.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/util/mod.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: rpm-build:fedora-42-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-rawhide-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-41-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-43-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-41-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-43-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-42-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-rawhide-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-43-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-rawhide-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-42-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-41-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-43-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-rawhide-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-41-x86_64:copr_pull
  • GitHub Check: rpm-build:fedora-42-x86_64:copr_pull
  • GitHub Check: Check (aarch64-unknown-linux-gnu)
  • GitHub Check: Check (aarch64-linux-android)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo dnf install -y 'dnf*-command(copr)'
  • dnf copr enable packit/stratis-storage-loopdev-3-75-copr_pull
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Generally better to use the library standard facility rather than an
external crate where possible.

LazyLock was introduced in version 1.80.0 of the Rust standard library.

Signed-off-by: mulhern <amulhern@redhat.com>
@mulkieran mulkieran moved this to In Review in 2025December Dec 10, 2025
@mulkieran mulkieran merged commit db965ff into stratis-storage:master Dec 10, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in 2025December Dec 10, 2025
@mulkieran mulkieran deleted the issue_project_833 branch December 10, 2025 22:50
@mulkieran mulkieran moved this from Done to Done(1) in 2025December Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done(1)

Development

Successfully merging this pull request may close these issues.

1 participant