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

Unify the Cloud service poll loops (delete --force and udf attach --wake)

Aperta
#1,065 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli, cloud

Direzione di ricerca

Start in cloud/services.rs with classify_stop_poll_state and the hand-rolled stop loop, then compare with wait_for and Outcome in cloud/udfs.rs. The shared loop and PollProgress will live in cloud/shared.rs. The issue depends on #1033, which is not merged yet, so confirm that first. Done means delete --force uses the shared loop with unchanged output and exit codes, its existing tests pass unmodified, and new unit tests cover the shared loop and every ServiceState variant.

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

Descrizione

Problem

Once #1033 lands, the CLI has two loops that poll a Cloud service's state:

Where Waits for Loop State check Timeout
cloud service delete --force (cloud/services.rs) stopped (or idle) hand-rolled loop + STOP_POLL_INTERVAL (5 s) classify_stop_poll_state: matches ServiceState::to_string() against string literals none
cloud udf attach --wake (cloud/udfs.rs, #1033) running generic wait_for + Outcome + UDF_POLL_INTERVAL (5 s) classify_wake_state: matches typed ServiceState variants SERVICE_WAKE_TIMEOUT (600 s)

They share only the progress renderer (PollProgress in cloud/shared.rs, moved there by #1033). cloud udf deploy (#1034) adds build and attachment waits on the UDF loop.

Proposal

  • Move wait_for and Outcome to cloud/shared.rs, next to PollProgress, with an optional timeout and a caller-supplied hint for the timeout message.
  • Put wait_for_service_running and classify_wake_state in cloud/services.rs, next to the stop poll.
  • Move service delete --force onto the shared loop with no timeout. classify_stop_poll_state returns Outcome and matches typed ServiceState variants instead of strings.
  • Use one interval constant.
  • delete --force keeps its output and exit codes; its existing tests pass unmodified.

Tests

  • Unit-test the shared loop: done, failed, timeout (with the caller's hint), no timeout.
  • classify_stop_poll_state covers every ServiceState variant, including Unknown.

Follows #1033.

Lingua principale
Rust
Stelle
80
Fork
9
Merge medio
3g 20h
PR unite (30g)
57

Preparare l'ambiente

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 ClickHouse/clickhousectl

Tutte le issue di ClickHouse/clickhousectl

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.