oc should not fail during version negotiation against kube server#10824
oc should not fail during version negotiation against kube server#10824openshift-bot merged 2 commits intoopenshift:masterfrom
Conversation
Try to fetch both, starting with Kube
Return the requested version from the client and let the failure happen later. Needs to be revisited in the future once we have better control over the negotiation process.
|
[test] |
|
Spawned from #10821 |
|
Will look tonight |
|
[test] #8427 |
|
Evaluated for origin test up to e2a63d2 |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8725/) |
| return | ||
| } | ||
|
|
||
| ocVersionBody, err := oClient.Get().AbsPath("/version/openshift").Do().Raw() |
There was a problem hiding this comment.
won't the oClient, kClient, err := o.Clients() call above fail on a non-openshift server?
There was a problem hiding this comment.
not anymore. The only failure was from negotiation - david and I discussed
and it seemed reasonable that if you can't hit /oapi we might as well just
use whatever you passed - subsequent calls will really fail.
On Tue, Sep 6, 2016 at 9:10 PM, Jordan Liggitt notifications@github.com
wrote:
In pkg/cmd/cli/cmd/version.go
#10824 (comment):@@ -128,38 +128,37 @@ func (o VersionOptions) RunVersion() error {
return
}
ocVersionBody, err := oClient.Get().AbsPath("/version/openshift").Do().Raw()won't the oClient, kClient, err := o.Clients() call above fail on a
non-openshift server?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openshift/origin/pull/10824/files/e2a63d2b900e2b5da5ba40d13651444f35d49e3a#r77746479,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p6W3M9jgd2KfpCw8jcB_NSmuzmlgks5qng8bgaJpZM4J2Nxd
.
|
LGTM |
|
[merge] |
|
Evaluated for origin merge up to e2a63d2 |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8725/) (Image: devenv-rhel7_4989) |
|
Cute |
If /oapi is not found, properly exit. Also don't shortcircuit in version
@liggitt review please for 1.3