Skip to content

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

Merged
merged 2 commits into from
Apr 24, 2017
Merged

Prefer legacy kinds #13791

merged 2 commits into from
Apr 24, 2017

Conversation

ncdc
Copy link
Contributor

@ncdc ncdc commented Apr 17, 2017

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

@smarterclayton
Copy link
Contributor

[test]

ncdc added 2 commits April 18, 2017 10:21
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.
@ncdc ncdc force-pushed the prefer-legacy-kinds branch from 907bf7b to 164216c Compare April 18, 2017 14:21
@ncdc
Copy link
Contributor Author

ncdc commented Apr 18, 2017

[test] #13802

@ncdc
Copy link
Contributor Author

ncdc commented Apr 18, 2017

@stevekuznetsov I think I just hit #13713 - not sure if that's been resolved?

[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 164216c

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/790/) (Base Commit: 8ad762c)

@ncdc
Copy link
Contributor Author

ncdc commented Apr 18, 2017

About time I got a clean run. @smarterclayton @pweil- @mfojtik @soltysh @Kargakis @sttts @liggitt @deads2k any comments?

// 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
Copy link
Contributor

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.

@smarterclayton
Copy link
Contributor

LGTM [merge]

@stevekuznetsov
Copy link
Contributor

@ncdc working on resolving that one

@mfojtik
Copy link
Contributor

mfojtik commented Apr 19, 2017

flake: #13650

[merge]

@ncdc
Copy link
Contributor Author

ncdc commented Apr 19, 2017

Multiple issues:

+ sudo python hack/determine_install_upgrade_version.py atomic-openshift-utils-3.6.30-1.git.0.d88b698.el7.noarch
python: can't open file 'hack/determine_install_upgrade_version.py': [Errno 2] No such file or directory
++ export status=FAILURE
++ status=FAILURE
+ set +o xtrace
########## FINISHED STAGE: FAILURE: INSTALL ANSIBLE ATOMIC-OPENSHIFT-UTILS ##########
+ cd /home/origin
+ sudo chmod a+x /etc/ /etc/origin/ /etc/origin/master/
chmod: cannot access ‘/etc/origin/’: No such file or directory
chmod: cannot access ‘/etc/origin/master/’: No such file or directory
++ export status=FAILURE
++ status=FAILURE
+ set +o xtrace
########## FINISHED STAGE: FAILURE: EXPOSE THE KUBECONFIG ##########
PLAY [sync the remote host with code from the remote repository] ***************

TASK [Gathering Facts] *********************************************************
fatal: [172.18.13.56]: UNREACHABLE! => {
    "changed": false, 
    "generated_timestamp": "2017-04-19 11:40:20.572697", 
    "msg": "Failed to connect to the host via ssh: ssh: connect to host 172.18.13.56 port 22: Connection refused\r\n", 
    "unreachable": true
}

[merge]

@ncdc
Copy link
Contributor Author

ncdc commented Apr 20, 2017

[merge]

@ncdc
Copy link
Contributor Author

ncdc commented Apr 21, 2017 via email

@ncdc
Copy link
Contributor Author

ncdc commented Apr 21, 2017 via email

@ncdc
Copy link
Contributor Author

ncdc commented Apr 22, 2017 via email

@smarterclayton
Copy link
Contributor

smarterclayton commented Apr 23, 2017 via email

@ncdc
Copy link
Contributor Author

ncdc commented Apr 24, 2017

[merge]

1 similar comment
@ncdc
Copy link
Contributor Author

ncdc commented Apr 24, 2017

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 164216c

@openshift-bot
Copy link
Contributor

openshift-bot commented Apr 24, 2017

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)

@openshift-bot openshift-bot merged commit d41996f into openshift:master Apr 24, 2017
@ncdc
Copy link
Contributor Author

ncdc commented Apr 24, 2017

About time

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.

5 participants