From 59e07bac22d4818e7864f0afe35b12496f41ee24 Mon Sep 17 00:00:00 2001 From: kukushking Date: Thu, 22 May 2025 19:57:57 +0100 Subject: [PATCH 1/5] fix: update setuptools in layers --- building/lambda/Dockerfile | 2 +- building/lambda/Dockerfile.al2023 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/building/lambda/Dockerfile b/building/lambda/Dockerfile index b253989fb..2207247a4 100644 --- a/building/lambda/Dockerfile +++ b/building/lambda/Dockerfile @@ -34,7 +34,7 @@ RUN ln -s /usr/bin/gcc10-ld /usr/bin/ld FROM ${python_version} COPY pyproject.toml poetry.lock ./ -RUN pip3 install --upgrade pip wheel setuptools>=64 setuptools_scm>=8 +RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 RUN pip3 install --upgrade urllib3==1.26.16 # temporary to avoid https://github.com/urllib3/urllib3/issues/2168 (TODO remove when the AL2 image updates to support OpenSSL 1.1.1+) RUN pip3 install --upgrade six cython cmake hypothesis poetry ENV PIP_NO_BINARY="numpy,pandas" diff --git a/building/lambda/Dockerfile.al2023 b/building/lambda/Dockerfile.al2023 index af44022e4..2b9c14f11 100644 --- a/building/lambda/Dockerfile.al2023 +++ b/building/lambda/Dockerfile.al2023 @@ -23,7 +23,7 @@ WORKDIR /root FROM ${python_version} COPY pyproject.toml poetry.lock ./ -RUN pip3 install --upgrade pip wheel setuptools>=64 setuptools_scm>=8 +RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 RUN pip3 install --upgrade six cython cmake hypothesis poetry ENV PIP_NO_BINARY="numpy,pandas" RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main From b7fadf54802999ef6407aeb51b155e22cdb42e03 Mon Sep 17 00:00:00 2001 From: kukushking Date: Fri, 23 May 2025 10:11:52 +0100 Subject: [PATCH 2/5] use cmake<4 --- building/lambda/Dockerfile | 2 +- building/lambda/Dockerfile.al2023 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/building/lambda/Dockerfile b/building/lambda/Dockerfile index 2207247a4..4058f6031 100644 --- a/building/lambda/Dockerfile +++ b/building/lambda/Dockerfile @@ -36,7 +36,7 @@ COPY pyproject.toml poetry.lock ./ RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 RUN pip3 install --upgrade urllib3==1.26.16 # temporary to avoid https://github.com/urllib3/urllib3/issues/2168 (TODO remove when the AL2 image updates to support OpenSSL 1.1.1+) -RUN pip3 install --upgrade six cython cmake hypothesis poetry +RUN pip3 install --upgrade six cython cmake==3.31.6 hypothesis poetry ENV PIP_NO_BINARY="numpy,pandas" RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main diff --git a/building/lambda/Dockerfile.al2023 b/building/lambda/Dockerfile.al2023 index 2b9c14f11..81fcfa825 100644 --- a/building/lambda/Dockerfile.al2023 +++ b/building/lambda/Dockerfile.al2023 @@ -24,7 +24,7 @@ FROM ${python_version} COPY pyproject.toml poetry.lock ./ RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 -RUN pip3 install --upgrade six cython cmake hypothesis poetry +RUN pip3 install --upgrade six cython cmake==3.31.6 hypothesis poetry ENV PIP_NO_BINARY="numpy,pandas" RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main From d0b7cdce1404fa6e702e524fbc4224c430f99bbb Mon Sep 17 00:00:00 2001 From: kukushking Date: Fri, 23 May 2025 13:10:56 +0100 Subject: [PATCH 3/5] add comment --- building/lambda/Dockerfile | 7 ++++++- building/lambda/Dockerfile.al2023 | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/building/lambda/Dockerfile b/building/lambda/Dockerfile index 4058f6031..6c8c243b8 100644 --- a/building/lambda/Dockerfile +++ b/building/lambda/Dockerfile @@ -34,9 +34,14 @@ RUN ln -s /usr/bin/gcc10-ld /usr/bin/ld FROM ${python_version} COPY pyproject.toml poetry.lock ./ +# Setuptools is a build dependency of arrow. +# Remove when arrow version shipped with lambda layers is updated. RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 RUN pip3 install --upgrade urllib3==1.26.16 # temporary to avoid https://github.com/urllib3/urllib3/issues/2168 (TODO remove when the AL2 image updates to support OpenSSL 1.1.1+) -RUN pip3 install --upgrade six cython cmake==3.31.6 hypothesis poetry +# In new CMake 4, compatibility with CMake < 3.5 has been removed. +# Unpin CMake when arrow version shipped with lambda layers is updated. +RUN pip3 install --upgrade cmake==3.31.6 +RUN pip3 install --upgrade six cython hypothesis poetry ENV PIP_NO_BINARY="numpy,pandas" RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main diff --git a/building/lambda/Dockerfile.al2023 b/building/lambda/Dockerfile.al2023 index 81fcfa825..a8857d36f 100644 --- a/building/lambda/Dockerfile.al2023 +++ b/building/lambda/Dockerfile.al2023 @@ -23,8 +23,14 @@ WORKDIR /root FROM ${python_version} COPY pyproject.toml poetry.lock ./ +# Setuptools is a build dependency of arrow. +# Remove when arrow version shipped with lambda layers is updated. RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 -RUN pip3 install --upgrade six cython cmake==3.31.6 hypothesis poetry +# In new CMake 4, compatibility with CMake < 3.5 has been removed. +# Unpin CMake when arrow version shipped with lambda layers is updated. +RUN pip3 install --upgrade cmake==3.31.6 +RUN pip3 install --upgrade six cython hypothesis poetry + ENV PIP_NO_BINARY="numpy,pandas" RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main From 333b8564d93211a2f3df56635f90512ba7ccbb21 Mon Sep 17 00:00:00 2001 From: kukushking Date: Fri, 23 May 2025 13:20:50 +0100 Subject: [PATCH 4/5] clarify comment --- building/lambda/Dockerfile | 2 +- building/lambda/Dockerfile.al2023 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/building/lambda/Dockerfile b/building/lambda/Dockerfile index 6c8c243b8..99ad98db0 100644 --- a/building/lambda/Dockerfile +++ b/building/lambda/Dockerfile @@ -34,7 +34,7 @@ RUN ln -s /usr/bin/gcc10-ld /usr/bin/ld FROM ${python_version} COPY pyproject.toml poetry.lock ./ -# Setuptools is a build dependency of arrow. +# Setuptools is a build dependency of arrow and runtime dependency of some of our dependencies. # Remove when arrow version shipped with lambda layers is updated. RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 RUN pip3 install --upgrade urllib3==1.26.16 # temporary to avoid https://github.com/urllib3/urllib3/issues/2168 (TODO remove when the AL2 image updates to support OpenSSL 1.1.1+) diff --git a/building/lambda/Dockerfile.al2023 b/building/lambda/Dockerfile.al2023 index a8857d36f..c5b3e1899 100644 --- a/building/lambda/Dockerfile.al2023 +++ b/building/lambda/Dockerfile.al2023 @@ -23,7 +23,7 @@ WORKDIR /root FROM ${python_version} COPY pyproject.toml poetry.lock ./ -# Setuptools is a build dependency of arrow. +# Setuptools is a build dependency of arrow and runtime dependency of some of our dependencies. # Remove when arrow version shipped with lambda layers is updated. RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 # In new CMake 4, compatibility with CMake < 3.5 has been removed. From 3416565363bdbfd33459637e4d8d5a3efc70d27b Mon Sep 17 00:00:00 2001 From: kukushking Date: Fri, 23 May 2025 13:24:14 +0100 Subject: [PATCH 5/5] clarify comment --- building/lambda/Dockerfile | 4 ++-- building/lambda/Dockerfile.al2023 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/building/lambda/Dockerfile b/building/lambda/Dockerfile index 99ad98db0..f791e047a 100644 --- a/building/lambda/Dockerfile +++ b/building/lambda/Dockerfile @@ -34,8 +34,8 @@ RUN ln -s /usr/bin/gcc10-ld /usr/bin/ld FROM ${python_version} COPY pyproject.toml poetry.lock ./ -# Setuptools is a build dependency of arrow and runtime dependency of some of our dependencies. -# Remove when arrow version shipped with lambda layers is updated. +# Setuptools is a build dependency of arrow and runtime dependency of some of our dependencies (mainly redshift-connector). +# Remove when arrow version shipped with lambda layers and dependencies are updated. RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 RUN pip3 install --upgrade urllib3==1.26.16 # temporary to avoid https://github.com/urllib3/urllib3/issues/2168 (TODO remove when the AL2 image updates to support OpenSSL 1.1.1+) # In new CMake 4, compatibility with CMake < 3.5 has been removed. diff --git a/building/lambda/Dockerfile.al2023 b/building/lambda/Dockerfile.al2023 index c5b3e1899..bb9d6d28b 100644 --- a/building/lambda/Dockerfile.al2023 +++ b/building/lambda/Dockerfile.al2023 @@ -23,8 +23,8 @@ WORKDIR /root FROM ${python_version} COPY pyproject.toml poetry.lock ./ -# Setuptools is a build dependency of arrow and runtime dependency of some of our dependencies. -# Remove when arrow version shipped with lambda layers is updated. +# Setuptools is a build dependency of arrow and runtime dependency of some of our dependencies (mainly redshift-connector). +# Remove when arrow version shipped with lambda layers and dependencies are updated. RUN pip3 install --upgrade pip wheel setuptools>=78.1.1 setuptools_scm>=8 # In new CMake 4, compatibility with CMake < 3.5 has been removed. # Unpin CMake when arrow version shipped with lambda layers is updated.