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
kubectl get broken for list #38907
Comments
@fabianofranz maybe we need to include this in #38768? |
@ymqytw what't the get response? I mean we really get all resources or just issue with printer. |
@adohe I guess it's printer's issue. But I'm not sure how printer works for list of resources. |
Done. |
Is this also broken in 1.5, i.e. a regression?
…On Mon, Dec 19, 2016 at 2:33 PM, Fabiano Franz ***@***.***> wrote:
maybe we need to include this in #38768
<#38768>?
Done.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#38907 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p7qUdxqFMvpNQuTG5kJ9O_C3yFNrks5rJtwXgaJpZM4LPpUo>
.
|
Yes, it is also broke in 1.5. |
Setting priority and adding cherry pick candidate. This would break people using scripting. |
Can someone take ownership to fixing this and getting it into the 1.5.x track? |
@smarterclayton I would fix this today. |
@kubernetes/sig-cli-misc the root cause is: we retrieve a list from server, and then we flatten the list , get multiple |
Looks like this behavior was changed in #36085. I think the fix is to check |
And add a test so it doesn't break again! :)
…On Tue, Dec 20, 2016 at 12:11 PM, Andy Goldstein ***@***.***> wrote:
Looks like this behavior was changed in #36085
<#36085>. I think the fix is
to check len(infos) instead of looking at singular, as singular is going
to report true when you do kubectl get -f <file> (and it looks like that
hasn't changed from before).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#38907 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_pxwIXAqepc5TVhN8PRqIgmDE2iG6ks5rKAw4gaJpZM4LPpUo>
.
|
I can fix this if you would like me to, @adohe? |
My suggestion above breaks other tests. Trying to figure out what's up. |
Ah I see what it is. We still need to check singular and go into the list code path if it's |
@ncdc thanks very much :) |
Automatic merge from submit-queue Fix kubectl get -f <file> -o <nondefault printer> so it prints all items in the file **What this PR does / why we need it**: Fix kubectl get -f <file> -o <nondefault printer> so it prints all the objects in the file, instead of just the first one. Also add a test for this feature. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #38907 **Special notes for your reviewer**: **Release note**: ```release-note ``` cc @adohe @deads2k @liggitt @fabianofranz @kubernetes/kubectl @kubernetes/sig-cli-misc
kubectl get -o yaml|json is broken for list.
How to reproduce:
Create multiple resource from list:
kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/testdata/multi-resource-list.json
.Get the resources back:
kubectl get -o yaml -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/testdata/multi-resource-list.json
Output:
Only the first resource get printed out.
@kubernetes/kubectl @kubernetes/sig-cli-misc
The text was updated successfully, but these errors were encountered: