Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feature: Configuration to set maximum parallelization of :parallel runner

Aperta
#414 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
devops

Direzione di ricerca

Inizia leggendo le implementazioni SSHKit dei runner :parallel e :groups e il modo in cui viene applicato default_runner_config. Confronta le configurazioni proposte di limit e threads, quindi verifica che un runner predefinito con limiti funzioni per le operazioni di deployment senza richiedere rate limiting specifico per SCM.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

discuss! new feature

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:

Lingua principale
Ruby
Stelle
1.2k
Fork
257
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di capistrano/sshkit

Tutte le issue di capistrano/sshkit

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.