You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flips the default rendering of a named kuke get <kind> <name> from the full resource document to a single table row (same columns as the list view, filtered to one element) across all 10 kinds β completing the kubectl-parity story epic planning: kuke get β output revamp, selector, image as first-class kindΒ #601 started. The full document stays reachable via -o yaml / -o json, and -o wide renders the single wide row where the kind defines wide columns.
Mechanically, each subcommand's singular printer now routes yaml/json to the document printer and table/wide to the existing list renderer with a one-element slice. Seven kinds (realm, space, stack, blueprint, config, secret, volume) feed the list renderer's format-driven path; the three wide bool-plumbed kinds (cell, container, image) thread the wide flag through. Each -o help string updated from yaml for single resource β table for single resource.
Per the invocation argument ("update cli dox for use case also"), this PR also lands the docs the issue body had deferred to a separate documentation follow-up: docs/cli-use-cases.md and docs/site/cli/kuke-get.md. Gate-vs-flip note for the reviewer: the docs were bundled here because the user explicitly requested it in this session; the issue body's "separate follow-up" remains the default if you'd prefer to split.
Notes on non-obvious calls
Not-found handling, scope-flag requirements, and selector/name mutual-exclusion are untouched β only the rendering of a found element changes.
container's named branch builds the single-element []ContainerSpec + containerProbe map the list renderer expects, backfilling scope coordinates the daemon may leave unset (mirrors the list path's defensive backfill).
image's named branch wraps res.Image in a one-element ListImagesResult{Realm, Images} for the list renderer.
Test plan
make test (full CI suite, test-root + test-kukebuild) β exit 0, no failures
go vet ./cmd/kuke/get/... β clean
gofmt -l cmd/kuke/get/ β clean
Per-kind named-get tests added covering the single-row path (table + wide where applicable) and the preserved -o yaml / -o json document path for all 10 kinds (realm, space, stack, blueprint, config, secret, volume, cell, container, image)
Updated the image package's prior β¦YAMLDefault test to the new contract (default β table row; document via -o yaml)
PR #1331 Review β feat: render named kuke get <kind> <name> as a single table row
Clean, consistent kubectl-parity flip across all 10 kinds β yaml/json route to the document printer, table/wide reuse the existing list renderer with a one-element slice. I verified the two trickier call sites (container, image) where the branch moved to the call site: arg order matches the printContainersWithState / printImages signatures, and wide + scope vars are all in scope. All commits signed, CI green, every test-plan box ticked, breaking UX change documented in both cli-use-cases.md and kuke-get.md. No security surface.
One non-blocking nit:
Dead casecmd/kuke/get/image/image.go:~545: printImage's case OutputFormatTable branch is now unreachable β the named path only routes yaml/json to printImage. Private and harmless (it maps to PrintYAML like the default anyway); collapse into the default if touching this again.
PR #1331 Review (second reviewer) β feat: render named kuke get <kind> <name> as a single table row
Concur with the first reviewer β LGTM, no blocking items. Verified independently: the three wide-bool kinds (cell/container/image) call their list renderers with signatures identical to the list paths, and the seven format-driven kinds pass OutputFormatWide straight through (printRealms & co. honor it via wide := format == OutputFormatWide), so -o wide parity holds across all 10. Container scope-backfill mirrors the list path, all guards (MetadataExists/ContainerExists) precede the print, no nil-deref. Cross-PR check clean (merge-base == baseRefOid, no sibling touched these files), commit signature valid. The breaking UX flip (named get β table by default) is documented with -o yaml migration guidance in both the PR body and the two docs files. Leaving ready-to-merge as-is.
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
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.
Summary
kuke get <kind> <name>from the full resource document to a single table row (same columns as the list view, filtered to one element) across all 10 kinds β completing the kubectl-parity story epic planning: kuke get β output revamp, selector, image as first-class kindΒ #601 started. The full document stays reachable via-o yaml/-o json, and-o widerenders the single wide row where the kind defines wide columns.yaml/jsonto the document printer andtable/wideto the existing list renderer with a one-element slice. Seven kinds (realm, space, stack, blueprint, config, secret, volume) feed the list renderer'sformat-driven path; the threewide bool-plumbed kinds (cell, container, image) thread thewideflag through. Each-ohelp string updated fromyaml for single resourceβtable for single resource.documentationfollow-up:docs/cli-use-cases.mdanddocs/site/cli/kuke-get.md. Gate-vs-flip note for the reviewer: the docs were bundled here because the user explicitly requested it in this session; the issue body's "separate follow-up" remains the default if you'd prefer to split.Notes on non-obvious calls
container's named branch builds the single-element[]ContainerSpec+containerProbemap the list renderer expects, backfilling scope coordinates the daemon may leave unset (mirrors the list path's defensive backfill).image's named branch wrapsres.Imagein a one-elementListImagesResult{Realm, Images}for the list renderer.Test plan
make test(full CI suite,test-root+test-kukebuild) β exit 0, no failuresgo vet ./cmd/kuke/get/...β cleangofmt -l cmd/kuke/get/β clean-o yaml/-o jsondocument path for all 10 kinds (realm, space, stack, blueprint, config, secret, volume, cell, container, image)β¦YAMLDefaulttest to the new contract (default β table row; document via-o yaml)Closes #1323