-
Notifications
You must be signed in to change notification settings - Fork 3.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
Remove the ability to run multiple commands #1752
Conversation
Addresses elastic#1747. This removes the argument list iteration and spawning of multiple tasks. It's still possible to specify aditional arguments but now they're ignored.
I'd love to see runner be implemented as Clamp::Command with subcommands detailed the clamp way, like:
|
(my hope for removing the 'multi-subprocess' feature was to do a refactor that didnt' reinvent subcommand stuff) |
Would be nice to redo it indeed in the 'right way' |
Is there a benefit to Clamp once we no longer have to support "background" tasks? Maybe simple optparsing the cli options and spawing the command would be enough. |
Clamp doesn't do background tasks, but we use clamp elsewhere and it is, in my opinion, the most superior CLI library available for Ruby :) |
Example clamp usage in the new plugin manager: https://github.com/elasticsearch/logstash/blob/master/lib/logstash/pluginmanager/main.rb |
That's a discussion for an other time ;-) |
💚 Test passed. |
I guess I mean the Stud, specially Stud::Task. As for Clamp, no strong opinions there. |
@electrical hehe. Still! Because we support subcommands already (agent, web, irb, etc), we should probably use a library that makes it easy to do. Ruby's optparse is kind of not awesome for that. |
@jsvd +1, we don't need Stud::Task here |
Well, this PR accomplished the goal of getting the ball rolling ;) Thanks for the input |
Truth! Sorry if the review I gave sounded a bit short! We can definitely do it in two PRs for sure - one to disable multiple-subproceses, and another to refactor. +1 on doing this. |
I'll try to assess tomorrow if a full refactor "the clamp way" is simple/quick enough. otherwise I'd go with your two-step suggestion. 👍 |
Code LGTM, mostly! I tested it, one difference is that |
Thanks for being so fast on this :) |
Bugger, I'll add that test tomorrow and fix it. ty |
💚 Test passed. |
f86287d
to
a536eef
Compare
This was merged with a new (experimental) tool to help us merge a single PR into multiple branches. Hopefully it doesn't set git on fire. <3 Closing! |
Addresses #1747.
This removes the argument list iteration and spawning of multiple
tasks.
It's still possible to specify aditional arguments but now they're
ignored.