Skip to content

Commit 6ca2f4e

Browse files
authored
Bump Docker PreCommit timeout, address errant setuptools warning (#38305)
1 parent 99a72bc commit 6ca2f4e

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/beam_PreCommit_PythonDocker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
beam_PreCommit_PythonDocker:
5757
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }})
5858
runs-on: [self-hosted, ubuntu-24.04, main]
59-
timeout-minutes: 30
59+
timeout-minutes: 45
6060
strategy:
6161
fail-fast: false
6262
matrix:

sdks/python/container/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ RUN \
8787
# 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.
8888
pip install upgrade_ensurepip; \
8989
python3 -m upgrade_ensurepip; \
90-
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; \
90+
# setuptools is not bundled with ensurepip in Python 3.12+
91+
if [ "${py_version}" = "3.10" ] || [ "${py_version}" = "3.11" ]; then \
92+
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; \
93+
fi; \
9194
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; \
9295
pip uninstall upgrade_ensurepip -y; \
9396
python3 -m ensurepip;

0 commit comments

Comments
 (0)