Skip to content

etcdctl: refactor global flags management and simplify command initialization#21230

Open
hwdef wants to merge 1 commit intoetcd-io:mainfrom
hwdef:refactor-etcdctl-client
Open

etcdctl: refactor global flags management and simplify command initialization#21230
hwdef wants to merge 1 commit intoetcd-io:mainfrom
hwdef:refactor-etcdctl-client

Conversation

@hwdef
Copy link
Contributor

@hwdef hwdef commented Feb 1, 2026

This PR is a part of: #20270

It prepares for subsequent unit testing.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hwdef
Once this PR has been reviewed and has the lgtm label, please assign ahrtr for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hwdef hwdef force-pushed the refactor-etcdctl-client branch 4 times, most recently from 07f00f6 to d2f4172 Compare February 2, 2026 02:49
@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

❌ Patch coverage is 0% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.39%. Comparing base (36972d6) to head (fc8bef4).
⚠️ Report is 215 commits behind head on main.

Files with missing lines Patch % Lines
etcdctl/ctlv3/command/global.go 0.00% 46 Missing ⚠️
etcdctl/ctlv3/command/util.go 0.00% 2 Missing ⚠️
etcdctl/ctlv3/ctl.go 0.00% 2 Missing ⚠️
etcdctl/ctlv3/command/diagnosis_command.go 0.00% 1 Missing ⚠️
etcdctl/ctlv3/command/ep_command.go 0.00% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
etcdctl/ctlv3/command/diagnosis_command.go 0.00% <0.00%> (ø)
etcdctl/ctlv3/command/ep_command.go 0.00% <0.00%> (ø)
etcdctl/ctlv3/command/util.go 7.29% <0.00%> (+7.29%) ⬆️
etcdctl/ctlv3/ctl.go 0.00% <0.00%> (ø)
etcdctl/ctlv3/command/global.go 0.00% <0.00%> (ø)

... and 53 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #21230      +/-   ##
==========================================
- Coverage   68.45%   68.39%   -0.06%     
==========================================
  Files         429      428       -1     
  Lines       35288    35292       +4     
==========================================
- Hits        24156    24139      -17     
- Misses       9746     9754       +8     
- Partials     1386     1399      +13     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36972d6...fc8bef4. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hwdef
Copy link
Contributor Author

hwdef commented Feb 2, 2026

cc @siyuanfoundation

@hwdef
Copy link
Contributor Author

hwdef commented Feb 26, 2026

@siyuanfoundation Thanks for your replay. I have deleted the unnecessary code.

@siyuanfoundation
Copy link
Contributor

Overall I think the PR looks good. And not using GlobalFlags is beneficial for future changes of adding a cmd based on fake client.
@hwdef Can you squash the commits?

…lization

Signed-off-by: hwdef <hwdefcom@outlook.com>
@hwdef hwdef force-pushed the refactor-etcdctl-client branch from e225d89 to fc8bef4 Compare March 13, 2026 03:37
@hwdef
Copy link
Contributor Author

hwdef commented Mar 13, 2026

Thank you for your reply. I have already squashed the commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants