[PR #10043/2a5abab7 backport][stable-10] Remove blanket skips for Python 3 in CI (#10048)

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)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2025-04-21 16:34:52 +02:00 committed by GitHub
commit 0090af8cfb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 83 additions and 48 deletions

View file

@ -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