-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Prefer legacy kinds #13791
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
Prefer legacy kinds #13791
Conversation
[test] |
We need to prefer legacy kinds so that calls to ObjectKinds(obj) and resource.Mapper.InfoForObject() (used by oc run and oc expose) return the legacy kinds for backwards compatibility against servers that don't have the new api groups.
907bf7b
to
164216c
Compare
[test] #13802 |
@stevekuznetsov I think I just hit #13713 - not sure if that's been resolved? [test] |
Evaluated for origin test up to 164216c |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/790/) (Base Commit: 8ad762c) |
// We currently add legacy types first to the scheme, followed by the types in the new api | ||
// groups. We have to check all ObjectKinds and not just use the first one returned by | ||
// ObjectKind(). | ||
gvks, _, err := kapi.Scheme.ObjectKinds(obj) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
var targetVersion *unversioned.GroupVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is really confused at this point - Codecs.CodecForVersions accepts a runtime.GroupVersioner (which gvks satisfies) which should be enough to ensure you get the right object, so you shouldn't have to pass a single target version (you can instead pass multiple). And it raises the question about whether we should even be using this logic for templates vs dealing with unstructured.
However, I guess it can stand for now.
LGTM [merge] |
@ncdc working on resolving that one |
flake: #13650 [merge] |
Multiple issues:
[merge] |
[merge] |
[merge]
…On Fri, Apr 21, 2017 at 7:21 AM OpenShift Bot ***@***.***> wrote:
continuous-integration/openshift-jenkins/merge FAILURE (
https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/405/)
(Base Commit: b95420a
<b95420a>
)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13791 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAABYnZKYRKJWnLqCk2KNMllRqmKlChWks5ryJE-gaJpZM4M_elf>
.
|
[merge]
…On Fri, Apr 21, 2017 at 9:05 AM OpenShift Bot ***@***.***> wrote:
continuous-integration/openshift-jenkins/merge FAILURE (
https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/406/)
(Base Commit: b95420a
<b95420a>
)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13791 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAABYsRIt7-4IyUyX-elP5V5vVU23K5jks5ryKmggaJpZM4M_elf>
.
|
[merge]
…On Sat, Apr 22, 2017 at 1:35 AM OpenShift Bot ***@***.***> wrote:
continuous-integration/openshift-jenkins/merge FAILURE (
https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/410/)
(Base Commit: c106caf
<c106caf>
)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13791 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAABYp3wbKYVNRnrKlCfmIxaPWX9mqYJks5ryOWfgaJpZM4M_elf>
.
|
[merge]
…On Sat, Apr 22, 2017 at 8:05 AM, OpenShift Bot ***@***.***> wrote:
continuous-integration/openshift-jenkins/merge FAILURE (
https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/428/)
(Base Commit: c106caf
<c106caf>
)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13791 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p2WaAGftQxA31OmNsSUq4tBzYu_-ks5ryez_gaJpZM4M_elf>
.
|
[merge] |
1 similar comment
[merge] |
Evaluated for origin merge up to 164216c |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/458/) (Base Commit: 53a4d1b) (Image: devenv-rhel7_6172) |
About time |
We need to prefer legacy kinds so that calls to ObjectKinds(obj)
and resource.Mapper.InfoForObject() (used by oc run and oc expose)
return the legacy kinds for backwards compatibility against servers that
don't have the new api groups.
Fixes bug 1441755
https://bugzilla.redhat.com/show_bug.cgi?id=1441755