Skip to content
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

use legacy restmapper against undiscoverable servers #10058

Merged
merged 1 commit into from
Aug 2, 2016

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jul 27, 2016

Simple, coarse grained solution to https://bugzilla.redhat.com/show_bug.cgi?id=1360170#c4

@bparees inelegant, but easier than trying to fine tune fallback scenarios and it's easy to inspect.

@deads2k
Copy link
Contributor Author

deads2k commented Jul 27, 2016

[test]

if err != nil {
return false
}
if serverSemVer.LT(semver.MustParse("1.3.0")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work for origin and ose and kubernetes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work for origin and ose and kubernetes?

Yes, it checks the kube version and we know which levels of kube we shipped with each level of origin.

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 2ee6180

// enough discovery information avaiable to reliably build a RESTMapper. If not, use the
// hardcoded mapper in this client (legacy behavior)
func useDiscoveryRESTMapper(serverVersion string) bool {
serverSemVer, err := semver.Parse(serverVersion[1:])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this handle emptystring (or whatever values ServerVersion() can return for legacy servers)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this handle emptystring (or whatever values ServerVersion() can return for legacy servers)?

We never shipped a level that gave back empty string. If there was an error getting the version, we handle that before this call.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6998/)

@liggitt liggitt added this to the 1.3.0 milestone Jul 29, 2016
@deads2k
Copy link
Contributor Author

deads2k commented Aug 2, 2016

@bparees any further comment?

@liggitt
Copy link
Contributor

liggitt commented Aug 2, 2016

Does falling back to the legacy RestMapper mean we don't dynamically filter the all alias? Couldn't remember if those were connected

@deads2k
Copy link
Contributor Author

deads2k commented Aug 2, 2016

Does falling back to the legacy RestMapper mean we don't dynamically filter the all alias? Couldn't remember if those were connected

No, that's done by the shortcut expander layered on top.

@bparees
Copy link
Contributor

bparees commented Aug 2, 2016

@deads2k nope, lgtm.

@deads2k
Copy link
Contributor Author

deads2k commented Aug 2, 2016

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 2ee6180

@openshift-bot
Copy link
Contributor

openshift-bot commented Aug 2, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6998/) (Image: devenv-rhel7_4730)

@openshift-bot openshift-bot merged commit d694571 into openshift:master Aug 2, 2016
@deads2k deads2k deleted the use-legacy-mapper branch September 6, 2016 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants