`rfd-cli reserve` is slow / can timeout

オープン
#609 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
graphql, rust
領域
backend, cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Rust
スター
98
フォーク
23
平均マージ
17時間 47分
マージ済み PR(30日)
13

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oxidecomputer/rfd-api のほかの issue

oxidecomputer/rfd-api の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。