chore: improve grpc-rs maintenance path#669
Conversation
|
Welcome @vip892766gma! It looks like this is your first PR to tikv/grpc-rs 🎉 |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
📝 WalkthroughWalkthroughError test coverage is reorganized and expanded. A unified test module replaces protobuf-specific tests, adding Display formatting validation for multiple Error variants and source() assertion for non-codec errors, while retaining the protobuf conversion test behind a feature gate. ChangesError test coverage expansion
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/error.rs (1)
121-132: ⚡ Quick winConsider adding source() assertion for consistency.
The other test functions verify that
source()returnsNonefor non-Codec errors. Consider adding similar assertions here for consistency:assert_eq!( err_some.to_string(), "RpcFinished(Some(RpcStatus { code: 1-CANCELLED, message: \"\", details: [], debug_error_string: \"\" }))" ); + assert!(err_none.source().is_none()); + assert!(err_some.source().is_none());🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/error.rs` around lines 121 - 132, Add a source() assertion to the test_rpc_finished_display test to mirror other tests: after constructing err_none and err_some (Error::RpcFinished(None) and Error::RpcFinished(Some(...))) call their source() and assert it is None. Update the test function test_rpc_finished_display to include these two assertions so both non-Codec RpcFinished variants explicitly verify source() returns None.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/error.rs`:
- Around line 121-132: Add a source() assertion to the test_rpc_finished_display
test to mirror other tests: after constructing err_none and err_some
(Error::RpcFinished(None) and Error::RpcFinished(Some(...))) call their source()
and assert it is None. Update the test function test_rpc_finished_display to
include these two assertions so both non-Codec RpcFinished variants explicitly
verify source() returns None.
Summary:
Notes:
Summary by CodeRabbit