-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix instantiation of action plugin test to support Ansible 2.3 #3919
Fix instantiation of action plugin test to support Ansible 2.3 #3919
Conversation
requirements.txt
Outdated
@@ -1,6 +1,6 @@ | |||
ansible==2.2.2.0 |
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.
As noted in the PR description, unpinning is just to see green tests with latest Ansible (2.3), to demonstrate that the original issue is being addressed.
I'm not opposed to leaving versions pinned. One observation, though, is that it would be reasonable to verify that the versions we pin are available on the systems we support (RHEL, CentOS, ...), because even though we install these using pip
in tests, we, in many contexts, expect users to install the dependencies via rpm
.
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.
Agreed; actually I think it would be wise to pin the versions that we ship in the official openshift-ansible image (and change them in lockstep as much as possible). Eventually maybe customers will just use that and all this Ansible version madness will be over.
requirements.txt
Outdated
@@ -1,6 +1,6 @@ | |||
ansible==2.2.2.0 |
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.
Agreed; actually I think it would be wise to pin the versions that we ship in the official openshift-ansible image (and change them in lockstep as much as possible). Eventually maybe customers will just use that and all this Ansible version madness will be over.
Yeah, +1 to making this PR bump the rpm requirement too. Should we leave this WIP until each team has done some more testing on their own and if necessary added commits to this PR for any changes they've found necessary to move to 2.3? |
74708ed
to
9e8ffde
Compare
In Ansible 2.3+, the base action plugin class' run method depends on accessing attributes (check_mode) of its play_context. In older versions play_context was not involved in run, and thus None was passed in.
9e8ffde
to
590d6c1
Compare
As discussed on IRC, I dropped the second commit so that we stay pinned on Ansible 2.2.2.0. Next we'll make sure other parts work well with 2.3, then pin on 2.3 for tests and on the RPM spec. |
[test] |
Evaluated for openshift ansible test up to 590d6c1 |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_openshift_ansible/30/) (Base Commit: 54f32cf) |
aos-ci-test |
aos-ci-test |
[merge] |
Seems to be another case of this flake openshift/origin#13731 [merge] |
Flake openshift/origin#13814 [merge] |
Evaluated for openshift ansible merge up to 590d6c1 |
continuous-integration/openshift-jenkins/merge FAILURE (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_openshift_ansible/249/) (Base Commit: 14dbd7c) |
openshift/origin#13833, apparently bug in the CI code. Given
Will use the temporary exception to merge this manually. |
In Ansible 2.3+, the base action plugin class' run method accesses attributes (check_mode) of its play_context.
In older versions play_context was not involved in run, and thus None was passed in.
Note: the second commit, reverting the pinning of test requirements, is meant to demonstrate how we can run with Ansible 2.3 just fine, and may be dropped later.