From cf54559b2088b7cc1550ec4453c40c799fcd70ac Mon Sep 17 00:00:00 2001 From: jrmccluskey Date: Tue, 28 Apr 2026 16:41:11 +0000 Subject: [PATCH] Bump Docker PreCommit timeout, address errant setuptools warning --- .github/workflows/beam_PreCommit_PythonDocker.yml | 2 +- sdks/python/container/Dockerfile | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/beam_PreCommit_PythonDocker.yml b/.github/workflows/beam_PreCommit_PythonDocker.yml index c40190201d04..040b4dd71fc3 100644 --- a/.github/workflows/beam_PreCommit_PythonDocker.yml +++ b/.github/workflows/beam_PreCommit_PythonDocker.yml @@ -56,7 +56,7 @@ jobs: beam_PreCommit_PythonDocker: name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) runs-on: [self-hosted, ubuntu-24.04, main] - timeout-minutes: 30 + timeout-minutes: 45 strategy: fail-fast: false matrix: diff --git a/sdks/python/container/Dockerfile b/sdks/python/container/Dockerfile index af45b29d0444..3bdef2dc1ddc 100644 --- a/sdks/python/container/Dockerfile +++ b/sdks/python/container/Dockerfile @@ -87,7 +87,10 @@ RUN \ # Update ensurepip to use most recent versions of setuptools and pip. This avoids some vulnerabilities which won't be fixed on older versions of python. pip install upgrade_ensurepip; \ python3 -m upgrade_ensurepip; \ - find /usr/local/lib/python${py_version}/ensurepip/_bundled/setuptools-* -type f ! -name $(basename $(ls -v /usr/local/lib/python${py_version}/ensurepip/_bundled/setuptools-*-py3-none-any.whl | tail -n 1)) -delete; \ + # setuptools is not bundled with ensurepip in Python 3.12+ + if [ "${py_version}" = "3.10" ] || [ "${py_version}" = "3.11" ]; then \ + find /usr/local/lib/python${py_version}/ensurepip/_bundled/setuptools-* -type f ! -name $(basename $(ls -v /usr/local/lib/python${py_version}/ensurepip/_bundled/setuptools-*-py3-none-any.whl | tail -n 1)) -delete; \ + fi; \ find /usr/local/lib/python${py_version}/ensurepip/_bundled/pip-* -type f ! -name $(basename $(ls -v /usr/local/lib/python${py_version}/ensurepip/_bundled/pip-*-py3-none-any.whl | tail -n 1)) -delete; \ pip uninstall upgrade_ensurepip -y; \ python3 -m ensurepip;