-
Notifications
You must be signed in to change notification settings - Fork 83
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
Allow configuration of SSHKit options #93
Conversation
Thanks for the PR! This project lacks automated tests, which makes reviewing and approving PRs somewhat difficult. Please make sure that your contribution has not broken backwards compatibility or introduced any risky changes. Generated by 🚫 Danger |
Thanks for submitting this PR. I understand the need for a workaround. This has come up before with Git, where Capistrano's built-in Git tasks can sometimes overload a private Git server when the number of servers is high enough. Considering that this has been reported in at least two different places (Git and Bundler), I wonder if we should look for a more general solution? What if there was a global setting that let you set an upper limit on parallelism in SSHKit as across the board? Would that work for you, or would you rather have fine-grained control over each task? |
Hi @mattbrictson :) In my case, though, an across-the board limit would add too much time to other tasks that are fine to run in parallel. Do you think a global setting as well as per-task overrides could work? It's pie in the sky but I imagine something like this could work: set :sshkit_config, {
"global"=> {in: :groups, limit: 100},
"bundler:install" => {in: :groups, limit: 50},
"git:check" => {in: :groups, limit 10},
} |
Unfortunately it isn't that straightforward. Parallelization in SSHKit works at the granularity of the Perhaps there is another approach I'm not seeing, but I think we are limited to doing something globally, or we have to monkey-patch/rewrite every specific task that we want to affect. Neither option seems very appealing. I don't want to set a precedent for a task-specific configuration variable (e.g. |
I've decided against merging this for now. Thanks for the PR and the comments! I've opened #94 to continue the discussion. |
I completely understand @mattbrictson; a slippery slope in terms of cohesiveness. This workaround will buy us some time for that non-trivial implementation. Thanks for the feedback 👍 |
I found this useful to work around a rate limit with a custom gem repo :)
There may be other applications.
e.g.
set :bundle_task_ssh_kit_options, { in: :groups, limit: 50 }