-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Always print the raft_term in decimal #13711
Conversation
b435311
to
17f8b68
Compare
Codecov Report
@@ Coverage Diff @@
## main #13711 +/- ##
==========================================
- Coverage 72.85% 72.61% -0.25%
==========================================
Files 465 465
Lines 37880 37880
==========================================
- Hits 27599 27508 -91
- Misses 8508 8582 +74
- Partials 1773 1790 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
acabf77
to
ca6c5ff
Compare
ca6c5ff
to
80bd42c
Compare
4158323
to
17fb791
Compare
Just rebased this PR. |
086daba
to
9d62ed2
Compare
All tests passed, Please take a look. @serathius @spzala @ptabor |
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.
Thank you. Please resolve the conflicts.
Agree that |
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, please resolve the conflict.
b363fd4
to
7fde3c4
Compare
7fde3c4
to
5d38475
Compare
Just rebased this PR. PTAL @serathius @ptabor @spzala Thanks. |
Fix 13709
When executing command
etcdctl member list --hex -w json
, it gets thecluster_id
andmember_id
included in double quotes, but the raft_term isn't. All of three fields areuint64
, so we should be consistent on displaying them.Without this fix, the output can't be formatted using tool like
jq
either.It's just a minor fix.
cc @serathius @spzala @ptabor
EDIT: I did some archaeology, the change was original introduced in PR/11812 in order to fix issues/9975. The original PR was just trying to resolve the inconsistent memberID output. But somehow it also printed the raft_term in hexdecimal. It seems not correct, because it can't be parsed correctly by
json.NewDecoder
, neither the tool something likejq
, because the raft_term isn't a valid integer.We have two solutions:
json.NewDecoder
/json.Unmarshal
and tool likejq
;This PR follows the first solution. cc @tangcong @danbeaulieu @omkensey