-
Notifications
You must be signed in to change notification settings - Fork 5k
Don't register cfgfile flags on flag.CommandLine in func init()
#40993
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
Conversation
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
|
…40993) (#41007) (cherry picked from commit 07360ca) Co-authored-by: Blake Rouse <[email protected]>
Proposed commit message
Requires the explicit calling of
cfgfile.InitFlags(nil)to register the flags initialized by thecfgfilemodule.This is required to allow other modules to import beats without having those flags present in the global
flag.CommandLine. When they are automatically registered they collide and cause issues with other already registered command line arguments (aka. elastic-agent).Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works(not really possible to unit test)[ ] I have added an entry in(not user facing)CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
None