From 970d5f6a06f2288384abcf5eef5cfcb27f71fd57 Mon Sep 17 00:00:00 2001
From: Clark Boylan <clark.boylan@gmail.com>
Date: Thu, 8 Sep 2022 08:33:28 -0700
Subject: [PATCH] Update python builder and base image

It is a good idea ot periodically update our base python images. Now is
a good time to do it as we've got debian bullseye updates and python
minor releases. The bullseye updates fix a glibc bug that was affecting
Ansible in the zuul images. With this update we'll be able to remove the
workaround for that issue.

We also update the builder image's apt-get process to include a clean to
match tbe base image. This is more for consistency than anything else.

Finally update job timeouts for builds as it seems we occasionally need
more time particularly for emulated arm64 builds.

Change-Id: I31483ff434f19f408aef3b63cb2cd24044a8bf29
---
 docker/python-base/Dockerfile                  | 2 +-
 docker/python-builder/Dockerfile               | 3 ++-
 zuul.d/docker-images/python-3.10-bullseye.yaml | 6 ++++++
 zuul.d/docker-images/python-3.8-bullseye.yaml  | 6 ++++++
 zuul.d/docker-images/python-3.9-bullseye.yaml  | 6 ++++++
 5 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/docker/python-base/Dockerfile b/docker/python-base/Dockerfile
index 5b0f1f88c4..f813922297 100644
--- a/docker/python-base/Dockerfile
+++ b/docker/python-base/Dockerfile
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Comment to force rebuilds Tue Aug  3 19:59:32 UTC 2021
+# Comment to force rebuilds Thu Sep  8 15:32:47 UTC 2022
 
 ARG PYTHON_VERSION=3.10
 ARG DEBIAN_VERSION=bullseye
diff --git a/docker/python-builder/Dockerfile b/docker/python-builder/Dockerfile
index 5aa8b485c0..1cd7e7fa2f 100644
--- a/docker/python-builder/Dockerfile
+++ b/docker/python-builder/Dockerfile
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Comment to force rebuilds Tue Aug  3 19:59:32 UTC 2021
+# Comment to force rebuilds Thu Sep  8 15:32:47 UTC 2022
 
 ARG PYTHON_VERSION=3.10
 ARG DEBIAN_VERSION=bullseye
@@ -22,6 +22,7 @@ FROM docker.io/library/python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} as fake-p
 WORKDIR /tmp
 RUN apt-get update \
   && apt-get install -y curl equivs \
