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

Fix instantiation of action plugin test to support Ansible 2.3 #3919

Merged

Conversation

rhcarvalho
Copy link
Contributor

@rhcarvalho rhcarvalho commented Apr 13, 2017

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.

requirements.txt Outdated
@@ -1,6 +1,6 @@
ansible==2.2.2.0
Copy link
Contributor Author

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.

Copy link
Member

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
Copy link
Member

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.

@sdodson
Copy link
Member

sdodson commented Apr 13, 2017

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?

@rhcarvalho rhcarvalho force-pushed the fix-action-plugin-test-ansible2.3 branch from 74708ed to 9e8ffde Compare April 13, 2017 13:12
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.
@rhcarvalho rhcarvalho force-pushed the fix-action-plugin-test-ansible2.3 branch from 9e8ffde to 590d6c1 Compare April 13, 2017 13:13
@rhcarvalho
Copy link
Contributor Author

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.

@rhcarvalho
Copy link
Contributor Author

[test]

@openshift-bot
Copy link

Evaluated for openshift ansible test up to 590d6c1

@openshift-bot
Copy link

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_openshift_ansible/30/) (Base Commit: 54f32cf)

@mtnbikenc
Copy link
Member

aos-ci-test

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.5_containerized for 590d6c1 (logs)

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.6_containerized for 590d6c1 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 590d6c1 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_NOT_containerized, aos-ci-jenkins/OS_3.5_NOT_containerized_e2e_tests" for 590d6c1 (logs)

@sosiouxme
Copy link
Member

aos-ci-test

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 590d6c1 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_containerized, aos-ci-jenkins/OS_3.5_containerized_e2e_tests" for 590d6c1 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_containerized, aos-ci-jenkins/OS_3.6_containerized_e2e_tests" for 590d6c1 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_NOT_containerized, aos-ci-jenkins/OS_3.5_NOT_containerized_e2e_tests" for 590d6c1 (logs)

@rhcarvalho
Copy link
Contributor Author

[merge]

@rhcarvalho
Copy link
Contributor Author

Seems to be another case of this flake openshift/origin#13731

[merge]

@rhcarvalho
Copy link
Contributor Author

Flake openshift/origin#13814

[merge]

@openshift-bot
Copy link

Evaluated for openshift ansible merge up to 590d6c1

@openshift-bot
Copy link

continuous-integration/openshift-jenkins/merge FAILURE (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_openshift_ansible/249/) (Base Commit: 14dbd7c)

@rhcarvalho
Copy link
Contributor Author

openshift/origin#13833, apparently bug in the CI code.

Given

  • Code reviewed and approved
  • At least 2 annotated flakes trying to merge
  • No code changes since then
  • aos-ci-test and Travis passed
  • Only health checks role involved

Will use the temporary exception to merge this manually.

@rhcarvalho rhcarvalho merged commit 5652298 into openshift:master Apr 20, 2017
@rhcarvalho rhcarvalho deleted the fix-action-plugin-test-ansible2.3 branch April 21, 2017 12:07
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