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 printer functions to use int64 and string explicitly #110408
Conversation
not sure this is the proper fix, holding it until then /hold |
@@ -633,7 +633,7 @@ func DeepCopyJSONValue(x interface{}) interface{} { | |||
clone[i] = DeepCopyJSONValue(v) | |||
} | |||
return clone | |||
case string, int64, bool, float64, nil, encodingjson.Number: | |||
case string, int, int64, bool, float64, nil, encodingjson.Number: |
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.
seems related golang/go#23573 (comment)
printers should use int64 to avoid a panic from DeepCopyJSONValue
/hold cancel |
/assign @roycaihw |
/lgtm |
Nice - thanks! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tkashem, wojtek-t 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 |
…0408-k8s-release-1.22 Automated cherry pick of #110408: apiserver: printers should use int64
…0408-k8s-release-1.24 Automated cherry pick of #110408: apiserver: printers should use int64
…0408-k8s-release-1.23 Automated cherry pick of #110408: apiserver: printers should use int64
What type of PR is this?
/kind bug
What this PR does / why we need it:
if you enable
omitManagedFields
for aaudit.k8s.io/Policy
object thenTableRow.DeepCopy()
throws a panic for some objects.DeepCopyJSONValue
panics withcannot deep copy int
error because it does not allow forint
kubernetes/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go
Lines 636 to 640 in 59ffc93
This PR fixes the printer functions to use
int64
andstring
when elements from an object are appended toTableRow.Cells
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: