Add test support for Python 3.11 on RHEL 8.8/9.2 (#80990)

Fixes #80412
Fixes #80413
pull/81065/head
Martin Krizek 11 months ago committed by GitHub
parent c1bc445aa7
commit cde15f3c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -83,12 +83,14 @@ stages:
test: macos/13.2
- name: RHEL 7.9
test: rhel/7.9
- name: RHEL 8.7 py36
test: rhel/8.7@3.6
- name: RHEL 8.7 py39
test: rhel/8.7@3.9
- name: RHEL 9.2
test: rhel/9.2
- name: RHEL 8.8 py36
test: rhel/8.8@3.6
- name: RHEL 8.8 py311
test: rhel/8.8@3.11
- name: RHEL 9.2 py39
test: rhel/9.2@3.9
- name: RHEL 9.2 py311
test: rhel/9.2@3.11
- name: FreeBSD 12.4
test: freebsd/12.4
- name: FreeBSD 13.1
@ -103,8 +105,8 @@ stages:
targets:
- name: macOS 13.2
test: macos/13.2
- name: RHEL 8.7
test: rhel/8.7
- name: RHEL 8.8
test: rhel/8.8
- name: RHEL 9.2
test: rhel/9.2
- name: FreeBSD 13.1
@ -122,8 +124,8 @@ stages:
test: alpine/3.17
- name: Fedora 37
test: fedora/37
- name: RHEL 8.7
test: rhel/8.7
- name: RHEL 8.8
test: rhel/8.8
- name: RHEL 9.2
test: rhel/9.2
- name: Ubuntu 20.04

@ -0,0 +1,5 @@
minor_changes:
- ansible-test - Add support for RHEL 8.8 remotes.
- ansible-test - RHEL 8.8 provisioning can now be used with the ``--python 3.11`` option.
- ansible-test - RHEL 9.2 provisioning can now be used with the ``--python 3.11`` option.
- ansible-test - Remove Python 3.8 and 3.9 from RHEL 8.8.

@ -24,9 +24,15 @@
args:
name: "{{ rpm_repo_packages }}"
- name: Install rpmfluff via pip
pip:
name: rpmfluff
- name: Install rpmfluff via pip, ensure it is installed with default python as python3-rpm may not exist for other versions
block:
- action: "{{ ansible_facts.pkg_mgr }}"
args:
name: "python3-pip"
- pip:
name: rpmfluff
executable: pip3
when: ansible_facts.os_family == 'RedHat' and ansible_distribution_major_version is version('9', '==')
- set_fact:

@ -10,8 +10,9 @@ macos/13.2 python=3.11 python_dir=/usr/local/bin become=sudo provider=parallels
macos python_dir=/usr/local/bin become=sudo provider=parallels arch=x86_64
rhel/7.9 python=2.7 become=sudo provider=aws arch=x86_64
rhel/8.7 python=3.6,3.8,3.9 become=sudo provider=aws arch=x86_64
rhel/8.8 python=3.6,3.11 become=sudo provider=aws arch=x86_64
rhel/9.1 python=3.9 become=sudo provider=aws arch=x86_64
rhel/9.2 python=3.9 become=sudo provider=aws arch=x86_64
rhel/9.2 python=3.9,3.11 become=sudo provider=aws arch=x86_64
rhel become=sudo provider=aws arch=x86_64
ubuntu/20.04 python=3.8,3.9 become=sudo provider=aws arch=x86_64
ubuntu/22.04 python=3.10 become=sudo provider=aws arch=x86_64

@ -261,7 +261,7 @@ bootstrap_remote_rhel_8()
if [ "${python_version}" = "3.6" ]; then
py_pkg_prefix="python3"
else
py_pkg_prefix="python${python_package_version}"
py_pkg_prefix="python${python_version}"
fi
packages="
@ -269,6 +269,14 @@ bootstrap_remote_rhel_8()
${py_pkg_prefix}-devel
"
# pip isn't included in the Python devel package under Python 3.11
if [ "${python_version}" != "3.6" ]; then
packages="
${packages}
${py_pkg_prefix}-pip
"
fi
# Jinja2 is not installed with an OS package since the provided version is too old.
# Instead, ansible-test will install it using pip.
if [ "${controller}" ]; then
@ -278,9 +286,19 @@ bootstrap_remote_rhel_8()
"
fi
# Python 3.11 isn't a module like the earlier versions
if [ "${python_version}" = "3.6" ]; then
while true; do
# shellcheck disable=SC2086
yum module install -q -y "python${python_package_version}" \
&& break
echo "Failed to install packages. Sleeping before trying again..."
sleep 10
done
fi
while true; do
# shellcheck disable=SC2086
yum module install -q -y "python${python_package_version}" && \
yum install -q -y ${packages} \
&& break
echo "Failed to install packages. Sleeping before trying again..."
@ -292,23 +310,43 @@ bootstrap_remote_rhel_8()
bootstrap_remote_rhel_9()
{
py_pkg_prefix="python3"
if [ "${python_version}" = "3.9" ]; then
py_pkg_prefix="python3"
else
py_pkg_prefix="python${python_version}"
fi
packages="
gcc
${py_pkg_prefix}-devel
"
# pip is not included in the Python devel package under Python 3.11
if [ "${python_version}" != "3.9" ]; then
packages="
${packages}
${py_pkg_prefix}-pip
"
fi
# Jinja2 is not installed with an OS package since the provided version is too old.
# Instead, ansible-test will install it using pip.
if [ "${controller}" ]; then
packages="
${packages}
${py_pkg_prefix}-cryptography
${py_pkg_prefix}-packaging
${py_pkg_prefix}-pyyaml
${py_pkg_prefix}-resolvelib
"
# The following OS packages are missing for 3.11 (and possibly later) so we just
# skip them and let ansible-test install them from PyPI.
if [ "${python_version}" = "3.9" ]; then
packages="
${packages}
${py_pkg_prefix}-packaging
${py_pkg_prefix}-resolvelib
"
fi
fi
while true; do

Loading…
Cancel
Save