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

feat(cli): provide useful commands #1137

Merged
merged 7 commits into from
Jan 6, 2021

Conversation

moreal
Copy link
Contributor

@moreal moreal commented Dec 23, 2020

It provides:

  • mpt list: List all aliases stored.
  • mpt query KV-STORE STATE-ROOT-HASH STATE-KEY: query a state of the state key at the state root hash in kv-store.

@moreal moreal marked this pull request as ready for review December 23, 2020 12:22
@moreal moreal self-assigned this Dec 23, 2020
@moreal moreal added the tools Related to CLI tools (Libplanet.Tools) label Dec 23, 2020
longfin
longfin previously approved these changes Dec 23, 2020
@codecov
Copy link

codecov bot commented Dec 23, 2020

Codecov Report

Merging #1137 (a13ce71) into main (e44d148) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1137      +/-   ##
==========================================
- Coverage   87.56%   87.54%   -0.02%     
==========================================
  Files         345      345              
  Lines       30012    30012              
==========================================
- Hits        26279    26274       -5     
- Misses       2101     2108       +7     
+ Partials     1632     1630       -2     
Impacted Files Coverage Δ
Libplanet/Hashcash.cs 94.44% <0.00%> (-5.56%) ⬇️
Libplanet/Store/DefaultStore.cs 86.19% <0.00%> (-1.57%) ⬇️
Libplanet.Tests/Net/SwarmTest.Preload.cs 98.72% <0.00%> (-0.57%) ⬇️
Libplanet/Net/Swarm.cs 81.55% <0.00%> (ø)
Libplanet/Net/NetMQTransport.cs 79.72% <0.00%> (+0.30%) ⬆️
Libplanet.Stun/Stun/TurnClient.cs 79.59% <0.00%> (+1.36%) ⬆️

limebell
limebell previously approved these changes Dec 24, 2020
Libplanet.Tools/Mpt.cs Outdated Show resolved Hide resolved
@moreal moreal dismissed stale reviews from limebell and longfin via 49a892d January 4, 2021 01:30
longfin
longfin previously approved these changes Jan 4, 2021
CHANGES.md Outdated
@@ -111,6 +111,7 @@ To be released.
[[#1129]]
- Store aliases used by `planet mpt` became to disallow names looking like
URIs to disambiguate aliases from the literal store URIs. [[#1129]]
- Added a new sub-command `planet mpt list` and `planet mpt query`. [[#1137]]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Added a new sub-command `planet mpt list` and `planet mpt query`. [[#1137]]
- Added new subcommands `planet mpt list` and `planet mpt query`. [[#1137]]

FYI English speakers seems to prefer “subcommand” without a hyphen (about 787,000 results on Google) over “sub-command” with a hyphen (about 154,000 results on Google).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I amended it in adefc27.

Libplanet.Tools/Mpt.cs Outdated Show resolved Hide resolved
Libplanet.Tools/Mpt.cs Outdated Show resolved Hide resolved
dahlia
dahlia previously approved these changes Jan 4, 2021
@dahlia dahlia requested a review from longfin January 4, 2021 02:03
riemannulus
riemannulus previously approved these changes Jan 4, 2021
@moreal moreal dismissed stale reviews from riemannulus and dahlia via 2ff10aa January 4, 2021 03:03
@moreal
Copy link
Contributor Author

moreal commented Jan 4, 2021

I pushed again in force because there was an issue at Azure Pipelines CI.

##[error]The agent did not connect within the alloted time of 45 minute(s).
,##[error]We stopped hearing from agent Azure Pipelines 2. Verify the agent machine is running and has a healthy network connection. Anything that terminates an agent process, starves it for CPU, or blocks its network access can cause this error. For more information, see: https://go.microsoft.com/fwlink/?linkid=846610

I couldn't find the way to restart them so I pushed again. But there are no changes after @riemannulus @dahlia approved. You can check it with GitHub compare b7471f..2ff10a. Please review again 🙏

limebell
limebell previously approved these changes Jan 4, 2021
dahlia
dahlia previously approved these changes Jan 4, 2021
riemannulus
riemannulus previously approved these changes Jan 5, 2021
dahlia
dahlia previously approved these changes Jan 5, 2021
@moreal moreal dismissed stale reviews from dahlia and riemannulus via d1dd447 January 5, 2021 05:53
moreal and others added 7 commits January 6, 2021 10:57
"It didn't …" → "It doesn't …"

Co-Authored-By: Swen Mun <longfinfunnel@gmail.com>
Co-Authored-By: Chanhyuck <lime_bell@naver.com>
Co-Authored-By: Hong Minhee <hong.minhee@gmail.com>
Co-Authored-By: Hong Minhee <hong.minhee@gmail.com>
Co-Authored-By: Hong Minhee <hong.minhee@gmail.com>
@moreal
Copy link
Contributor Author

moreal commented Jan 6, 2021

@planetarium/libplanet PTAL 🙏

@moreal moreal merged commit 417ddbe into planetarium:main Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Related to CLI tools (Libplanet.Tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants