invalid_setting exits with 1 or 2 depending on the error class
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python, typescript
調査の方向性
Start with the exit code handling in src/selfgraph/cli.py and typescript/src/cli.ts, then trace how each CLI classifies errors by code or error class. Check the StoreError cases in src/selfgraph/stores/_cypher.py and typescript/src/stores/bolt.ts. Done means every invalid_setting error exits with code 2 in both CLIs, including the two reported cases.
索引モデルが issue の本文から書いたものです。
説明
What happens
docs/cli.md says a bad flag or setting exits with code 2. Some invalid_setting errors exit with 1, because the CLI picks the exit code from the error class, not the code. invalid_setting is raised both as ValidationError (exit 2) and as StoreError (exit 1):
| Command | Error | Exit |
|---|---|---|
--store falkordb --uri h:0 entity list |
error[invalid_setting]: invalid FalkorDB address ... |
2 |
--store neo4j --uri 'bolt://u:p/x@h:1' entity list |
error[invalid_setting]: the store URI has an unencoded character ... |
2 |
--store hydradb --uri http://127.0.0.1:1 entity list |
error[invalid_setting]: 'http://127.0.0.1:1' is not a Bolt URI; use bolt://host:port |
1 |
--store neo4j --uri bolt://u:[email protected]:1 entity list (Python) |
error[invalid_setting]: cannot open a Bolt driver for 'bolt://***@127.0.0.1:1': URI userinfo is not supported ... |
1 |
Both CLIs exit 1 for the http:// case. The userinfo case is Python only, because the TypeScript driver accepts userinfo. A script that treats exit 2 as "fix your settings" and exit 1 as "the server failed" retries the last two forever.
Reproduce
On 04862c4, run the commands above with selfgraph and node typescript/dist/cli.js, then check $?.
Expected
Every invalid_setting, and the other input codes, exits with 2 whatever class raised it. For example, decide the exit code from exc.code, or raise these two as ValidationError.
Where
src/selfgraph/stores/_cypher.py,bolt_driver:StoreError(..., code="invalid_setting", field="uri")for a non-Bolt scheme and for a driver that rejects the URIsrc/selfgraph/cli.py,_USAGE_ERRORSand the exit code inmain- The same in
typescript/src/stores/bolt.tsandtypescript/src/cli.ts
- 主要言語
- TypeScript
- スター
- 173
- フォーク
- 58
- 平均マージ
- 6時間
- マージ済み PR(30日)
- 120
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hydra-db/selfgraph のほかの issue
-
approved-for-pr area: cli-mcp area: errors bug effort: S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
hydra-db/selfgraph#401 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
approved-for-pr area: errors area: store bug effort: S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
hydra-db/selfgraph#398 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
approved-for-pr area: errors area: write bug effort: S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
hydra-db/selfgraph#392 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
approved-for-pr area: parity area: write bug effort: S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hydra-db/selfgraph#391 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
hydra-db/selfgraph の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
code-yeongyu/senpi#7139 ·
メンテナーはふだん 1 日以内に返信
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
lingdojo/kana-dojo#34395 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mastra-ai/mastra#31093 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:web p2 product:business triage:active type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 89/100
cuadrao-ai/argus#2328 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nikhilb2/simple_invoicing#907 ·