Skip to content

fix(cli): print a GVK as group/version/Kind - #1

Merged
rogirun merged 2 commits into
mainfrom
fix/cli-gvk-format
Oct 5, 2026
Merged

rogirun merged 2 commits into
mainfrom
fix/cli-gvk-format

Conversation

@rogirun

@rogirun rogirun commented Oct 5, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

The CLI printed a GVK the way apimachinery renders it, kubeflow.org/v1, Kind=PyTorchJob, which reads as a Go struct dump. It now prints group/version/Kind, for example kubeflow.org/v1/PyTorchJob, and v1/Pod for the core group.

The new definitions.FormatGVK is used wherever the CLI names a type: resolver errors, the cluster collision warning, the no-definition error, and the kli definitions --group/--kind miss. The kli validate success line also labels it GVK: instead of maps:

Before: OK: my-karta.yaml is a valid Karta definition (maps kubeflow.org/v1, Kind=PyTorchJob)
After:  OK: my-karta.yaml is a valid Karta definition (GVK: kubeflow.org/v1/PyTorchJob)

Output change: the gvk field of the kli describe -o json no-definition payload uses the new format. The design doc marks the JSON shape unstable until v1, but a script that parses this field will see the change.

Related issue(s)

Part of dsx-ai-factory#411. Upstream PR: dsx-ai-factory#422.

Checklist

  • All commits are signed off with DCO (git commit -s)
  • New/modified files have SPDX license and copyright headers
  • Documentation updated (if applicable)
  • Tests pass (make check)
  • No proprietary or internal information included

apimachinery renders a GVK as "group/version, Kind=Kind", which reads as a
Go struct dump. The CLI now prints group/version/Kind, the apiVersion a
manifest carries followed by its kind, wherever it names a type: resolver
errors, the collision warning, the no-definition error and the
definitions --group/--kind miss. The kli validate success line labels it
"GVK:" instead of "maps".

The gvk field of the describe -o json no-definition payload changes format
with it.

Part of dsx-ai-factory#411

Signed-off-by: Roee Gil <roee.gil@run.ai>
The core group is the empty string, so a kind-only definitions filter in
it rendered as "/Pod" in the no-match message. It now renders the kind
alone.

Part of dsx-ai-factory#411

Signed-off-by: Roee Gil <roee.gil@run.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant