From ddd1845d0059c30f988d896325f0908e341cf4a7 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 14 Oct 2022 14:31:18 -0700 Subject: [PATCH] Update Docker images to python 3.10 This updates the grafyaml docker images to python 3.10. We do this because 3.10 has been shown to be quicker than 3.8. Also, 3.11 is coming up soon and moving off of 3.8 will allow us to remove those images before adding 3.11 which keeps to image build count to a more reasonable number. We update the voluptuous version to add python 3.10 support. In particular collections.Mapping moved to collections.abc.Mapping. Change-Id: I1514f5e1992cfe5dcdaa06133f5da7379599e57e --- .zuul.yaml | 14 ++++++++------ Dockerfile | 4 ++-- requirements.txt | 2 +- setup.cfg | 1 + 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index e0aff81..5d5c183 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -21,8 +21,8 @@ allowed-projects: opendev/grafyaml timeout: 2700 requires: - - python-builder-3.8-container-image - - python-base-3.8-container-image + - python-builder-3.10-bullseye-container-image + - python-base-3.10-bullseye-container-image provides: - grafyaml-container-image dependencies: @@ -40,8 +40,8 @@ description: Build the grafyaml Docker image and upload to Docker Hub. timeout: 3600 requires: - - python-builder-3.8-container-image - - python-base-3.8-container-image + - python-builder-3.10-bullseye-container-image + - python-base-3.10-bullseye-container-image provides: grafyaml-container-image vars: *grafyaml_image_vars secrets: @@ -65,14 +65,16 @@ check: jobs: - tox-pep8 - - tox-py38 + - tox-py310: + nodeset: ubuntu-jammy - opendev-buildset-registry - grafyaml-build-image - project-config-grafana gate: jobs: - tox-pep8 - - tox-py38 + - tox-py310: + nodeset: ubuntu-jammy - grafyaml-upload-image promote: jobs: diff --git a/Dockerfile b/Dockerfile index a239522..0e6ae74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM docker.io/opendevorg/python-builder:3.8 as builder +FROM docker.io/opendevorg/python-builder:3.10-bullseye as builder COPY . /tmp/src RUN assemble -FROM docker.io/opendevorg/python-base:3.8 +FROM docker.io/opendevorg/python-base:3.10-bullseye COPY --from=builder /output/ /output RUN /output/install-from-bindep diff --git a/requirements.txt b/requirements.txt index 39dfcb2..f289c6d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ python-slugify PyYAML>=3.1.0 requests six>=1.6.0 -voluptuous>0.10.5 +voluptuous>=0.13.1 diff --git a/setup.cfg b/setup.cfg index ac3c0b8..700e0bf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,7 @@ classifier = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.10 Topic :: Utilities [files]