From 7b95cdde8a3b2112a600eaa467c4e60ea23a7d8d Mon Sep 17 00:00:00 2001 From: Iman Shafiei Date: Mon, 31 Mar 2025 15:43:37 -0700 Subject: [PATCH] build: add support for Python 3.13 in CI and deployment configurations --- .github/workflows/ci-python.yml | 2 +- .github/workflows/publish-layer-collector.yml | 2 +- collector/Makefile | 4 ++-- python/sample-apps/template.yml | 1 + python/src/otel/Dockerfile | 2 +- python/src/template.yml | 1 + 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index 4bbf8d40a8..50e5a929a9 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -28,7 +28,7 @@ jobs: matrix: # If you add a python version here, please make sure that the collector/Makefile publish and publish-layer targets # get updated as well - python: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - name: Checkout this repo diff --git a/.github/workflows/publish-layer-collector.yml b/.github/workflows/publish-layer-collector.yml index 87feb27964..2b18d310a4 100644 --- a/.github/workflows/publish-layer-collector.yml +++ b/.github/workflows/publish-layer-collector.yml @@ -122,7 +122,7 @@ jobs: artifact-name: opentelemetry-collector-layer-${{ matrix.architecture }}.zip layer-name: opentelemetry-collector architecture: ${{ matrix.architecture }} - runtimes: "nodejs16.x nodejs18.x nodejs20.x nodejs22.x java11 java17 java21 python3.8 python3.9 python3.10 python3.11 python3.12" + runtimes: "nodejs16.x nodejs18.x nodejs20.x nodejs22.x java11 java17 java21 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13" release-group: prod aws_region: ${{ matrix.aws_region }} role-arn: ${{ github.event.inputs.role-arn }} diff --git a/collector/Makefile b/collector/Makefile index 39dcb2993e..2bab5b2606 100644 --- a/collector/Makefile +++ b/collector/Makefile @@ -47,12 +47,12 @@ package: build .PHONY: publish publish: - aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/opentelemetry-collector-layer-$(GOARCH).zip --compatible-runtimes nodejs16.x nodejs18.x nodejs20.x nodejs22.x java11 java17 java21 python3.8 python3.9 python3.10 python3.11 python3.12 --query 'LayerVersionArn' --output text + aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/opentelemetry-collector-layer-$(GOARCH).zip --compatible-runtimes nodejs16.x nodejs18.x nodejs20.x nodejs22.x java11 java17 java21 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 --query 'LayerVersionArn' --output text .PHONY: publish-layer publish-layer: package @echo Publishing collector extension layer... - aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/opentelemetry-collector-layer-$(GOARCH).zip --compatible-runtimes nodejs16.x nodejs18.x nodejs20.x nodejs22.x java11 java17 java21 python3.8 python3.9 python3.10 python3.11 python3.12 --query 'LayerVersionArn' --output text + aws lambda publish-layer-version --layer-name $(LAYER_NAME) --zip-file fileb://$(BUILD_SPACE)/opentelemetry-collector-layer-$(GOARCH).zip --compatible-runtimes nodejs16.x nodejs18.x nodejs20.x nodejs22.x java11 java17 java21 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 --query 'LayerVersionArn' --output text @echo OpenTelemetry Collector layer published. .PHONY: set-otelcol-version diff --git a/python/sample-apps/template.yml b/python/sample-apps/template.yml index 7f7a1c3619..0ddcb2ee05 100644 --- a/python/sample-apps/template.yml +++ b/python/sample-apps/template.yml @@ -47,5 +47,6 @@ Resources: - python3.10 - python3.11 - python3.12 + - python3.13 Metadata: BuildMethod: makefile diff --git a/python/src/otel/Dockerfile b/python/src/otel/Dockerfile index 7a8fe8f8a3..b4bf1d2358 100644 --- a/python/src/otel/Dockerfile +++ b/python/src/otel/Dockerfile @@ -1,4 +1,4 @@ -ARG runtime=python3.12 +ARG runtime=python3.13 FROM public.ecr.aws/sam/build-${runtime} diff --git a/python/src/template.yml b/python/src/template.yml index 1b486f7d00..14c3efc939 100644 --- a/python/src/template.yml +++ b/python/src/template.yml @@ -19,5 +19,6 @@ Resources: - python3.10 - python3.11 - python3.12 + - python3.13 Metadata: BuildMethod: makefile