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

Support Feature Gates #17657

Open
ahrtr opened this issue Mar 27, 2024 · 10 comments
Open

Support Feature Gates #17657

ahrtr opened this issue Mar 27, 2024 · 10 comments
Assignees
Labels
priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. type/feature

Comments

@ahrtr
Copy link
Member

ahrtr commented Mar 27, 2024

What would you like to be added?

Currently we add any new feature as an experimental feature with a configuration flag prefixed with "experimental", e.g. --experimental-feature-name. When we decide to graduate the experimental feature, we remove the prefix experimental. Refer to contributor-guide/features.md. Obviously it's a breaking change when we rename any configuration flag, so it isn't good.

So propose to add feature gates in the similar way as Kubernetes does. We can turn on or off any feature using the --feature-gates flag.

Reference:

I expect any new etcd features should follow the feature gates process once the feature gates feature is ready,

  • added as an alpha feature
  • disabled by default in the beginning

cc @fuweid @jmhbnz @serathius @siyuanfoundation @neolit123 @logicalhan @ArkaSaha30

Why is this needed?

Support a better & non-breaking way to manage new features

@serathius
Copy link
Member

+1 from me

@neolit123
Copy link

Obviously it's a breaking change when we rename any configuration flag, so it isn't good.

i'm a proponent to not prefix experimental features (flags, k8s labels, etc) with "experimental" because it's a breaking change, yes.
a flag can be just --foo instead of --experimental-foo and when used it can throw a warning and also be documented in its description as "experimental". if the user does not read the description, i would say it's their fault.

in terms of using feature gates in etcd, i don't see an issue. it's a smoother op-in for users when a beta FG enables a feature by default and has the opt-out.

@logicalhan
Copy link

+100 from me as well! Really happy to see this initiative being driven forward!

(GitHub is doing weird things in their mobile UI)

@tjungblu
Copy link
Contributor

Sounds good, what's the plan for the current experimental features?

@serathius
Copy link
Member

Sounds good, what's the plan for the current experimental features?

Expect we alias them to prevent breaking changes at least for 1 release, have both --experimental-feature and --feature flip the same state +/- some integration to work the same way after introduction of --feature-gates.

@ahrtr
Copy link
Member Author

ahrtr commented Mar 27, 2024

Expect we alias them to prevent breaking changes at least for 1 release, have both --experimental-feature and --feature flip the same state

Agreed with this.

If we decide to graduate or deprecate an experimental feature, we should keep the experimental flag --experimental-feature (and co-exist with the flag --feature for the graduation case) for at least one major/minor release , and print warning if users still use it.

some integration to work the same way after introduction of --feature-gates.

No strong opinion on this.

I expect the --feature-gates only applies to new features being added after introducing --feature-gates, and we still follow the existing contributor-guide/features.md to handle all legacy experimental flags. Forcing users to use --feature-gates for legacy experimental flags is also another breaking change?

@siyuanfoundation
Copy link
Contributor

+1 for the feature gate.
For existing experimental features, we can translate the flag to feature gate under the hood, and deprecate them after the next minor release

@fuweid
Copy link
Contributor

fuweid commented Mar 27, 2024

+1 for this.

Is it good timing to migrate and deprecate all the existing experimental features in v3.6? 👀

@jmhbnz jmhbnz added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Mar 28, 2024
@ahrtr
Copy link
Member Author

ahrtr commented Mar 28, 2024

Is it good timing to migrate and deprecate all the existing experimental features in v3.6?

Let's discuss it under #16292.

@siyuanfoundation
Copy link
Contributor

siyuanfoundation commented Apr 5, 2024

I can take on this issue, and start a KEP

cc @stackbaek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. type/feature
Development

No branches or pull requests

8 participants