Enforce the API readiness timeout across RPC calls and retry delays

Aperta
#7,892 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
58/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start with src/cli/subcommands/wait_api_cmd.rs, where the readiness polling loop, Version RPC, and retry delay are identified. Trace how the loop applies --timeout and preserves the one-second request limit, then add coverage for late success, a failed poll near the deadline, and polling without an overall timeout. Done means each acceptance criterion passes.

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

Descrizione

Summary

The CLI API readiness command checks --timeout only before each poll in src/cli/subcommands/wait_api_cmd.rs. A Version RPC can return successfully after the timeout expires, and a failed poll can be followed by a retry sleep that extends beyond the timeout.

Required changes

Apply one overall deadline to the polling loop, including each RPC and retry delay. Retain the one-second per-request limit. When --timeout is omitted, continue polling until the API is available.

Acceptance criteria

  • A response received after the overall timeout is not reported as success.
  • A failed RPC and retry delay do not extend the command beyond the overall timeout.
  • Each RPC retains its one-second limit.
  • With no overall timeout, polling continues until success.
  • Tests cover a late successful response, a failed poll and retry delay near the deadline, and the no-timeout behavior.

This behavior predates the duration parser change in the linked pull request.

Requested by @LesnyRumcajs.

Pull request: https://github.com/ChainSafe/forest/pull/7890
Review comment: https://github.com/ChainSafe/forest/pull/7890#discussion_r4614361143

Lingua principale
Rust
Stelle
700
Fork
201
Merge medio
1g 17h
PR unite (30g)
65

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 ChainSafe/forest

Tutte le issue di ChainSafe/forest

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.