feat(cli): add jmp describe for exporters, leases, and clients - #1043
Merged
Conversation
Contributor
|
Warning Review limit reachedNext included review available in 49 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mangelajo
reviewed
Aug 31, 2026
mangelajo
left a comment
Member
There was a problem hiding this comment.
nice. can we add it to documentation? :)
Add a kubectl-style 'jmp describe' command group (alias: desc) with exporter, lease, and client subcommands. Default output is aligned plain-text key/value sections; -o json|yaml routes through model_print. 'describe client' reports token expiry and validity without ever printing token values, using a dedicated ClientDescription model for structured output. Assisted-by: Claude:claude-fable-5 Signed-off-by: Kirk Brauer <kirkebrauer@gmail.com>
…exporter The Lease block in `jmp describe exporter` could never render: GetExporter answers with the exporter alone, so `exporter.lease` was always None and a busy exporter reported "Lease: <none>". The tests hung a lease on the exporter themselves, which the server never does, so they covered it. Look the holding lease up through ListLeases instead, and pin it with a test that builds the exporter the way the server returns it. Documents the command in the distributed mode guide, where a user first needs to know which exporters exist and what to select on, and points the lease troubleshooting entry at it. Assisted-by: Claude Signed-off-by: Kirk Brauer <kirkebrauer@gmail.com>
kirkbrauer
force-pushed
the
cli-describe
branch
from
August 31, 2026 14:09
93786eb to
8022fa3
Compare
Member
Author
|
@mangelajo Added some docs and fixed a few additional issues I noticed from review. |
bennyz
approved these changes
Sep 1, 2026
kirkbrauer
added a commit
that referenced
this pull request
Sep 5, 2026
Preserve the exporter holding-lease fix from #1043 while retaining the opt-in lease device description. Document the CLI contract and cover YAML, unchanged metadata-only JSON, and device connection failures. Assisted-by: Pi:gpt-6-astra Signed-off-by: Kirk Brauer <kirkebrauer@gmail.com>
bennyz
pushed a commit
to bennyz/jumpstarter
that referenced
this pull request
Sep 8, 2026
## Summary
Add `--drivers` to `jmp describe lease` so users and IDE integrations
can discover a leased exporter's software driver clients and runnable
`j` commands without opening an interactive shell.
```sh
jmp describe lease <lease-name> --client <client-alias> --drivers
jmp describe lease <lease-name> --client <client-alias> --drivers -o json
```
- Human-readable output appends **Drivers** and **Commands** tables.
- JSON/YAML output with `--drivers` is `{lease, driver_tree}`. The
subtree contains a `drivers` list and recursive `cli_tree` with command
help and parameters.
- Without the flag, existing metadata-only behavior and output shape
remain unchanged.
- Introspection attaches to the existing lease using the selected
client's driver-access settings. It does not execute the listed driver
commands, create a lease, or release the existing lease.
- Includes usage documentation and regression coverage for JSON/YAML,
absent root CLI trees, unchanged metadata-only output, connection
failures, and compatibility aliases.
This supplies the missing CLI API for the VS Code extension's lease
driver tree. It does not add driver configuration schemas or
exporter-set administration.
## Terminology and compatibility
This was originally developed as `--devices` on an integration branch.
Before proposing it upstream, use **drivers**: the report describes
software driver instances, not an inventory of physical devices attached
to the exporter. There is deliberately no new `--devices` alias on this
command.
The shared library exposes `describe_drivers` /
`describe_drivers_async`, retaining the initial `describe_devices`
helper names as compatibility aliases. The existing `jmp admin get
exporter --devices`, Kubernetes `Exporter.status.devices`, and protobuf
report semantics are unchanged.
The terminology is historically mixed: `status.devices` dates to July
2024, while the protobuf was renamed from `DeviceReport` to
`DriverInstanceReport` that same month. The controller also uses
nil/non-nil `status.devices` for exporter registration state. A future
physical-device inventory or deprecation of that report needs a separate
compatibility design, not a silent reinterpretation here.
## Dependency / review scope
**Depends on jumpstarter-dev#1042; merge that first.** This branch includes its shared
introspection library and MCP refactor, so those prerequisite changes
are currently visible in the diff. After jumpstarter-dev#1042 lands, update this branch
to reduce the diff to the follow-on changes.
Review the CLI implementation/tests, distributed-mode guide, and
driver-named library helpers with their legacy aliases. The branch
includes current `main` (`ca3b4831`) and preserves the exporter
holding-lease fix from merged jumpstarter-dev#1043.
## Validation
- `make pkg-test-jumpstarter-cli` — 265 passed
- `make pkg-test-jumpstarter` — 827 passed (18 warnings)
- `make pkg-test-jumpstarter-mcp` — 33 passed
- `make lint-fix` — passed
- `make pkg-ty-jumpstarter-cli` — passed
Companion VS Code extension changes use the new driver-tree contract,
with a narrowly scoped fallback for older integration-branch CLIs; 227
unit and 72 integration tests pass there.
No live-cluster/hardware smoke test was performed.
---------
Signed-off-by: Kirk Brauer <kirkebrauer@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
jmp getanswers what exists; there was no way to ask about one of them in detail short of reading the raw object.Adds
jmp describe exporter|lease|client <name>, followingkubectl describe: a readable summary by default,-o json|yamlfor a machine. Describing an exporter reports the lease holding it, describing a lease reports its conditions, and describing a client reads the local config — so it works without a connection and says whether the token is still valid. The client description never emits token material.Documented in the distributed mode guide, where a user first needs to know which exporters exist and what to select on, and from the lease troubleshooting entry in the testing guide. The man page picks the commands up from click.