-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add lotus-miner storage-deals list --format=json
with transfers
#7312
Conversation
Thanks for putting this together 👍 I agree the JSON output is clearer and easier to parse. Would it make sense to add the output format and a flag for whether to include deal transfers onto the existing |
I actually started with that, and it gets messy very quickly to support --with-transfers in the |
lotus-miner storage-deals list --with-transfers
and --format=json
lotus-miner storage-deals list --with-transfers
and --format=json
lotus-miner storage-deals list --format=json
with transfers
b486eb1
to
fe602ab
Compare
It is quite hard to support
|
}, | ||
} | ||
|
||
func listDealsWithTable(cctx *cli.Context) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For easier review - this is not modified.
Codecov Report
@@ Coverage Diff @@
## master #7312 +/- ##
==========================================
- Coverage 39.14% 39.06% -0.08%
==========================================
Files 614 614
Lines 64997 65056 +59
==========================================
- Hits 25440 25412 -28
- Misses 35150 35244 +94
+ Partials 4407 4400 -7
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
In #7235 I used a |
Yes, ideally we should be consistent across various command line tools. Having said that I don't have any preference over For now I will leave the other reviewers to chime in. |
This PR is updating the
lotus-miner storage-deals list
cmd to print out storage deals together with their respective transfers, for easier debugging - only when using--format=json
. At the moment fetching storage deals and transfers is done via two separate commands and somewhat cumbersome to use given the tab-delimited tables.--format=json
prints out results in line-delimited JSON, which I think is much easier to read than thetable
approach we use in many commands, because:grep
andjq
: