Skip to content

client/v3: fix revive unexported-return issues#21512

Open
eyupcanakman wants to merge 1 commit intoetcd-io:mainfrom
eyupcanakman:fix/unexported-return-client-v3
Open

client/v3: fix revive unexported-return issues#21512
eyupcanakman wants to merge 1 commit intoetcd-io:mainfrom
eyupcanakman:fix/unexported-return-client-v3

Conversation

@eyupcanakman
Copy link
Copy Markdown

@eyupcanakman eyupcanakman commented Mar 22, 2026

Part of #18370

Fix the unexported-return revive lint violations in the client/v3 module.

Changes:

  • ordering.NewKV() now returns clientv3.KV instead of *kvOrdering
  • Export stmOption as STMOption so that WithIsolation(), WithAbortContext(), WithPrefetch(), and NewSTM() no longer return/accept an unexported type

Fix the unexported-return revive lint violations in the client/v3 module.

Changes:
- ordering.NewKV() now returns clientv3.KV instead of *kvOrdering
- Export stmOption as STMOption so that WithIsolation(), WithAbortContext(),
  WithPrefetch(), and NewSTM() no longer return/accept an unexported type

Part of etcd-io#18370

Signed-off-by: Eyüp Can Akman <eyupcanakman@gmail.com>
@k8s-ci-robot
Copy link
Copy Markdown

Hi @eyupcanakman. 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.

Details

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.

@ivanvc
Copy link
Copy Markdown
Member

ivanvc commented Mar 29, 2026

/ok-to-test

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.47%. Comparing base (be3acf4) to head (dfc7d02).
⚠️ Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
client/v3/concurrency/stm.go 75.00% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
client/v3/ordering/kv.go 85.29% <100.00%> (ø)
client/v3/concurrency/stm.go 75.42% <75.00%> (ø)

... and 27 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #21512      +/-   ##
==========================================
+ Coverage   68.40%   68.47%   +0.06%     
==========================================
  Files         428      428              
  Lines       35372    35383      +11     
==========================================
+ Hits        24196    24227      +31     
+ Misses       9773     9751      -22     
- Partials     1403     1405       +2     

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 be3acf4...dfc7d02. Read the comment docs.

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


type stmOption func(*stmOptions)
// STMOption configures STM.
type STMOption func(*stmOptions)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Any objections about exporting STMOption, @ahrtr, @serathius, @fuweid?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good


type stmOption func(*stmOptions)
// STMOption configures STM.
type STMOption func(*stmOptions)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good

@k8s-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, eyupcanakman

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

The pull request process is described 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

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