Repository navigation
fix(cli): fail status for an unregistered named gateway - #5379
TaylorMutch merged 2 commits into
Conversation
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
|
@TaylorMutch @krishicks could you please triage #5250 so the issue check can pass? PTAL when you get a chance. Thank you! |
TaylorMutch
left a comment
There was a problem hiding this comment.
The fix is appropriately scoped: it propagates the existing unknown-gateway error for an explicit gateway selector, preserves the registration hint for status without a configured gateway, and adds a regression test alongside the existing no-gateway test. I found no correctness issue in the code change. Issue #5250 is now accepted.
Please add the exit-code documentation required by #5250 before merge. The "Inspect Gateway Status" section in docs/how-it-works/gateways/overview.mdx should explain that an unregistered named gateway produces a nonzero exit, while status without a gateway configured and without a selector still succeeds. This also applies to a name supplied through OPENSHELL_GATEWAY. Clarify that exit 0 alone does not guarantee connectivity: registered but disconnected gateways can still return 0, so scripts checking reachability should inspect the structured status output.
Validation: source and regression-test review only; I did not run the tests locally. Required CI must pass before merge.
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
|
/ok to test |
@TaylorMutch, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/ |
|
/ok to test fd37a72 |
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. cli — No explicit risk acceptance foundFor an unregistered name,
Review details
Advisory review; publication gates are unchanged. |
TaylorMutch
left a comment
There was a problem hiding this comment.
Approved at fd37a72. I explicitly accept the compatibility impact identified by the advisory review: selecting an unregistered gateway through --gateway or OPENSHELL_GATEWAY now returns a nonzero unknown-gateway error, including for JSON/YAML output, instead of a successful not_configured response. Failing early prevents automation from treating an invalid gateway name as a successful status check and fulfills issue #5250. That benefit outweighs preserving the previous behavior for existing probes. The documentation explains the exit semantics, regression coverage includes environment selection and structured status output, and all PR checks passed.
Summary
statusnow exits non-zero when--gateway <name>is not registered.Related Issue
Closes #5250
Changes
statusstill exits 0 with the registration hint.Testing
Checklist