Skip to content

Commit ac79db0

Browse files
nits
1 parent 844bf16 commit ac79db0

4 files changed

Lines changed: 16 additions & 13 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Slack](https://chat.datadoghq.com/badge.svg?bg=632CA6)](https://chat.datadoghq.com/)
77
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/DataDog/datadog-lambda-python/blob/main/LICENSE)
88

9-
Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14, 3.15) enables [enhanced Lambda metrics](https://docs.datadoghq.com/serverless/enhanced_lambda_metrics), [distributed tracing](https://docs.datadoghq.com/serverless/distributed_tracing), and [custom metric submission](https://docs.datadoghq.com/serverless/custom_metrics) from AWS Lambda functions.
9+
Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14, and 3.15) enables [enhanced Lambda metrics](https://docs.datadoghq.com/serverless/enhanced_lambda_metrics), [distributed tracing](https://docs.datadoghq.com/serverless/distributed_tracing), and [custom metric submission](https://docs.datadoghq.com/serverless/custom_metrics) from AWS Lambda functions.
1010

1111
## Installation
1212

‎ci/publish_layers.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ LAYERS=(
7878
"Datadog-Python313"
7979
"Datadog-Python313-ARM"
8080
"Datadog-Python314"
81-
"Datadog-Python314-ARM"
81+
"Datadog-Python314-ARM"
8282
"Datadog-Python315"
8383
"Datadog-Python315-ARM"
8484
)

‎scripts/build_layers.sh‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ set -e
3535

3636
LAYER_DIR=".layers"
3737
LAYER_FILES_PREFIX="datadog_lambda_py"
38-
AVAILABLE_PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14" "3.15")
38+
AVAILABLE_PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14")
39+
# Preview runtimes. AWS has not published a SAM build image for these, so the
40+
# Lambda preview base image is used instead. The Dockerfile installs the
41+
# compiler toolchain that image is missing.
42+
PREVIEW_PYTHON_VERSIONS=("3.15")
43+
ALL_PYTHON_VERSIONS=("${AVAILABLE_PYTHON_VERSIONS[@]}" "${PREVIEW_PYTHON_VERSIONS[@]}")
3944
AVAILABLE_ARCHS=("arm64" "amd64")
4045

4146
if [ -n "$ARCH" ]; then
@@ -69,11 +74,11 @@ fi
6974
# Determine which Python versions to build layers for
7075
if [ -z "$PYTHON_VERSION" ]; then
7176
echo "Python version not specified, building layers for all versions."
72-
PYTHON_VERSIONS=("${AVAILABLE_PYTHON_VERSIONS[@]}")
77+
PYTHON_VERSIONS=("${ALL_PYTHON_VERSIONS[@]}")
7378
else
7479
echo "Python version specified: $PYTHON_VERSION"
75-
if [[ ! " ${AVAILABLE_PYTHON_VERSIONS[@]} " =~ " ${PYTHON_VERSION} " ]]; then
76-
echo "Python version $PYTHON_VERSION is not a valid option. Choose from: ${AVAILABLE_PYTHON_VERSIONS[@]}"
80+
if [[ ! " ${ALL_PYTHON_VERSIONS[@]} " =~ " ${PYTHON_VERSION} " ]]; then
81+
echo "Python version $PYTHON_VERSION is not a valid option. Choose from: ${ALL_PYTHON_VERSIONS[@]}"
7782
echo ""
7883
echo "EXITING SCRIPT."
7984
exit 1
@@ -103,13 +108,11 @@ function docker_build_zip {
103108

104109
destination=$(make_path_absolute $2)
105110
arch=$3
106-
# Python 3.15 is a Lambda preview runtime. AWS has not published
107-
# public.ecr.aws/sam/build-python3.15, so use the preview base image.
108-
# The Dockerfile installs the compiler toolchain that image is missing.
109-
if [ "$1" = "3.15" ]; then
110-
image="public.ecr.aws/lambda/python:3.15-preview"
111+
# Preview runtimes have no SAM build image yet. See PREVIEW_PYTHON_VERSIONS.
112+
if [[ " ${PREVIEW_PYTHON_VERSIONS[*]} " =~ " ${1} " ]]; then
113+
image="public.ecr.aws/lambda/python:${1}-preview"
111114
else
112-
image="public.ecr.aws/sam/build-python$1:1"
115+
image="public.ecr.aws/sam/build-python${1}:1"
113116
fi
114117
# Install datadogpy in a docker container to avoid the mess from switching
115118
# between different python runtimes.

‎scripts/publish_layers.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ AVAILABLE_LAYERS=(
6363
"Datadog-Python313"
6464
"Datadog-Python313-ARM"
6565
"Datadog-Python314"
66-
"Datadog-Python314-ARM"
66+
"Datadog-Python314-ARM"
6767
"Datadog-Python315"
6868
"Datadog-Python315-ARM"
6969
)

0 commit comments

Comments
 (0)