-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[configoptional] Add support for setting an 'enabled' field under a feature gate #13995
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
base: main
Are you sure you want to change the base?
[configoptional] Add support for setting an 'enabled' field under a feature gate #13995
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13995 +/- ##
=======================================
Coverage 91.65% 91.65%
=======================================
Files 654 654
Lines 42659 42671 +12
=======================================
+ Hits 39100 39112 +12
Misses 2744 2744
Partials 815 815 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good to me, although I think we'll want community feedback from end user and component author perspectives. Additionally, while I'm ambivalent about enabled
vs. disabled
, others may have strong opinions.
change_type: enhancement | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) | ||
component: config/configoptional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be 'all' to pass the component list test (see this thread)
addEnabledFieldFeatureGateID, | ||
featuregate.StageAlpha, | ||
featuregate.WithRegisterFromVersion("v0.138.0"), | ||
featuregate.WithRegisterDescription("Allows optional fields to be configured via an 'enabled' field."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: s/configured/toggled/ may be clearer?
component: config/configoptional | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Adds new `configoptional.AddEnabledField` feature gate that allows user to decide `configoptional` flavor through a new `enabled` field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: "Flavor" is more of an internal term, maybe "allows users to explicitly disable a configoptional.Optional
through a new enabled
field"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description
Adds support for disabling or enabling optional fields through an
enabled
key under an alpha feature gate,configoptional.AddEnabledField
. For example, the following configuration becomes valid:and is equivalent to:
Link to tracking issue
Fixes #13894
Updates #14021