`openshell --gateway <name> status` exits 0 when the gateway was never registered
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
openshell --gateway <name> status の CLI ハンドラーから始め、未登録のゲートウェイをどのように処理するかをたどってください。issue ではソースファイルやテストファイルは指定されていません。コマンドの既存の終了コードのドキュメントとテストを確認し、未登録の場合のカバレッジを追加してください。完了条件は、その場合にゼロ以外の終了コードで終了し、ドキュメントに記載された終了コードで接続済みのゲートウェイと区別できることです。
索引モデルが issue の本文から書いたものです。
説明
User Story
I use OpenShell 0.1.5 to run two organisations' gateways on separate hosts, each brought up by a setup script.
I directly encountered this when bringing up the second host: the script asked status whether the gateway was registered and got exit 0 for a gateway that did not exist.
This affects any automation that uses the exit code of status to decide whether to register a gateway.
Problem Statement
openshell --gateway <name> status prints "No gateway configured" and exits 0 when no gateway with that name has been added on the machine. The exit code is the same as for a connected gateway, so a script cannot tell the two apart without parsing the human-readable output.
Impact / Why This Matters
A setup script that takes the exit code as the answer skips openshell gateway add on a fresh host. The failure then appears later and elsewhere: the next command that uses the gateway (in our case openshell --gateway org-a provider create …) fails with Unknown gateway 'org-a'. Hosts where the gateway was already registered never exercise this path, so the script looked correct until it met a new machine. The workaround today is to read the output and look for "Status: Connected".
Acceptance Criteria
-
openshell --gateway <name> statusexits non-zero when no gateway named<name>is configured - The documented exit codes of
statusdistinguish an unregistered gateway from a connected one
Reproduction Steps
- On a host where no gateway named
org-ahas been added, runopenshell --gateway org-a status; echo "exit=$?" - The output is
No gateway configured, followed byexit=0 - Run a command that uses the gateway, for example
openshell --gateway org-a provider create …; it fails withUnknown gateway 'org-a'
Suggested UX (if applicable)
No response
Environment
- OpenShell: openshell 0.1.5
- OS: Ubuntu 26.04.1 LTS, kernel 7.0.0-30-generic, Docker 29.1.3
- Deployment: local
openshell-gatewaywith the Docker driver under a systemd user unit, registered withopenshell gateway add https://127.0.0.1:<port> --local --name org-a
Context: found while running two OpenShell organisations against each other across two hosts (Discussion #4846).
Not a Contribution: shared for discussion only; not a Contribution under the Apache License 2.0.
Logs
- 主要言語
- Rust
- スター
- 21.1k
- フォーク
- 2.1k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 283
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/OpenShell のほかの issue
-
config preflight exits 0 on allow_unauthenticated_users = true対応中かも @ericcurtin が 3 日前に担当しました。 オープンstate:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
bug(python): OIDC refresh drops the gateway's oidc_scopes再び着手できるかも @jyotir07 が 10 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンstate:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
NVIDIA/OpenShell#4919 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: workspace access hint suggests a --subject command that fails for hyphen-leading OIDC subjects再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
NVIDIA/OpenShell の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
`nsh-core` fails to compile when taffy's default `calc` feature is enabled elsewhere in the graphオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
longbridge/nsh#966 ·
メンテナーはふだん 1 日以内に返信
-
Windows docs: pin a tested ConPTY version for Kitty graphics; 1.25.260930003 corrupts large uploadsオープン
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
raphamorim/rio#2021 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
hydro-project/infinity#187 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
near/near-sdk-rs#1676 ·
メンテナーはふだん 2 日以内に返信