Skip to content

feat: Add concept for DeviceCaps & BlockCaps#1201

Open
Xuanwo wants to merge 1 commit intomainfrom
xuanwo/object-cache-engine
Open

feat: Add concept for DeviceCaps & BlockCaps#1201
Xuanwo wants to merge 1 commit intomainfrom
xuanwo/object-cache-engine

Conversation

@Xuanwo
Copy link
Collaborator

@Xuanwo Xuanwo commented Nov 28, 2025

What's changed and what's your intention?

Please explain IN DETAIL what the changes are in this PR and why they are needed. :D

Part of #1200

This PR will be the base for #1200, which adds caps for different devices and verifies them.

Checklist

  • I have written the necessary rustdoc comments
  • I have added the necessary unit tests and integration tests
  • I have passed cargo x (or cargo x --fast instead if the old tests are not modified) in my local environment.

Related issues or PRs (optional)

#1200


This PR was primarily authored with Codex using GPT-5-Codex-MAX and then hand-reviewed by me. I AM responsible for every change made in this PR. I aimed to keep it aligned with our goals, though I may have missed minor issues. Please flag anything that feels off, I'll fix it quickly.

Signed-off-by: Xuanwo <github@xuanwo.io>
@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 58.82353% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
foyer-storage/src/io/device/partial.rs 0.00% 6 Missing ⚠️
foyer-storage/src/io/device/noop.rs 0.00% 4 Missing ⚠️
foyer-storage/src/io/device/file.rs 25.00% 3 Missing ⚠️
foyer-storage/src/io/device/combined.rs 90.90% 1 Missing ⚠️
Files with missing lines Coverage Δ
foyer-storage/src/engine/block/engine.rs 87.26% <100.00%> (+0.04%) ⬆️
foyer-storage/src/io/device/fs.rs 92.45% <100.00%> (+0.29%) ⬆️
foyer-storage/src/io/device/mod.rs 100.00% <100.00%> (ø)
foyer-storage/src/io/device/combined.rs 74.48% <90.90%> (+2.07%) ⬆️
foyer-storage/src/io/device/file.rs 66.03% <25.00%> (-1.61%) ⬇️
foyer-storage/src/io/device/noop.rs 11.11% <0.00%> (-0.76%) ⬇️
foyer-storage/src/io/device/partial.rs 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@MrCroxx MrCroxx left a comment

Choose a reason for hiding this comment

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

Hi, Xuanwo. Thank you for contribution.

I'm a bit confused about the relationship between BlockCaps and #1200. Maybe I didn't explain it clearly enough in #1200. The main purpose of #1200 is to add a method for the device/io engine (and if we consider introducing opendal, it might actually be needed at the io engine layer) to return the compatibility of the device. Then, the engine uses a compatibility check to determine whether the device/io engine can be used under this engine.

Could you please explain the relationship between this PR and #1200 if I misunderstand it?

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