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

enhancement: add feature gate support #3024

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rexagod
Copy link
Contributor

@rexagod rexagod commented May 24, 2024

Allow APIs to be gated conditionally.

Feature gates can be enforced by default, or overridden by the user. The latter takes priority if both cases conflict. Feature gates can be enabled, or disabled, and thus have two custom states. Note that the default state for a feature gate is nil, allowing us to distinguish if a feature gate is levied, raised, or not set.

Signed-off-by: Pranshu Srivastava [email protected]

Allow APIs to be gated conditionally.

Signed-off-by: Pranshu Srivastava <[email protected]>
@rexagod
Copy link
Contributor Author

rexagod commented May 24, 2024

For cases such as #1945 (comment).

@rexagod
Copy link
Contributor Author

rexagod commented May 27, 2024

cc @SuperQ @discordianfish

Happy to answer any questions around this.

@SuperQ
Copy link
Member

SuperQ commented May 27, 2024

I'm not sure we really need this. We've handled feature transitions with simple boolean flags.

@rexagod
Copy link
Contributor Author

rexagod commented May 27, 2024

Right, boolean flags surely are a possible solution. However, my inclination towards replacing them with feature gates was motivated by a couple of observations.

  • The feature-gates model implemented here assures a proof of trust can be established between the users and the features using version specifications.
  • Instead of adding deprecation notice to boolean flags' help texts, we'd have a timeline for every feature right from their inception, allowing users to forethink their dependency on gated APIs. Extending version commitments is also possible.
  • All feature-gates will be accumulated in a single document (and auto-updated), making it easier for the user to keep track of all additions.

@rexagod
Copy link
Contributor Author

rexagod commented May 27, 2024

That being said, if you think we are better off without these, PLMK and I'll close this.

@rexagod
Copy link
Contributor Author

rexagod commented Jun 21, 2024

@SuperQ @discordianfish I'd be happy to add this to the agenda and pitch it in the call next-to-next week if that sounds good (or have an async discussion here if that works).

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

Successfully merging this pull request may close these issues.

None yet

2 participants