-
Notifications
You must be signed in to change notification settings - Fork 14
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
Get working with k8s.core 2 and above #34
Conversation
@Andersson007 @mnecas this is what I've managed so far. The unit tests for 2.9 are failing and some are being skipped for the rest. Would appreciate some eyes as this is obviously a large breaking change and working with python isn't my day job. But its a start... :) |
@snecklifter thanks for the PR! |
also this definitely requires manual testing |
Several important things:
|
This all makes sense to me, would just appreciate some input on the failing tests if anyone has the bandwidth. |
OK, i'll try to take a look on Monday |
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.
I did the initial review, and the code looks OK in general. However, tests still reference the openshift
Python library, which is strange since requirements do not list it anymore. So I guess this is something that still needs to be updated, right?
As for the failing tests on Ansible 2.9, I think the ansible-test's import machinery has troubles with the symlinks. I am not 100% sure, but since the kubernetes.dynamic
is a symlink to the kubernetes.base.dynamic
, this seems to be a reasonable explanation. Fixing this could be fun since Ansible 2.9 is in security-fixes-only maintenance mode.
Do note that the same tests also fail on kubernetes.core
. Not sure why its CI did not pick this, though.
All in all, I think this PR is one significant step in the right direction. Thank you, @snecklifter, for your effort. It is greatly appreciated!
@@ -2,15 +2,14 @@ | |||
__metaclass__ = type | |||
|
|||
import pytest | |||
import openshift.dynamic |
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 is a bit strange. I thought collection does not use openshift client anymore?
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.
@tadeboro its a good point, I hit lots of errors when moving to kubernetes.dynamic so thought I'd break down into two changesets but am re-attempting to debug the original errors now.
openshift.dynamic.Resource.search = MagicMock() | ||
openshift.dynamic.Resource.watch = MagicMock() |
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.
Again, do we still need openshift client?
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.
See above, thanks for the review, much appreciated.
126f396
to
17ece39
Compare
- Drop Python 2 support - Use kubernetes.core - Migrate from OpenShift to Kubernetes for some tests
17ece39
to
0c28bea
Compare
Hi everyone, @snecklifter are you still motivated in working on this issue ? |
I more or less stopped using Ansible and following the things happening in the community, so it would be better to find a reviewer with more up-to-date Ansible and community knowledge. |
SUMMARY
Fixes #33
ISSUE TYPE