From f0ed2da0671342c83f4746b63769170d995ae044 Mon Sep 17 00:00:00 2001 From: John Bley Date: Thu, 14 Nov 2024 10:01:15 -0500 Subject: [PATCH 1/6] Attempt to fix python 3.8 dependency issue by rewriting upstream Dockerfile --- python/build-layer.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/build-layer.sh b/python/build-layer.sh index 8b6e050..c23ea96 100755 --- a/python/build-layer.sh +++ b/python/build-layer.sh @@ -25,6 +25,13 @@ echo "Modified python wrapper requirements:" cat requirements.txt cd ../.. +# FIXME upstream python version specification fix? +sed -i '1iENV PIP_PYTHON_VERSION=3.8' otel/Dockerfile +echo "Modified Dockerfile:" +cat Dockerfile +echo "----" + + echo "Building OTel Lambda python" rm -rf build ./build.sh From bc4d451034fd2d0ab5b600e77d27a431a5dd88f7 Mon Sep 17 00:00:00 2001 From: John Bley Date: Thu, 14 Nov 2024 10:07:31 -0500 Subject: [PATCH 2/6] Typo --- python/build-layer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/build-layer.sh b/python/build-layer.sh index c23ea96..bdbd12b 100755 --- a/python/build-layer.sh +++ b/python/build-layer.sh @@ -28,7 +28,7 @@ cd ../.. # FIXME upstream python version specification fix? sed -i '1iENV PIP_PYTHON_VERSION=3.8' otel/Dockerfile echo "Modified Dockerfile:" -cat Dockerfile +cat otel/Dockerfile echo "----" From 1ef99c6f104a7b8e22d1b8592e73a6aff6165fde Mon Sep 17 00:00:00 2001 From: John Bley Date: Thu, 14 Nov 2024 10:24:10 -0500 Subject: [PATCH 3/6] Have to use ENV after FROM in dockerfile --- python/build-layer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/build-layer.sh b/python/build-layer.sh index bdbd12b..7bb7e90 100755 --- a/python/build-layer.sh +++ b/python/build-layer.sh @@ -26,7 +26,7 @@ cat requirements.txt cd ../.. # FIXME upstream python version specification fix? -sed -i '1iENV PIP_PYTHON_VERSION=3.8' otel/Dockerfile +sed -i '6iENV PIP_PYTHON_VERSION=3.8' otel/Dockerfile echo "Modified Dockerfile:" cat otel/Dockerfile echo "----" From b040aec7f55d149951ce8cf4ea7510e8dabf86cd Mon Sep 17 00:00:00 2001 From: John Bley Date: Mon, 18 Nov 2024 15:51:11 -0500 Subject: [PATCH 4/6] Another attempt to support python 3.8 --- python/build-layer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/build-layer.sh b/python/build-layer.sh index 7bb7e90..a699173 100755 --- a/python/build-layer.sh +++ b/python/build-layer.sh @@ -26,7 +26,7 @@ cat requirements.txt cd ../.. # FIXME upstream python version specification fix? -sed -i '6iENV PIP_PYTHON_VERSION=3.8' otel/Dockerfile +sed -i 's/python3.*/python3.8/' otel/Dockerfile echo "Modified Dockerfile:" cat otel/Dockerfile echo "----" From a8b24136353af1385189c04754b569ba0d7d5012 Mon Sep 17 00:00:00 2001 From: John Bley Date: Mon, 18 Nov 2024 15:59:44 -0500 Subject: [PATCH 5/6] Better regex --- python/build-layer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/build-layer.sh b/python/build-layer.sh index a699173..3441413 100755 --- a/python/build-layer.sh +++ b/python/build-layer.sh @@ -26,7 +26,7 @@ cat requirements.txt cd ../.. # FIXME upstream python version specification fix? -sed -i 's/python3.*/python3.8/' otel/Dockerfile +sed -i 's/runtime=python3.*/runtime=python3.8/' otel/Dockerfile echo "Modified Dockerfile:" cat otel/Dockerfile echo "----" From e6df869d54cea901be89887f28e52d370096bb58 Mon Sep 17 00:00:00 2001 From: John Bley Date: Tue, 19 Nov 2024 10:00:57 -0500 Subject: [PATCH 6/6] Improve comment on why this docker bit is necessary --- python/build-layer.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/build-layer.sh b/python/build-layer.sh index 3441413..993d828 100755 --- a/python/build-layer.sh +++ b/python/build-layer.sh @@ -25,7 +25,8 @@ echo "Modified python wrapper requirements:" cat requirements.txt cd ../.. -# FIXME upstream python version specification fix? +# FIXME no good way to specify python version requirement to pip; use 3.8 runtime/setuptools image +# This block can be removed once python 3.8 reaches "no updates" aws deprecation status in March 2025 sed -i 's/runtime=python3.*/runtime=python3.8/' otel/Dockerfile echo "Modified Dockerfile:" cat otel/Dockerfile