steno panics too much on consumers' mistakes

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
rust

調査の方向性

まず、Steno における unwrap()、panic!()、expect() の使用箇所を監査します。特に、issue で説明されている出力検索のケースを重点的に確認してください。consumer の誤った使用と内部不変条件の違反を切り分け、saga が運用上のエラーをどのように伝播させるかを追跡します。完了の基準は、該当する consumer の誤りが、十分なデバッグ情報を伴う処理済みの運用上のエラーを返し、一方で意図的な不変条件による panic は引き続き正当化されていることです。

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

説明

Steno currently panics when the consumer does certain things that violate our constraints. This includes things like looking up an output for a node that your node doesn't depend on. These are programmer errors, but they can be safely handled while still producing adequate debugging information.

It seems easy to have these happen in practice (by copying/pasting the wrong thing). It's really bad when sagas panic (since they will be recovered and panic again). Consumers already have to propagate operational errors that they can't directly handle (e.g., failure to deserialize an output from a previous node). Given all this, we may as well turn this particular example into a handled operational error. We should audit other uses of unwrap(), panic!(), and expect() for situations like this.

I'm not saying we shouldn't ever panic in Steno. But we may want to limit this to internal invariant violations, not incorrect usage.

主要言語
Rust
スター
174
フォーク
15
平均マージ
1日 23時間
マージ済み PR(30日)
8

環境構築

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

はじめの一歩

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

oxidecomputer/steno のほかの issue

oxidecomputer/steno の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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