`rfd-cli reserve` is slow / can timeout

Aperta
#609 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
graphql, rust
Ambito
backend, cli

Direzione di ricerca

Start by tracing the rfd-cli reserve request to the endpoint that finds and reserves the next RFD number, then inspect the REST pagination and timeout settings mentioned in the issue. Compare the proposed timeout, GraphQL, and asynchronous approaches; the issue leaves the solution open. Done means reserve completes without a timeout and the caller can obtain the new RFD number.

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

Descrizione

I attempted to use rfd-cli reserve and got a timeout:

% rfd-cli reserve --title "Code of Conduct"
  Communication Error: error sending request for url (https://rfd-api.shared.oxide.computer/rfd)

This is because the rfd-cli timeout is set to 10seconds and gave up before the work was completed on the backend. It succeeded successfully, but I had to go lookup my own new RFD number.


There are a couple ways we could improve this

  • increase the default rfd-cli timeout (current 10secs; job took just under 15seconds today)
  • switch from octorust REST pagination of all ~600 branch names (six pages; 6.2seconds) to GraphQL ordered by branch name descending (first page; ~1second)
  • make the endpoint async: splitting the find from the subsequent commit & push (3.3secs) returning the new RFD number early to the caller.
Lingua principale
Rust
Stelle
98
Fork
23
Merge medio
17h 47m
PR unite (30g)
13

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 oxidecomputer/rfd-api

Tutte le issue di oxidecomputer/rfd-api

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.