From bde9bdb975318550473d05c1b7d5189ea863c434 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 30 Jun 2022 12:07:51 -0700 Subject: [PATCH] Update to python3.10 This adds python 3.10 testing and updates our docker images to python3.10. On the docker image side of things we use opendev's python images which are based on Debian then have python compiled on top of that external to Debian python packaging. Debian bullseye ships with python3.9 but our images come with python3.10. What this means is that we cannot rely on external wheel caches for Debian bullseye + python3.9 here as we've got the wrong version of python3.10. The good news is that all of the dependencies that have historically given us trouble on arm64 in particular already ship python3.10 aarch64/arm64 wheels. This means we can rely on pypi as is. This is probably better for us anyway as it decouples us from relying on additional external resources. We also update a number of jobs to use nodeset: ubuntu-jammy as this ubuntu version defaults to python 3.10. Change-Id: I7fb585bc5ccc52803eea107e76dddf5e9fde8646 --- .zuul.yaml | 29 +++++++++++++++++------------ Dockerfile | 9 ++------- bindep.txt | 3 ++- setup.cfg | 1 + tools/pip.conf.arm64 | 5 ----- 5 files changed, 22 insertions(+), 25 deletions(-) delete mode 100644 tools/pip.conf.arm64 diff --git a/.zuul.yaml b/.zuul.yaml index e1c63c8b0..b36638c68 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -9,6 +9,7 @@ - zuul/nodepool vars: minikube_version: v1.25.2 # NOTE(corvus): https://github.com/kubernetes/minikube/issues/14403 https://github.com/kubernetes/minikube/issues/14397 + nodeset: ubuntu-jammy - job: description: | @@ -51,8 +52,8 @@ dependencies: - opendev-buildset-registry requires: - - python-builder-3.9-bullseye-container-image - - python-base-3.9-bullseye-container-image + - python-builder-3.10-bullseye-container-image + - python-base-3.10-bullseye-container-image provides: nodepool-container-image vars: &nodepool_image_vars docker_images: @@ -87,8 +88,8 @@ description: Build Docker images and upload to Docker Hub. timeout: *image_build_timeout requires: - - python-builder-3.9-bullseye-container-image - - python-base-3.9-bullseye-container-image + - python-builder-3.10-bullseye-container-image + - python-base-3.10-bullseye-container-image provides: nodepool-container-image vars: *nodepool_image_vars secrets: @@ -117,8 +118,8 @@ - zuul/nodepool - openstack/diskimage-builder requires: - - python-builder-3.9-bullseye-container-image - - python-base-3.9-bullseye-container-image + - python-builder-3.10-bullseye-container-image + - python-base-3.10-bullseye-container-image provides: nodepool-siblings-container-image vars: zuul_work_dir: "{{ zuul.projects['opendev.org/zuul/nodepool'].src_dir }}" @@ -164,6 +165,7 @@ vars: zuul_copy_output: /var/log/nodepool: logs + nodeset: ubuntu-jammy - job: name: nodepool-functional-container-openstack-release-base @@ -243,12 +245,13 @@ NODEPOOL_ZK_KEY: /opt/zookeeper/ca/keys/clientkey.pem - job: - name: nodepool-tox-py39 + name: nodepool-tox-py310 description: | Nodepool unit tests with ZooKeeper running - parent: tox-py39 + parent: tox-py310 pre-run: playbooks/nodepool-tox/pre.yaml vars: *nodepool_tox_vars + nodeset: ubuntu-jammy - project: vars: @@ -258,9 +261,10 @@ - opendev-buildset-registry - nodepool-build-image - zuul-tox-docs - - tox-pep8 + - tox-pep8: + nodeset: ubuntu-jammy - nodepool-tox-py38 - - nodepool-tox-py39 + - nodepool-tox-py310 - nodepool-functional-container-openstack-release - nodepool-functional-k8s - nodepool-functional-openshift @@ -272,9 +276,10 @@ jobs: - nodepool-upload-image - zuul-tox-docs - - tox-pep8 + - tox-pep8: + nodeset: ubuntu-jammy - nodepool-tox-py38 - - nodepool-tox-py39 + - nodepool-tox-py310 - nodepool-functional-k8s - nodepool-functional-openshift - zuul-quick-start: diff --git a/Dockerfile b/Dockerfile index 5d25a909a..73fa3632d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,19 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM docker.io/opendevorg/python-builder:3.9-bullseye as builder +FROM docker.io/opendevorg/python-builder:3.10-bullseye as builder # ============================================================================ ARG ZUUL_SIBLINGS="" COPY . /tmp/src -RUN if [ `uname -m` = "aarch64" ] ; then \ - echo "Installing arm64 pip.conf" ; \ - cp /tmp/src/tools/pip.conf.arm64 /etc/pip.conf ; \ - cp /tmp/src/tools/pip.conf.arm64 /output/pip.conf ; \ - fi RUN assemble -FROM docker.io/opendevorg/python-base:3.9-bullseye as nodepool-base +FROM docker.io/opendevorg/python-base:3.10-bullseye as nodepool-base # ============================================================================ COPY --from=builder /output/ /output diff --git a/bindep.txt b/bindep.txt index 12142228f..e7e2a01c2 100644 --- a/bindep.txt +++ b/bindep.txt @@ -5,8 +5,9 @@ gcc [compile test] libc6-dev [compile test platform:dpkg] libffi-dev [compile test platform:dpkg platform:apk] libffi [platform:apk] +libffi8 [platform:ubuntu-jammy] libffi7 [platform:ubuntu-focal platform:debian-bullseye] -libffi6 [platform:dpkg !platform:ubuntu-focal !platform:debian-bullseye] +libffi6 [platform:dpkg !platform:ubuntu-focal !platform:ubuntu-jammy !platform:debian-bullseye] libffi-devel [compile test platform:rpm] libressl-dev [compile test platform:apk] libssl-dev [compile test platform:dpkg] diff --git a/setup.cfg b/setup.cfg index 6d2ad8488..c5df195eb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,6 +16,7 @@ classifier = Programming Language :: Python :: 3 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 [pbr] warnerrors = True diff --git a/tools/pip.conf.arm64 b/tools/pip.conf.arm64 deleted file mode 100644 index c2f8825c5..000000000 --- a/tools/pip.conf.arm64 +++ /dev/null @@ -1,5 +0,0 @@ -[global] -extra-index-url = https://mirror.dfw.rax.opendev.org/wheel/debian-11-aarch64/ - -[install] -prefer-binary = true