-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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
outputs <none>
for colums not found
#51750
outputs <none>
for colums not found
#51750
Conversation
33aa958
to
00620d9
Compare
/approve no-issue |
/assign @janetkuo @kubernetes/sig-cli-maintainers |
00620d9
to
4f2894c
Compare
/unassign @dims |
3a7c7c1
to
23b59c7
Compare
23b59c7
to
75fd7a2
Compare
75fd7a2
to
3756859
Compare
3756859
to
091a9df
Compare
/retest |
/lgtm |
/approve no-issue |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, janetkuo, jianhuiz Associated issue requirement bypassed by: janetkuo The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 51750, 53195, 53384, 53410). If you want to cherry-pick this change to another branch, please follow the instructions here. |
@jianhuiz: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Automatic merge from submit-queue (batch tested with PRs 16885, 17023). UPSTREAM: 51750: output `<none>` for colums not found Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1505796 Picks changes introduced in kubernetes/kubernetes#51750 to allow the custom-columns to succeed / print all known column values even when an object's field does not exist. **Before** ``` $ oc get dc mydc -o custom-columns=NAME:.metadata.name,UNKNOWN:.metadata.unknown error: unknown is not found ``` **After** ``` $ oc get dc mydc -o custom-columns=NAME:.metadata.name,UNKNOWN:.metadata.unknown NAME UNKNOWN mydc <none> ``` cc @openshift/cli-review
What this PR does / why we need it:
outputs
<none>
for columns specified by-o custom-columns
but not found in objectcurrently kubectl outputs an error of "xxx is not found" when a column is not in the returned json (omitted because of empty value or no such field in the object type at all). This PR suppress this error but outputs
<none>
at that field. This makes it convenient to output the objects details, especially when getting objects of different type in one command.example:
Special notes for your reviewer:
Release note:
@kubernetes/kubectl-reviewers