-
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
Feature command #12014
base: main
Are you sure you want to change the base?
Feature command #12014
Conversation
Signed-off-by: danish9039 <[email protected]>
Signed-off-by: danish9039 <[email protected]>
Signed-off-by: danish9039 <[email protected]>
…elemetry-collector into feature-command
Signed-off-by: danish9039 <[email protected]>
|
||
func newFeaturesCommand() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "features [feature-id]", |
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.
@open-telemetry/collector-approvers do you prefer features? gates? featuregates?
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.
features
sounds better to me
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'd vote for featuregates
or feature-gates
since that is the full name of the thing being presented by the command. The term features
could apply to something than feature gates (like the capabilities of the collector).
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 this needs a changelog
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12014 +/- ##
==========================================
+ Coverage 91.67% 91.68% +0.01%
==========================================
Files 455 455
Lines 24038 24072 +34
==========================================
+ Hits 22037 22071 +34
Misses 1629 1629
Partials 372 372 ☔ View full report in Codecov by Sentry. |
Signed-off-by: danish9039 <[email protected]>
Signed-off-by: danish9039 <[email protected]>
featuregate.GlobalRegistry().VisitAll(func(g *featuregate.Gate) { | ||
if g.ID() == args[0] { | ||
found = true | ||
fmt.Printf("Feature: %s\n", g.ID()) | ||
fmt.Printf("Enabled: %v\n", g.IsEnabled()) | ||
fmt.Printf("Stage: %s\n", g.Stage()) | ||
fmt.Printf("Description: %s\n", g.Description()) | ||
fmt.Printf("From Version: %s\n", g.FromVersion()) | ||
if g.ToVersion() != "" { | ||
fmt.Printf("To Version: %s\n", g.ToVersion()) | ||
} | ||
} | ||
}) |
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.
Doesn't block this PR, but this feature is a great use case for #7625
Description
Link to tracking issue
Testing
make
make test
Documentation