Skip to content

etcdctl: refactor json printing to support custom writers #20177

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

Merged
merged 1 commit into from
Jun 16, 2025

Conversation

kstrifonoff
Copy link
Contributor

A necessary "pre-change" for #19469.

The jsonPrinter struct now includes an io.Writer field, enabling unit testing of this module.

@k8s-ci-robot
Copy link

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

Signed-off-by: Kirill Trifonov <kstrifonoff@gmail.com>
@kstrifonoff kstrifonoff force-pushed the refactor/json-printer-writer branch from 8f2f76b to e6be3f3 Compare June 15, 2025 22:18
@kstrifonoff
Copy link
Contributor Author

/cc @ahrtr

@k8s-ci-robot k8s-ci-robot requested a review from ahrtr June 15, 2025 22:21
@ahrtr
Copy link
Member

ahrtr commented Jun 16, 2025

/ok-to-test

Copy link

codecov bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 69.25%. Comparing base (db4dfbd) to head (e6be3f3).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
etcdctl/ctlv3/command/printer_json.go 0.00% 8 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
etcdctl/ctlv3/command/printer_json.go 0.00% <0.00%> (ø)

... and 148 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #20177      +/-   ##
==========================================
+ Coverage   62.67%   69.25%   +6.57%     
==========================================
  Files         401      413      +12     
  Lines       33292    34367    +1075     
==========================================
+ Hits        20867    23802    +2935     
+ Misses      10867     9173    -1694     
+ Partials     1558     1392     -166     

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 db4dfbd...e6be3f3. Read the comment docs.

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

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM & thx

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, fuweid, kstrifonoff

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

The pull request process is described here

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

@ahrtr ahrtr merged commit fba53f1 into etcd-io:main Jun 16, 2025
33 checks passed
@kstrifonoff kstrifonoff deleted the refactor/json-printer-writer branch June 16, 2025 20:04
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.

4 participants