+  && apt-get clean \
   && rm -rf /var/lib/apt/lists/*
 COPY python3-dev.control /tmp/python3-dev.control
 RUN equivs-build /tmp/python3-dev.control
diff --git a/zuul.d/docker-images/python-3.10-bullseye.yaml b/zuul.d/docker-images/python-3.10-bullseye.yaml
index b046c48b9f..5943cffc02 100644
--- a/zuul.d/docker-images/python-3.10-bullseye.yaml
+++ b/zuul.d/docker-images/python-3.10-bullseye.yaml
@@ -3,6 +3,7 @@
     name: system-config-build-image-python-builder-3.10-bullseye
     description: Build a python-builder-3.10-bullseye image.
     parent: system-config-build-image
+    timeout: 3600
     provides:
       - python-builder-container-image
       - python-builder-3.10-bullseye-container-image
@@ -26,6 +27,7 @@
     name: system-config-upload-image-python-builder-3.10-bullseye
     description: Build and upload a python-builder-3.10-bullseye image.
     parent: system-config-upload-image
+    timeout: 3600
     provides:
       - python-builder-container-image
       - python-builder-3.10-bullseye-container-image
@@ -43,6 +45,7 @@
     name: system-config-build-image-python-base-3.10-bullseye
     description: Build a python-base-3.10-bullseye image.
     parent: system-config-build-image
+    timeout: 3600
     provides:
       - python-base-container-image
       - python-base-3.10-container-image
@@ -66,6 +69,7 @@
     name: system-config-upload-image-python-base-3.10-bullseye
     description: Build and upload a python-base-3.10-bullseye image.
     parent: system-config-upload-image
+    timeout: 3600
     provides: python-base-3.10-bullseye-container-image
     vars: *python-base_3_10_bullseye_vars
     files: *python-base_3_10_bullseye_files
@@ -81,6 +85,7 @@
     name: system-config-build-image-uwsgi-base-3.10-bullseye
     description: Build a uwsgi-base-3.10-bullseye image.
     parent: system-config-build-image
+    timeout: 3600
     requires: &uwsgi-base_3_10_bullseye_requires
       - python-base-3.10-bullseye-container-image
       - python-builder-3.10-bullseye-container-image
@@ -111,6 +116,7 @@
     name: system-config-upload-image-uwsgi-base-3.10-bullseye
     description: Build and upload a uwsgi-base-3.10-bullseye image.
     parent: system-config-upload-image
+    timeout: 3600
     provides: uwsgi-base-3.10-bullseye-container-image
     requires: *uwsgi-base_3_10_bullseye_requires
     dependencies:
diff --git a/zuul.d/docker-images/python-3.8-bullseye.yaml b/zuul.d/docker-images/python-3.8-bullseye.yaml
index 8b9436d065..69d5f9fa1f 100644
--- a/zuul.d/docker-images/python-3.8-bullseye.yaml
+++ b/zuul.d/docker-images/python-3.8-bullseye.yaml
@@ -3,6 +3,7 @@
     name: system-config-build-image-python-builder-3.8-bullseye
     description: Build a python-builder-3.8-bullseye image.
     parent: system-config-build-image
+    timeout: 3600
     provides:
       - python-builder-container-image
       - python-builder-3.8-bullseye-container-image
@@ -26,6 +27,7 @@
     name: system-config-upload-image-python-builder-3.8-bullseye
     description: Build and upload a python-builder-3.8-bullseye image.
     parent: system-config-upload-image
+    timeout: 3600
     provides:
       - python-builder-container-image
       - python-builder-3.8-bullseye-container-image
@@ -43,6 +45,7 @@
     name: system-config-build-image-python-base-3.8-bullseye
     description: Build a python-base-3.8-bullseye image.
     parent: system-config-build-image
+    timeout: 3600
     provides:
       - python-base-container-image
       - python-base-3.8-container-image
@@ -66,6 +69,7 @@
     name: system-config-upload-image-python-base-3.8-bullseye
     description: Build and upload a python-base-3.8-bullseye image.
     parent: system-config-upload-image
+    timeout: 3600
     provides: python-base-3.8-bullseye-container-image
     vars: *python-base_3_8_bullseye_vars
     files: *python-base_3_8_bullseye_files
@@ -81,6 +85,7 @@
     name: system-config-build-image-uwsgi-base-3.8-bullseye
     description: Build a uwsgi-base-3.8-bullseye image.
     parent: system-config-build-image
+    timeout: 3600
     requires: &uwsgi-base_3_8_bullseye_requires
       - python-base-3.8-bullseye-container-image
       - python-builder-3.8-bullseye-container-image
@@ -111,6 +116,7 @@
     name: system-config-upload-image-uwsgi-base-3.8-bullseye
     description: Build and upload a uwsgi-base-3.8-bullseye image.
     parent: system-config-upload-image
+    timeout: 3600
     provides: uwsgi-base-3.8-bullseye-container-image
     requires: *uwsgi-base_3_8_bullseye_requires
     dependencies:
diff --git a/zuul.d/docker-images/python-3.9-bullseye.yaml b/zuul.d/docker-images/python-3.9-bullseye.yaml
index 04ed99266e..03f047c7d8 100644
--- a/zuul.d/docker-images/python-3.9-bullseye.yaml
+++ b/zuul.d/docker-images/python-3.9-bullseye.yaml
@@ -3,6 +3,7 @@
     name: system-config-build-image-python-builder-3.9-bullseye
     description: Build a python-builder-3.9-bullseye image.
     parent: system-config-build-image
+    timeout: 3600
     provides:
       - python-builder-container-image
       - python-builder-3.9-bullseye-container-image
@@ -26,6 +27,7 @@
     name: system-config-upload-image-python-builder-3.9-bullseye
     description: Build and upload a python-builder-3.9-bullseye image.
     parent: system-config-upload-image
+    timeout: 3600
     provides:
       - python-builder-container-image
       - python-builder-3.9-bullseye-container-image
@@ -43,6 +45,7 @@
     name: system-config-build-image-python-base-3.9-bullseye
     description: Build a python-base-3.9-bullseye image.
     parent: system-config-build-image
+    timeout: 3600
     provides:
       - python-base-container-image
       - python-base-3.9-container-image
@@ -66,6 +69,7 @@
     name: system-config-upload-image-python-base-3.9-bullseye
     description: Build and upload a python-base-3.9-bullseye image.
     parent: system-config-upload-image
+    timeout: 3600
     provides: python-base-3.9-bullseye-container-image
     vars: *python-base_3_9_bullseye_vars
     files: *python-base_3_9_bullseye_files
@@ -81,6 +85,7 @@
     name: system-config-build-image-uwsgi-base-3.9-bullseye
     description: Build a uwsgi-base-3.9-bullseye image.
     parent: system-config-build-image
+    timeout: 3600
     requires: &uwsgi-base_3_9_bullseye_requires
       - python-base-3.9-bullseye-container-image
       - python-builder-3.9-bullseye-container-image
@@ -111,6 +116,7 @@
     name: system-config-upload-image-uwsgi-base-3.9-bullseye
     description: Build and upload a uwsgi-base-3.9-bullseye image.
     parent: system-config-upload-image
+    timeout: 3600
     provides: uwsgi-base-3.9-bullseye-container-image
     requires: *uwsgi-base_3_9_bullseye_requires
     dependencies: