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

fix: two more 'services stop' hints print a command without --yes

Chiusa Adatta ai principianti
#617 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Una pull request collegata è già stata integrata.

  • #604 di @jussielo-amd — integrata

Valutazione

Difficoltà
2/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Inizia dai due suggerimenti stampati: il messaggio rocm services stop {} vicino a apps/rocm/src/main.rs:7210 e il messaggio {remote_cli} services stop {service_id} vicino a apps/rocm/src/remote/mod.rs:732. Confrontali con il controllo di approvazione in run_approved_service_action e con la forma canonica verificata da service_actions_require_yes_and_render_sandbox_result. È completato quando entrambi i suggerimenti includono --yes e i test esistenti in main.rs:30676 e remote/mod.rs:1545 sono resi più rigorosi per controllare il comando completo.

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

Descrizione

bug

Bug

Two more places print a rocm services stop <id> hint without --yes, the same drift #417 and #601 fixed in the serve summary's stop row. run_approved_service_action refuses any stop/restart that omits --yes, so both of these teach a command the CLI then rejects:

  • apps/rocm/src/main.rs:7210 — the "already running without auth" bail message tells the user to stop it with rocm services stop {} (no --yes).
  • apps/rocm/src/remote/mod.rs:732 — the "reused service" bail message tells the user to run {remote_cli} services stop {service_id} (no --yes).

Both are real, user-facing instances of the same bug class identified during review of #601. Their existing tests (main.rs:30676, remote/mod.rs:1545) only check a substring of the message, so neither would catch this.

Suggested fix

Same minimal fix as #601: add --yes to both printed hints, matching the canonical form service_actions_require_yes_and_render_sandbox_result already asserts the approval gate recommends.

#601 also raised a related non-blocking suggestion: the stop/restart hint is currently formatted by hand in at least eight call sites across main.rs and remote/mod.rs. A shared stop_hint(service_id) / restart_hint(service_id) helper, in the spirit of run_approved_service_action's own advice already being derived from the same value the branch is taken on, would prevent this class of drift going forward rather than only fixing today's two instances.

References

  • #417 (original serve-summary drift)
  • #601 (serve-summary fix; surfaced these two during review)
Lingua principale
Rust
Stelle
46
Fork
13
Merge medio
3g 22h
PR unite (30g)
148

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 ROCm/rocm-cli

Tutte le issue di ROCm/rocm-cli

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.