-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
remove os.Args hack for backwards compatible arguments #42209
base: main
Are you sure you want to change the base?
remove os.Args hack for backwards compatible arguments #42209
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
341ef65
to
034a558
Compare
- remove unused func - remove unused var
034a558
to
ecd404f
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.
I tested the beats locally as well as searching for all possible flags I could find in the help commands and subcommands of filebeat and metricbeat, couldn't find any leftover flags still using the single dash. LGTM.
@leehinman I have a question about the fallout of this change. I understand that this is a breaking change but there are numerous Elastic repositories, documentation, and scripts that use the single dash in the commands. How should we address those that are not part of the Beats repository? Is there a plan for handling this? |
*** Breaking Change ***
Proposed commit message
This PR removes support for single
-
multi-character command line options. You will need to use--
instead.For example
-environment
will no longer work, but--environment
will. The single charater options will continue to work, for example-d
and-c
.This greatly simplifies our command line argument parsing and makes it much easier to import the beats module into other projects.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
If users have scripts that use the old single
-
arguments they will need to modify their scripts to use the double--
.Author's Checklist
How to test this PR locally
-environment container
fails but--environment container
succeedsRelated issues
Use cases
Screenshots
Logs