Skip to content

Conversation

chlins
Copy link
Member

@chlins chlins commented Sep 8, 2025

This pull request introduces significant enhancements to the dragonfly-client-util crate, focusing on expanding its functionality and improving error handling. The main changes include the addition of new modules (request and selector), a comprehensive error handling system for request operations, and several new dependencies to support these features.

New modules and error handling:

  • Added new modules: request and selector to dragonfly-client-util/src/lib.rs, laying the groundwork for extended request handling and selection logic.
  • Introduced a robust error handling system in dragonfly-client-util/src/request/errors.rs, including a new Error enum and detailed error types (BackendError, ProxyError, DfdaemonError) for distinguishing between different failure scenarios in client operations.

Dependency updates:

  • Added several new dependencies to Cargo.toml (such as tonic, reqwest-middleware, futures, thiserror, bytes, protobuf, hashring, tonic-health, local-ip-address, hostname, dashmap, and new dev-dependencies for testing/mocking), enabling gRPC support, advanced HTTP handling, error management, and improved testing capabilities.
  • Moved the reqwest dependency from the main [dependencies] section to the workspace-managed section for better dependency management.

Description

Related Issue

Motivation and Context

Screenshots (if appropriate)

@chlins chlins added the enhancement New feature or request label Sep 8, 2025
@chlins chlins added this to the v2.4.0 milestone Sep 8, 2025
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

❌ Patch coverage is 95.20000% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.58%. Comparing base (8ff694f) to head (72e8a85).

Files with missing lines Patch % Lines
dragonfly-client-util/src/request/mod.rs 95.89% 26 Missing ⚠️
dragonfly-client-util/src/selector/mod.rs 94.53% 13 Missing ⚠️
dragonfly-client-util/src/request/errors.rs 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1333      +/-   ##
==========================================
+ Coverage   46.90%   49.58%   +2.67%     
==========================================
  Files          60       63       +3     
  Lines       15061    15936     +875     
==========================================
+ Hits         7065     7902     +837     
- Misses       7996     8034      +38     
Files with missing lines Coverage Δ
dragonfly-client-util/src/request/errors.rs 0.00% <0.00%> (ø)
dragonfly-client-util/src/selector/mod.rs 94.53% <94.53%> (ø)
dragonfly-client-util/src/request/mod.rs 95.89% <95.89%> (ø)

... and 2 files with indirect coverage changes

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

@chlins chlins force-pushed the feat/request-sdk branch 3 times, most recently from 13c5c6d to 4cea5a6 Compare September 10, 2025 03:09
@chlins chlins changed the title [WIP] feat: add the request sdk in dragonfly-client-util feat: add the request sdk in dragonfly-client-util Sep 10, 2025
@chlins chlins force-pushed the feat/request-sdk branch 3 times, most recently from 453202b to 3ea6df6 Compare September 11, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants