mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
[PR #10043/2a5abab7 backport][stable-8] Remove blanket skips for Python 3 in CI (#10046)
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.13) (push) Waiting to run
EOL CI / EOL Sanity (Ⓐ2.14) (push) Waiting to run
EOL CI / EOL Sanity (Ⓐ2.15) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.13+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.13+py3.8) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.14+py3.9) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.15+py3.10) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.15+py3.5) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/3/) (push) Waiting to run
import-galaxy / Test to import built collection artifact with Galaxy importer (push) Waiting to run
Verify REUSE / check (push) Waiting to run
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.13) (push) Waiting to run
EOL CI / EOL Sanity (Ⓐ2.14) (push) Waiting to run
EOL CI / EOL Sanity (Ⓐ2.15) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.13+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.13+py3.8) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.14+py3.9) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.15+py3.10) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.15+py3.5) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+fedora35+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.13+opensuse15py2+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.14+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/3/) (push) Waiting to run
import-galaxy / Test to import built collection artifact with Galaxy importer (push) Waiting to run
Verify REUSE / check (push) Waiting to run
* Remove blanket skips for Python 3 in CI (#10043)
* Remove blanket skips for Python 3 in CI.
* Try to fix hg tests.
* Disable hg tests.
* Drop restriction of supervisor to <4.0.0.
This was introduced in https://github.com/ansible/ansible/pull/54935.
* Make tests work with supervisorctl 4.0.0.
According to https://supervisord.org/changes.html#id12,
"supervisorctl will now set its exit code to a non-zero value when an error condition occurs."
I'm not sure why a stopped service in 'status' constitutes an error condition,
but whatever 🤷...
* Use correct Python executable.
* Skip RHEL/macOS; diff on config write.
* Skip CentOS 7 and OpenSuSE on ansible-core 2.16.
(cherry picked from commit 2a5abab738
)
* Skip OpenSuSE 15/Python 2 on ansible-core 2.13.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
b742f7e0ce
commit
812bef1791
10 changed files with 85 additions and 48 deletions
|
@ -3,5 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/2
|
||||
skip/python3
|
||||
skip/aix
|
||||
skip/macos
|
||||
disabled # TODO osdn.net is out of business, so cloning a repo from there does not work
|
||||
|
|
|
@ -6,3 +6,4 @@
|
|||
dependencies:
|
||||
- setup_pkg_mgr
|
||||
- setup_remote_tmp_dir
|
||||
- setup_epel
|
||||
|
|
|
@ -26,6 +26,12 @@
|
|||
shell: apt-get -y update && apt-get -y install mercurial
|
||||
when: ansible_facts.pkg_mgr == 'apt'
|
||||
|
||||
- name: install packages (apk)
|
||||
package:
|
||||
name: mercurial
|
||||
state: present
|
||||
when: ansible_facts.pkg_mgr in ['apk', 'community.general.apk']
|
||||
|
||||
- name: install mercurial (dnf)
|
||||
dnf:
|
||||
name: mercurial
|
||||
|
@ -36,6 +42,11 @@
|
|||
name: mercurial
|
||||
when: ansible_facts.pkg_mgr == 'yum'
|
||||
|
||||
- name: install mercurial (pacman)
|
||||
package:
|
||||
name: mercurial
|
||||
when: ansible_facts.pkg_mgr in ['pacman', 'community.general.pacman']
|
||||
|
||||
- name: install mercurial (pkgng)
|
||||
package:
|
||||
name: mercurial
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
line: "#!{{ stat_hg_interpreter.stat.path }}"
|
||||
when: stat_hg_interpreter.stat.islnk
|
||||
|
||||
- name: uninstall packages which were not originally installed (apk)
|
||||
package:
|
||||
name: mercurial
|
||||
state: absent
|
||||
when: ansible_facts.pkg_mgr in ['apk', 'community.general.apk']
|
||||
|
||||
# using the apt module prevents autoremove from working, so call apt-get via shell instead
|
||||
- name: uninstall packages which were not originally installed (apt)
|
||||
shell: apt-get -y remove mercurial && apt-get -y autoremove
|
||||
|
@ -33,6 +39,12 @@
|
|||
shell: yum -y autoremove mercurial
|
||||
when: ansible_facts.pkg_mgr == 'yum'
|
||||
|
||||
- name: uninstall packages which were not originally installed (pacman)
|
||||
package:
|
||||
name: mercurial
|
||||
state: absent
|
||||
when: ansible_facts.pkg_mgr in ['pacman', 'community.general.pacman']
|
||||
|
||||
- name: uninstall packages which were not originally installed (pkgng)
|
||||
package:
|
||||
name: mercurial
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
|
||||
azp/posix/2
|
||||
destructive
|
||||
skip/python3
|
||||
skip/aix
|
||||
skip/rhel # TODO executables are installed in /usr/local/bin, which isn't part of $PATH
|
||||
skip/macos # TODO executables are installed in /Library/Frameworks/Python.framework/Versions/3.11/bin, which isn't part of $PATH
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
|
||||
- name: install supervisord
|
||||
pip:
|
||||
name: supervisor<4.0.0 # supervisor version 4.0.0 fails tests
|
||||
name: supervisor
|
||||
state: present
|
||||
|
|
|
@ -8,7 +8,15 @@
|
|||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
- block:
|
||||
- when:
|
||||
# setuptools is too old on RHEL/CentOS 6 (https://github.com/Supervisor/meld3/issues/23)
|
||||
- ansible_os_family != 'RedHat' or ansible_distribution_major_version|int > 6
|
||||
# For some reason CentOS 7 and OpenSuSE 15 do not work on ansible-core 2.16
|
||||
- ansible_version.minor != 16 or ansible_distribution not in ['CentOS', 'openSUSE Leap']
|
||||
# For some reason, OpenSuSE 15 with Python 2 does ont work on ansible-core 2.13
|
||||
- ansible_version.minor != 13 or ansible_distribution != 'openSUSE Leap' or ansible_python.version.major != 2
|
||||
block:
|
||||
- block:
|
||||
- tempfile:
|
||||
state: directory
|
||||
suffix: supervisorctl-tests
|
||||
|
@ -40,12 +48,8 @@
|
|||
loop_control:
|
||||
loop_var: credentials
|
||||
|
||||
# setuptools is too old on RHEL/CentOS 6 (https://github.com/Supervisor/meld3/issues/23)
|
||||
when: ansible_os_family != 'RedHat' or ansible_distribution_major_version|int > 6
|
||||
|
||||
always:
|
||||
- include_tasks: '{{ item }}'
|
||||
when: ansible_os_family != 'RedHat' or ansible_distribution_major_version|int > 6
|
||||
with_first_found:
|
||||
- files:
|
||||
- 'uninstall_{{ ansible_distribution }}.yml' # CentOS
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
template:
|
||||
src: supervisord.conf
|
||||
dest: '{{ remote_dir }}/supervisord.conf'
|
||||
diff: true
|
||||
|
||||
- block:
|
||||
- import_tasks: start_supervisord.yml
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
when: credentials.username != ''
|
||||
|
||||
- command: "supervisorctl -c {{ remote_dir }}/supervisord.conf {% if credentials.username %}-u {{ credentials.username }} -p {{ credentials.password }}{% endif %} status"
|
||||
register: result_cmd
|
||||
failed_when: result_cmd.rc not in [0, 3]
|
||||
|
||||
- name: check that service is started
|
||||
assert:
|
||||
|
@ -30,8 +32,9 @@
|
|||
- (result is changed and result_with_auth is skip) or (result is skip and result_with_auth is changed)
|
||||
|
||||
- name: check that service is running (part1) # py1.log content is checked below
|
||||
script: "files/sendProcessStdin.py 'pys:py1' 2 \
|
||||
'{{ credentials.username }}' '{{ credentials.password }}'"
|
||||
script:
|
||||
cmd: "files/sendProcessStdin.py 'pys:py1' 2 '{{ credentials.username }}' '{{ credentials.password }}'"
|
||||
executable: "{{ ansible_facts.python.executable }}"
|
||||
|
||||
- name: try again to start py1 service (without auth)
|
||||
supervisorctl:
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
when: credentials.username != ''
|
||||
|
||||
- command: "supervisorctl -c {{ remote_dir }}/supervisord.conf {% if credentials.username %}-u {{ credentials.username }} -p {{ credentials.password }}{% endif %} status"
|
||||
register: result_cmd
|
||||
failed_when: result_cmd.rc not in [0, 3]
|
||||
|
||||
- name: check that service is stopped
|
||||
assert:
|
||||
|
@ -32,8 +34,9 @@
|
|||
- (result is changed and result_with_auth is skip) or (result is skip and result_with_auth is changed)
|
||||
|
||||
- name: "check that service isn't running"
|
||||
script: "files/sendProcessStdin.py 'pys:py1' 1 \
|
||||
'{{ credentials.username }}' '{{ credentials.password }}'"
|
||||
script:
|
||||
cmd: "files/sendProcessStdin.py 'pys:py1' 1 '{{ credentials.username }}' '{{ credentials.password }}'"
|
||||
executable: "{{ ansible_facts.python.executable }}"
|
||||
register: is_py1_alive
|
||||
failed_when: is_py1_alive is success
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue