-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(serving): Update GVK on objects within a ResourcePrinter. #153
Conversation
This is an alternate solution to knative#134 for fixing knative#133. In this commit the update of the GVK coordinates are moved to the resource printer.
Hi @rhuss. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@cppforlife this is an alternative solution to #133 which moves the update of the GVK to the printer itself on every print. Tbh, I don't see much benefit over #134, one now has now instantiated a specialized ResourcePrinter around the printer obtained from cli-runtime, instead of updating the GVK before printing out the object. It has no less code and adds one layer more over the printer. Also, you would need now create different printers based on which scheme (v1alpha1 or v1beta1) the objects are that you want to print, instead of reusing a generic printer usable for every object. |
Group: "knative.dev", | ||
Version: "v1alpha1", | ||
Kind: "Revision"}) | ||
printer = printers.NewGvkUpdatePrinter(printer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #134 you would call out to serving.UpdateGroupVersionKind()
instead of wrapping the printer, which calls this method on print. Still, you have a specialized handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we hide printers.NewGvkUpdatePrinter(printer)
in revisionDescribePrintFlags.ToPrinter()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, let me align it with the service handling.
/assign cppforlife |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rhuss If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Using #134, closing this one. |
This is an alternate solution to #134 for fixing #133. In this commit
the update of the GVK coordinates are moved to the resource printer.