8000 pkg/featuregate: Return MutableFeatureGate interface in New function by ivanvc · Pull Request #19803 · etcd-io/etcd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pkg/featuregate: Return MutableFeatureGate interface in New function #19803

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
Apr 28, 2025

Conversation

ivanvc
Copy link
Member
@ivanvc ivanvc commented Apr 26, 2025

Avoid returning an unexported struct in the exported New function. Instead, return the MutableFeatureGate interface.

I found this issue in the recently introduced featuregate package while reviewing the staleness of #18370. Since this package was introduced in v3.6, it makes sense to merge and backport to release-3.6.

/cc @ahrtr @siyuanfoundation

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

Avoid returning an unexported struct in the exported New function,
instead return the MutableFeatureGate interface.

Signed-off-by: Ivan Valdes <ivan@vald.es>
Copy link
codecov bot commented Apr 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.95%. Comparing base (4fec4ca) to head (491199f).
Report is 14 commits behind head on main.

Additional details and impacted files
Files with missing lines Coverage Δ
pkg/featuregate/feature_gate.go 88.96% <100.00%> (ø)

... and 59 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19803      +/-   ##
==========================================
- Coverage   68.86%   65.95%   -2.91%     
==========================================
  Files         421      421              
  Lines       35863    35863              
==========================================
- Hits        24696    23654    -1042     
- Misses       9746    10770    +1024     
- Partials     1421     1439      +18     

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 aa8238f...491199f. Read the comment docs.

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

@ivanvc
Copy link
Member Author
ivanvc commented Apr 26, 2025

CodeCov failure comes from the Prow job failure: https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/post-etcd-coverage-report/1915918905981800448. I tried re-running the job, but I don't have permission to do that.

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.

Thanks @ivanvc for the catch.

Not sure why the coverage workflow fails from time to time.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, ivanvc, siyuanfoundation

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 9d24619 into etcd-io:main Apr 28, 2025
31 of 32 checks passed
@ahrtr
Copy link
Member
ahrtr commented Apr 28, 2025

/cherry-pick release-3.6

@k8s-infra-cherrypick-robot

@ahrtr: new pull request created: #19816

In response to this:

/cherry-pick release-3.6

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
Member Author
ivanvc commented Apr 28, 2025

Thanks @ivanvc for the catch.

Not sure why the coverage workflow fails from time to time.

It looks like these three tests are flaky according to testgrid:

  • go.etcd.io/etcd/tests/v3/integration/clientv3.TestMaintenanceSnapshotErrorInflight
  • go.etcd.io/etcd/server/v3/etcdserver/api/v3compactor.TestPeriodicHourly
  • go.etcd.io/etcd/server/v3/etcdserver/api/v3compactor.TestPeriodicMinutes

@ahrtr
Copy link
Member
ahrtr commented Apr 28, 2025
  • go.etcd.io/etcd/server/v3/etcdserver/api/v3compactor.TestPeriodicHourly
  • go.etcd.io/etcd/server/v3/etcdserver/api/v3compactor.TestPeriodicMinutes

PTAL #19748

@ivanvc
Copy link
Member Author
ivanvc commented Apr 28, 2025

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.

5 participants
0