-
Notifications
You must be signed in to change notification settings - Fork 10.1k
etcdctl: fix json output #19469
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
base: main
Are you sure you want to change the base?
etcdctl: fix json output #19469
Conversation
Hi @kstrifonoff. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions 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. |
4de0af7
to
237116d
Compare
237116d
to
d39583f
Compare
/cc @ivanvc |
Hi @kstrifonoff, thanks for the pull request. I'm respectful to the original contributor who asked to work on this. Our guideline is to re-assign after a week of no answer when asking a contributor for updates. A couple of suggestions by quickly looking at the code.
Thanks again for your pull request :) |
240d3a0
to
b1cc94c
Compare
1510dc9
to
db2b56f
Compare
Hi @ivanvc , I’ve made some changes to my initial suggestions based on your feedback. Now, the “JSON with Hex” implementation is just a slight extension of the default “printJSON” implementation. I think it should probably be moved into the “utils” package. Here are a few things I noticed:
|
/ok-to-test |
The e2e tests already exist, my suggestion is to expand them to cover the new cases you added: etcd/tests/e2e/ctl_v3_member_test.go Lines 206 to 255 in 9f1709e
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
... and 36 files with indirect coverage changes @@ Coverage Diff @@
## main #19469 +/- ##
==========================================
- Coverage 68.81% 68.75% -0.06%
==========================================
Files 421 424 +3
Lines 35852 35909 +57
==========================================
+ Hits 24672 24690 +18
- Misses 9753 9795 +42
+ Partials 1427 1424 -3 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
768a4cc
to
8d4f395
Compare
8d4f395
to
13c7989
Compare
hi @ivanvc I’ve also fixed all the remaining Let me know if you have any questions! |
@ivanvc just a friendly reminder: could you please review this once you have some time? |
/cc @fuweid Could you please review this PR? |
func (p *jsonPrinter) EndpointStatus(r []epStatus) { printJSON(r) } | ||
func (p *jsonPrinter) EndpointHashKV(r []epHashKV) { printJSON(r) } | ||
type ( | ||
HexStatusResponse pb.StatusResponse |
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.
Thanks for filing this refactor change.
Would you please add one method MemberAdd
to jsonPrinter
to fix that issue first?
Basically, we don't involve refactor change in bugfix. It's easy to review and maintain.
Thanks!
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.
@fuweid it makes sense. I’ve removed the extra code. Could you please check it again?
If it looks good, let’s talk about how to refactor the rest of the code.
Signed-off-by: Kirill Trifonov <[email protected]>
13c7989
to
311626f
Compare
/retest |
Fix #19262