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

Add server level feature gate #18023

Open
15 tasks done
siyuanfoundation opened this issue May 17, 2024 · 14 comments
Open
15 tasks done

Add server level feature gate #18023

siyuanfoundation opened this issue May 17, 2024 · 14 comments

Comments

@siyuanfoundation
Copy link
Contributor

siyuanfoundation commented May 17, 2024

What would you like to be added?

Add the Kubernetes style feature gate framework into etcd to gate future feature enhancement.
Users would be able to turn features on or off for the single server and query feature enablement in a consistent way.

This issue is for tracking KEP-4578.
Tasks in this KEP include

  • Milestone 1
  • Milestone 2
  • Milestone 3

Why is this needed?

To make it easier to add and use new features in etcd.
Please refer to kubernetes/enhancements#4578 for more details.

@siyuanfoundation
Copy link
Contributor Author

while kubernetes/enhancements#4610 is still in review, I think there is no much contention regarding server level feature gate. we can get started on the implementation.
/cc @stackbaek @henrybear327

@henrybear327
Copy link
Contributor

Thanks @siyuanfoundation for the heads up! Happy to contribute to this feature :) Looking forward to it!

@serathius
Copy link
Member

Can we wait for approvals for the KEP so the implementation done by contributors don't need to be updated when the design details are changed frustrating the contributors?

@siyuanfoundation
Copy link
Contributor Author

/cc @YoyinZyc

@ahrtr
Copy link
Member

ahrtr commented Feb 12, 2025

Several remaining issues/tasks:

  • The flag --experimental-set-member-localaddr is missed. It's added in 3.6 only, so we can just change it to feature gate. assigned to @henrybear327
  • All the deprecated fields are not correctly marked. The comment should begins with Deprecated:, refer to https://go.dev/wiki/Deprecated. The benefit is that IDEs will automatically draw a line through the field, so with better awareness to the users. assigned to @ivanvc
  • The deprecated comment/description isn't consistent across "help/flag description/field comment" etc. For example, for --experimental-txn-mode-write-with-shared-buffer, we only added "deprecated ..." in the help.go, but not in the field comment, nor the flag description. Fixed by @ivanvc in Fix more v3.6 deprecation comments #19408
    • Action: A PR is needed. Contribution is welcome. Thanks
  • For embedded use cases, if an experimental flag was migrated to a non-experimental flag, users aren't able to set the experimental field any more, It won't work. For example
    cfg.ExperimentalEnableDistributedTracing = true
    Instead users have to set the related non-experimental field. It's a breaking change, we need to clearly document this.
    • Action: documentation
  • For embedded use cases, if an experimental flag was migrated to the feature gate, users aren't able to set the experimental field any more, It won't work. It's also a breaking change. We need to document this, also we need to add document to users how to set it.
    • Action: documentation

cc @fuweid @jmhbnz @siyuanfoundation @henrybear327 @ivanvc @serathius

@henrybear327
Copy link
Contributor

I can take on some tasks while the e2e PRs are being reviewed / merged!
Please assign it directly to me and I will submit the PR before midnight!

Thanks @ahrtr

@ahrtr
Copy link
Member

ahrtr commented Feb 12, 2025

@henrybear327 thx, can you deliver a PR for The flag --experimental-set-member-localaddr is missed firstly?

@henrybear327
Copy link
Contributor

@henrybear327 thx, can you deliver a PR for The flag --experimental-set-member-localaddr is missed firstly?

Duly noted.

@ivanvc
Copy link
Member

ivanvc commented Feb 12, 2025

I'll take the second one:

All the deprecated fields are not correctly marked.

@ivanvc
Copy link
Member

ivanvc commented Feb 13, 2025

The deprecated comment/description isn't consistent across "help/flag description/field comment" etc. For example, for --experimental-txn-mode-write-with-shared-buffer, we only added "deprecated ..." in the help.go, but not in the field comment, nor the flag description.

I did another pass at deprecations and fixed the following:

  • ExperimentalTxnModeWriteWithSharedBuffer
  • ExperimentalStopGRPCServiceOnDefrag
  • ExperimentalInitialCorruptCheck
  • Standardized all deprecation messages in server/etcdmain/help.go

See PR: #19408

@ahrtr
Copy link
Member

ahrtr commented Feb 13, 2025

@henrybear327 thx, can you deliver a PR for The flag --experimental-set-member-localaddr is missed firstly?

Duly noted.

@henrybear327 are you able to deliver a PR to fix this today (asap)? thx.

@henrybear327
Copy link
Contributor

henrybear327 commented Feb 13, 2025

@henrybear327 thx, can you deliver a PR for The flag --experimental-set-member-localaddr is missed firstly?

Duly noted.

@henrybear327 are you able to deliver a PR to fix this today (asap)? thx.

Yes, I am on it. Work is currently ongoing as I ran into some issues that I am debugging now!

@ahrtr
Copy link
Member

ahrtr commented Feb 13, 2025

@henrybear327 the migration of the missing experimental flag --experimental-set-member-localaddr has higher priority than the downgrade e2e test (#19399) to me.

@henrybear327
Copy link
Contributor

@henrybear327 the migration of the missing experimental flag --experimental-set-member-localaddr has higher priority than the downgrade e2e test (#19399) to me.

Sorry for the delay, initial attempt is put up.

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

No branches or pull requests

5 participants