Skip to content
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

KEP-4578: migrate experimental-initial-corrupt-check flag to feature gate. #18478

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

liangyuanpeng
Copy link
Contributor

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

migrating experimental-initial-corrupt-check flag to feature gate.

part of #18023

@k8s-ci-robot
Copy link

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

@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 68.78%. Comparing base (62e4433) to head (56ad9eb).
Report is 10 commits behind head on main.

Current head 56ad9eb differs from pull request most recent head a966c07

Please upload reports for the commit a966c07 to get more accurate results.

Files Patch % Lines
server/embed/etcd.go 0.00% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
Files Coverage Δ
server/features/etcd_features.go 60.00% <ø> (ø)
server/embed/etcd.go 75.77% <0.00%> (-0.05%) ⬇️

... and 25 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18478      +/-   ##
==========================================
- Coverage   68.79%   68.78%   -0.02%     
==========================================
  Files         420      420              
  Lines       35490    35489       -1     
==========================================
- Hits        24416    24410       -6     
+ Misses       9647     9644       -3     
- Partials     1427     1435       +8     

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 62e4433...a966c07. Read the comment docs.

@serathius
Copy link
Member

/retest

@serathius
Copy link
Member

LGTM, please address the comments.

expectedFeatures: map[featuregate.Feature]bool{
features.StopGRPCServiceOnDefrag: false,
features.DistributedTracing: false,
features.InitialCorruptCheck: true,
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a similar test case for setting --experimental-initial-corrupt-check command line flag resulting in feature gate being flipped?

Copy link
Contributor Author

@liangyuanpeng liangyuanpeng Aug 22, 2024

Choose a reason for hiding this comment

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

Updated.

I can see that we have a test for ExperimentalFlags to FeatureGates, this is the reason i have not add this test case here before.

func TestSetFeatureGatesFromExperimentalFlags(t *testing.T) {

Do we still need to add corresponding conversion tests here for each ExperimentalFlags?

@serathius
Copy link
Member

cc @ahrtr

server/etcdmain/help.go Outdated Show resolved Hide resolved
server/embed/config_test.go Show resolved Hide resolved
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 with a nit

Thanks

server/etcdmain/help.go Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, liangyuanpeng, serathius

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

@liangyuanpeng
Copy link
Contributor Author

liangyuanpeng commented Aug 22, 2024

To make it easier to add a new featuregate, I will clean up this test in the next PR

@ivanvc
Copy link
Member

ivanvc commented Aug 22, 2024

/ok-to-test

@ahrtr
Copy link
Member

ahrtr commented Aug 23, 2024

To make it easier to add a new featuregate, I will clean up this test in the next PR

Sounds good. We should try to make the test more extensible. For example, have a list of experimental flags, and execute the set of test cases for each of them. Each time when we migrate an experimental flag, we just need to add it into the list.

@ahrtr ahrtr merged commit 93a245a into etcd-io:main Aug 23, 2024
44 checks passed
@liangyuanpeng
Copy link
Contributor Author

Sounds good. We should try to make the test more extensible. For example, have a list of experimental flags, and execute the set of test cases for each of them. Each time when we migrate an experimental flag, we just need to add it into the list.

sure , it's what i want to do.

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.

6 participants