-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[featuregates] Add fields for associated Issues and deprecated version #6447
[featuregates] Add fields for associated Issues and deprecated version #6447
Conversation
I know it has been some time since we spoken about this, but does to align on how envisioned how featuregates would work? |
Codecov ReportBase: 91.89% // Head: 91.88% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #6447 +/- ##
==========================================
- Coverage 91.89% 91.88% -0.02%
==========================================
Files 237 237
Lines 13534 13687 +153
==========================================
+ Hits 12437 12576 +139
- Misses 869 882 +13
- Partials 228 229 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
The patch is somewhat misleading here, it is not being directly tested, however, these new fields are being added to the templates which are being accessed. |
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.
I think adding an issue link is a non-controversial change, but the new stage is a bit confusing.
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.
I like the change, but this makes me more nervous about the current API to register a gate. Feels a bit reversed that we construct a Gate pass a copy to the registry and then query the enable status by the registry.IsEnabled.
@MovieStoreGuy @mx-psi I don't know if you realized but the Enabled
on the Gate does not return if the gate is enable or not in the current process (represents only the developer configuration). To get the runtime "configuration" need to call Registry.IsEnabled(id)
.
I find this more and more confusing, I wish we have something like:
type Registry struct {
}
func (r *Registry) MustRegister(id string, stage Stage, opts ..RegisterOptions) *Gate {
}
// Immutable object, owned by the `Registry`.
type Gate struct {
...
}
func (g *Gate) ID() string {
}
// Reflect the "runtime" status, so if somewhere else I have `reg.Apply(flags)` this will get changed since it is owned by the registry.
func (g *Gate) IsEnabled() bool {
}
That makes sense to me, it make the interaction with the registry clear and it's intent. |
0241b2a
to
d39894c
Compare
Extending feature gates to include reference URL and removal version.
d39894c
to
80a1592
Compare
@MovieStoreGuy please add another chloggen entry for the deprecated fields. See https://github.com/open-telemetry/opentelemetry-collector/blob/main/.chloggen/providehelpers.yaml |
bc5214a
to
02fb8c5
Compare
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.
LGTM, only a nit
Description:
This PR extends the feature gate to add the fields
IssueLinks
andRemovalVersion
to help provide context to users on:Link to tracking Issue:
#6167
Testing:
Tests have been updated to include updated to Gate life cycle as per the README
Documentation:
The featureflag README has been updated with an example.