Repository navigation
fix(cli): print a GVK as group/version/Kind - #1
Merged
Merged
Conversation
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>
5 tasks done
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.
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 printsgroup/version/Kind, for examplekubeflow.org/v1/PyTorchJob, andv1/Podfor the core group.The new
definitions.FormatGVKis used wherever the CLI names a type: resolver errors, the cluster collision warning, the no-definition error, and thekli definitions --group/--kindmiss. Thekli validatesuccess line also labels itGVK:instead ofmaps:Output change: the
gvkfield of thekli describe -o jsonno-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
git commit -s)make check)