Feature: Configuration to set maximum parallelization of :parallel runner
まだ誰も着手していません。
評価
調査の方向性
まず、SSHKit の :parallel および :groups runner の実装と、default_runner_config がどのように適用されるかを読みます。提案されている limit と threads の設定を比較し、SCM 固有のレート制限を必要とせずに、制限付きのデフォルト runner が deployment 操作で機能することを確認します。
索引モデルが issue の本文から書いたものです。
説明
There have been multiple requests to set an upper limit on the number of git operations that are executed in parallel in the default Capistrano git strategy. Similarly, users are also asking for a limit on the number of parallel bundle install executions in capistrano-bundler.
What these tasks have in common is that they all use the default :parallel runner provided by SSHKit. When using Capistrano to deploy to a large number of servers, firing off these operations to all servers in parallel can overload shared resources like a git server or private gem repository.
Rather than implement rate limiting for each SCM, capistrano-bundler, etc., I feel like a more general solution should be provided by SSHKit itself.
My proposal would be to change the implementation of the :parallel runner to essentially be a subclass of the :groups runner, except with defaults of wait: 0 and limit: INFINITY. Then, if a user wants to limit the amount of parallelization, they could simply do this:
# Limit the default :parallel runner to 10 threads
SSHKit.config.default_runner_config = { limit: 10 }
If sharing implementation and configuration keys between :parallel and :groups is too confusing, then perhaps the :parallel runner could use a different configuration key (but to the same effect):
# Limit the default :parallel runner to 10 threads
SSHKit.config.default_runner_config = { threads: 10 }
Thoughts?
See also:
- 主要言語
- Ruby
- スター
- 1.2k
- フォーク
- 257
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
capistrano/sshkit のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
capistrano/sshkit#563 · リアクション 6 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
capistrano/sshkit#562 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
capistrano/sshkit#554 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
capistrano/sshkit#543 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
capistrano/sshkit#518 · コメント 1 件 ·
capistrano/sshkit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
solana-foundation/pay-kit#341 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
TheOdinProject/curriculum#31427 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
cyclestreets/cyclescape#1107 · リアクション 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信