print typed podlist for correct serialization#15411
Conversation
pkg/cmd/admin/node/listpods.go
Outdated
| errList = append(errList, err) | ||
| continue | ||
| } | ||
| err = json.Unmarshal(b, typedPod) |
There was a problem hiding this comment.
@fabianofranz not sure if we have a more streamlined way of converting from internal to external type?
There was a problem hiding this comment.
@deads2k would you suggest something different here?
There was a problem hiding this comment.
Why not just do a Get with the "right" type of client" a few lines up?
|
[test] |
|
@juanvallejo thanks! Could you add a test to avoid future regressions? |
|
re[test] |
f0d52c1 to
c100b12
Compare
|
@deads2k switched to using restclient and making "get" call directly, ptal |
pkg/cmd/admin/node/listpods.go
Outdated
| pods, err := l.Options.KubeClient.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{LabelSelector: labelSelector.String(), FieldSelector: fieldSelector.String()}) | ||
| pods := &kapiv1.PodList{} | ||
|
|
||
| restClient := l.Options.KubeClient.Core().RESTClient() |
There was a problem hiding this comment.
I was thinking more like, why don't you have an external client ado the .List() on that.
|
@deads2k thanks for the feedback; switched to using external client |
86349db to
79c27e1
Compare
|
This has to be back ported to 3.6 - are also of these changes necessary for
that?
…On Mon, Jul 24, 2017 at 5:47 PM, Juan Vallejo ***@***.***> wrote:
@deads2k <https://github.com/deads2k> thanks for the feedback; switched
to using external client
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15411 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p3wCKYpqFdMp02PfjjEL7m7uRUjwks5sRRDwgaJpZM4Ofxs6>
.
|
|
Evaluated for origin test up to 79c27e1 |
|
continuous-integration/openshift-jenkins/test Running (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/3465/) (Base Commit: 49df2d6) (PR Branch Commit: 79c27e1) |
|
continuous-integration/openshift-jenkins/test SUCCESS |
@smarterclayton Didn't break in the recent rebase? This change is more correct than the previous one and 30 lines isn't too bad. |
|
lgtm, squash /retest |
|
/test all |
|
/assign fabianofranz |
79c27e1 to
baf9b6e
Compare
|
/lgtm |
|
extended_conformance_gce flaked on #13973 /test extended_conformance_gce |
Pass a typed list of pods to the printer in order to have correctly serialized output.
baf9b6e to
62baba1
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, fabianofranz, juanvallejo Associated issue requirement bypassed by: deads2k The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/test extended_conformance_gce |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
@juanvallejo: The following tests failed, say
Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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 15447, 15411, 15483, 15478, 15481) |
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1473455
Pass a typed list of pods to the printer in order to have correctly
serialized output.
Before
After
cc @openshift/cli-review @smarterclayton