Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(client)!: Remove request wrappers - KvClient::put #882

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

lxl66566
Copy link
Collaborator

@lxl66566 lxl66566 commented Jul 11, 2024

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?)

  • what changes does this pull request make?

    • change function in clients/kv.rs from fn put(&self, request: PutRequest) to put(&self, key: impl Into<Vec<u8>>, value: impl Into<Vec<u8>>, option: Option<PutOptions>)
    • Renames types::PutRequest to types::PutOptions, made it an option for put function. The option will be combined with key and value to a xlineapi::PutRequest inside the KvClient.put() function.
      • If it gets a None, construct a default PutOptions instead.
    • TxnOp::put function has been changed as well.
  • are there any non-obvious implications of these changes? (does it break compatibility with previous versions, etc)

    • yes, it's a breaking change and changes all put() function thoughtout the crate.

@mergify mergify bot requested a review from a team July 11, 2024 10:16
Copy link

mergify bot commented Jul 11, 2024

@lxl66566 Convert your pr to draft since CI failed

@mergify mergify bot marked this pull request as draft July 11, 2024 10:17
@mergify mergify bot added the CI:fail CI has failed label Jul 11, 2024
@mergify mergify bot marked this pull request as ready for review July 11, 2024 11:31
@mergify mergify bot removed the CI:fail CI has failed label Jul 11, 2024
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

Attention: Patch coverage is 70.51793% with 74 lines in your changes missing coverage. Please review.

Project coverage is 75.71%. Comparing base (e35b35a) to head (1e3bc13).
Report is 152 commits behind head on master.

Files Patch % Lines
crates/xline-client/src/types/kv.rs 80.68% 28 Missing and 6 partials ⚠️
crates/xlinectl/src/command/txn.rs 0.00% 12 Missing ⚠️
crates/xline-client/src/clients/lock.rs 0.00% 11 Missing ⚠️
crates/xlinectl/src/command/put.rs 0.00% 8 Missing ⚠️
crates/benchmark/src/runner.rs 0.00% 5 Missing ⚠️
crates/benchmark/src/bench_client.rs 81.81% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #882      +/-   ##
==========================================
+ Coverage   75.55%   75.71%   +0.16%     
==========================================
  Files         180      189       +9     
  Lines       26938    28666    +1728     
  Branches    26938    28666    +1728     
==========================================
+ Hits        20353    21705    +1352     
- Misses       5366     5635     +269     
- Partials     1219     1326     +107     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lxl66566 lxl66566 changed the title refactor!: Remove request wrappers - kv.rs/KvClient::put refactor(client)!: Remove request wrappers - kv.rs/KvClient::put Jul 12, 2024
@lxl66566 lxl66566 force-pushed the refactor-client-put branch from 85d5154 to 9e6b057 Compare July 17, 2024 03:28
Copy link

mergify bot commented Jul 17, 2024

@lxl66566 Convert your pr to draft since CI failed

@mergify mergify bot marked this pull request as draft July 17, 2024 03:31
@mergify mergify bot added the CI:fail CI has failed label Jul 17, 2024
@lxl66566 lxl66566 force-pushed the refactor-client-put branch 2 times, most recently from 414a1dc to 8ba81e7 Compare July 17, 2024 04:35
@mergify mergify bot marked this pull request as ready for review July 17, 2024 04:45
@mergify mergify bot removed the CI:fail CI has failed label Jul 17, 2024
crates/xline-client/examples/kv.rs Outdated Show resolved Hide resolved
crates/xline-client/examples/lock.rs Outdated Show resolved Hide resolved
crates/xline-client/src/clients/kv.rs Outdated Show resolved Hide resolved
crates/xline-client/src/clients/kv.rs Outdated Show resolved Hide resolved
crates/xline-client/src/types/kv.rs Outdated Show resolved Hide resolved
crates/xline-client/src/types/kv.rs Outdated Show resolved Hide resolved
@mergify mergify bot requested a review from a team July 17, 2024 07:33
Copy link

mergify bot commented Jul 17, 2024

@lxl66566 Convert your pr to draft since CI failed

@mergify mergify bot marked this pull request as draft July 17, 2024 09:00
@bsbds bsbds merged commit ba97fe9 into xline-kv:master Jul 18, 2024
16 checks passed
@mergify mergify bot requested a review from a team July 18, 2024 09:08
@lxl66566 lxl66566 deleted the refactor-client-put branch July 18, 2024 13:34
lxl66566 added a commit to lxl66566/Xline that referenced this pull request Jul 19, 2024
lxl66566 added a commit to lxl66566/Xline that referenced this pull request Jul 19, 2024
lxl66566 added a commit to lxl66566/Xline that referenced this pull request Jul 19, 2024
lxl66566 added a commit that referenced this pull request Jul 19, 2024
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