Closed bhavik-goplani closed 3 days ago
Attention: Patch coverage is 36.36364%
with 14 lines
in your changes missing coverage. Please review.
Project coverage is 75.61%. Comparing base (
e35b35a
) to head (038bca5
). Report is 108 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
crates/xlinectl/src/command/lock.rs | 36.36% | 14 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Sorry for the late response. I really appreciate your interest about Xline and the contribution you've made.
I've reviewd your code logic, it's natural and clear.
However, recently we did a major change about this xlinectl lock
command, you can refer to the #820.
In essence, the lock usage is changed from : client.lock_client().lock(req).await?;
to : let mut xutex = Xutex::new().await?; let xutex_guard = xutex.lock_unsafe().await?
So you may update your repo and make corresponding change, especially the :
pub(crate) async fn execute(client: &mut Client, matches: &ArgMatches) -> Result<()>
.
And for the test, we have a validation test in the: Xline/scripts/validation_test.sh
, you can add your test case here.
If you have any questions, feel free to ask.
@CrystalAnalyst Thanks for the feedback. I'll close this pull request and create a new PR after pulling the recent changes.
Please briefly answer these questions:
what problem are you trying to solve? (or if there's no problem, what's the motivation for this change?) https://github.com/xline-kv/Xline/issues/823
what changes does this pull request make? Added exec command support to xlinectl lock command. Updated the README with new examples for lock.
are there any non-obvious implications of these changes? (does it break compatibility with previous versions, etc) No
Additional comments: I'm not sure how to test the exec command args. I thought of two solutions: