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

CI::Queue::Static and CI::Queue::File initialization is broken

Aperta
#42 3 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
25/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
ci-cd, testing

Direzione di ricerca

Inizia tracciando l’inizializzazione di CI::Queue::Static e CI::Queue::File, quindi esamina come #populate e #to_a interagiscono con l’elenco delle code e @index. Chiarisci l’API prevista per la configurazione, il popolamento dei test e il metodo di classe .populate proposto prima di modificarlo. Il lavoro è completato quando i casi d’uso comuni non richiedono configurazione non necessaria e le code non popolate non producono errori di metodo su nil né avvisi di Ruby.

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

Descrizione

After https://github.com/Shopify/ci-queue/pull/34, you need to initialize the File and Static queue passing the file name or the test respectively and you also need to populate the queue with the list of tests. This seems contra-intuitive.

Maybe the initialize should only take the config and the populate the list of tests and add a .populate class method (or any other name) that does what the initialize used to do.

Also those queues require a configuration object that is not needed in most of its use cases. Making it optional, or adding a high level method as .populate that creates the configuration object would be great.

cc @casperisfine @wvanbergen @tjoyal


Nitpick:

The @index instance variable is only set after you call #populate so if you don't you get a "non-method error fetch for nil" in the to_a method and a ruby warning because the instance variable is not initialized. Maybe we should try to write warning free code so we could avoid this kind of error?

Lingua principale
Ruby
Stelle
240
Fork
36
Merge medio
28m
PR unite (30g)
3

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 Shopify/ci-queue

Tutte le issue di Shopify/ci-queue

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.