Skip to content

Commit b0963f4

Browse files
authored
Drop Python 3.8/3.9 from the Python test framework (OTel floor is now 3.10) (#643)
## Why The nightly OpenTelemetry dependency bump in `aws-otel-python-instrumentation` ([PR #762](aws-observability/aws-otel-python-instrumentation#762), OTel `1.42.1` / `0.63b1`) raised the ADOT distro's minimum to **Python ≥ 3.10**: - `opentelemetry-api`: `1.41.1` was `requires_python >=3.9` → `1.42.1` is **`>=3.10`** - `opentelemetry-instrumentation-*`: `0.62b1` was `>=3.9` → `0.63b1` is **`>=3.10`** The `python-ec2-adot-sigv4` and `python-ec2-adaptive-sampling` E2E jobs default to **Python 3.9**, so after the bump pip on the EC2 host could no longer resolve the pinned distro: ``` ERROR: Could not find a version that satisfies the requirement opentelemetry-api==1.42.1 ... ERROR: No matching distribution found for opentelemetry-instrumentation-celery==0.63b1 nohup: failed to run command 'opentelemetry-instrument': No such file or directory ``` This turned the **Python Instrumentation Main Build** red on every run starting 2026-06-17 01:26 UTC (first failure = the dep-bump commit; the run immediately before it was green). The `default` EC2 matrix (3.10–3.14) and container/layer-based jobs were unaffected because they don't pip-install the pinned distro on a 3.9 interpreter. > Note: the `k8s-py310-amd64` job also fails intermittently, but that is a **separate, pre-existing** CloudWatch observability controller-manager pod-readiness timeout — unrelated to this change. ## What Removes **all** Python 3.8/3.9 references from the Python test framework and floors everything at 3.10: - **Reusable workflows** — `python-version` default `3.9` → `3.10` (`default`, `asg`, `lambda`, `adot-sigv4`); normalized "currently supported" description strings to `3.10, 3.11, 3.12, 3.13, 3.14` across all Python workflows. - **adaptive-sampling** — hardcoded `python3.9` install command → `python3.10`. - **Terraform** — `language_version` default `3.9` → `3.10` (`default`, `asg`, `adot-sigv4`, `adaptive-sampling`). - **EC2 user-data scripts** — dropped the now-dead `== "3.8"` conditional branches and 3.8 comment references; fixed a pre-existing `3,10` comment typo. - **ECR sample-app deploy** — removed `3.8` and `3.9` from the build matrix. ## Testing - All 9 modified workflow YAML files validated as well-formed. - `terraform fmt -check` passes on all four modified EC2 dirs (no diff). - Repo-wide grep confirms no remaining `3.8`/`3.9`/`python3.8`/`python3.9` references in the Python framework.
1 parent 95bf387 commit b0963f4

16 files changed

Lines changed: 37 additions & 37 deletions

.github/workflows/python-ec2-adaptive-sampling-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ jobs:
7777
run: |
7878
if [ "${{ env.REPOSITORY_NAME }}" = "aws-otel-python-instrumentation" ]; then
7979
# Reusing the adot-main-build-staging-jar bucket to store the python wheel file
80-
echo GET_ADOT_WHEEL_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/${{ env.ADOT_WHEEL_NAME }} ./${{ env.ADOT_WHEEL_NAME }} && sudo python3.9 -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> "$GITHUB_ENV"
80+
echo GET_ADOT_WHEEL_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/${{ env.ADOT_WHEEL_NAME }} ./${{ env.ADOT_WHEEL_NAME }} && sudo python3.10 -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> "$GITHUB_ENV"
8181
else
8282
latest_release_version=$(curl -sL https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest | grep -oP '/releases/tag/v\K[0-9]+\.[0-9]+\.[0-9]+' | head -n 1)
8383
echo "The latest version is $latest_release_version"
8484
echo GET_ADOT_WHEEL_COMMAND="wget -O aws-opentelemetry-distro https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest/download/aws_opentelemetry_distro-$latest_release_version-py3-none-any.whl \
85-
&& sudo python3.9 -m pip install aws-opentelemetry-distro" >> "$GITHUB_ENV"
85+
&& sudo python3.10 -m pip install aws-opentelemetry-distro" >> "$GITHUB_ENV"
8686
fi
8787
8888
- name: Set Get CW Agent command environment variable

.github/workflows/python-ec2-adot-sigv4-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ on:
1212
required: true
1313
type: string
1414
python-version:
15-
description: "Currently support version 3.8, 3.9, 3.10, 3.11, 3.12, 3.13"
15+
description: "Currently support version 3.10, 3.11, 3.12, 3.13, 3.14"
1616
required: false
1717
type: string
18-
default: '3.9'
18+
default: '3.10'
1919
cpu-architecture:
2020
description: "Permitted values: x86_64 or arm64"
2121
required: false

.github/workflows/python-ec2-asg-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ on:
1515
required: true
1616
type: string
1717
python-version:
18-
description: "Currently support version 3.8, 3.9, 3.10, 3.11, 3.12, 3.13"
18+
description: "Currently support version 3.10, 3.11, 3.12, 3.13, 3.14"
1919
required: false
2020
type: string
21-
default: '3.9'
21+
default: '3.10'
2222
cpu-architecture:
2323
description: "Permitted values: x86_64 or arm64"
2424
required: false

.github/workflows/python-ec2-default-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ on:
1515
required: true
1616
type: string
1717
python-version:
18-
description: "Currently support version 3.8, 3.9, 3.10, 3.11, 3.12, 3.13"
18+
description: "Currently support version 3.10, 3.11, 3.12, 3.13, 3.14"
1919
required: false
2020
type: string
21-
default: '3.9'
21+
default: '3.10'
2222
cpu-architecture:
2323
description: "Permitted values: x86_64 or arm64"
2424
required: false

.github/workflows/python-ecs-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
required: true
1616
type: string
1717
python-version:
18-
description: "Currently support version 3.8, 3.9, 3.10, 3.11, 3.12, 3.13"
18+
description: "Currently support version 3.10, 3.11, 3.12, 3.13, 3.14"
1919
required: false
2020
type: string
2121
default: '3.10'

.github/workflows/python-eks-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
required: true
1919
type: string
2020
python-version:
21-
description: "Currently support version 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14"
21+
description: "Currently support version 3.10, 3.11, 3.12, 3.13, 3.14"
2222
required: false
2323
type: string
2424
default: '3.10'

.github/workflows/python-k8s-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
required: false
1919
type: string
2020
python-version:
21-
description: "Currently support version 3.8, 3.9, 3.10, 3.11, 3.12, 3.13"
21+
description: "Currently support version 3.10, 3.11, 3.12, 3.13, 3.14"
2222
required: false
2323
type: string
2424
default: '3.10'

.github/workflows/python-lambda-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ on:
1515
required: true
1616
type: string
1717
python-version:
18-
description: "Currently support version 3.8, 3.9, 3.10, 3.11, 3.12, 3.13"
18+
description: "Currently support version 3.10, 3.11, 3.12, 3.13, 3.14"
1919
required: false
2020
type: string
21-
default: '3.9'
21+
default: '3.10'
2222
cpu-architecture:
2323
description: "Permitted values: x86_64 or arm64"
2424
required: false

.github/workflows/python-sample-app-ecr-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# This workflow is for building and uploading the Python sample application to ECR.
55
# Python 3.10 will be built and uploaded to all regions to be used by the canary while
6-
# other versions (3.8, 3.9, 3.11, 3.12, 3.13, 3.14) will be uploaded to us-east-1 for the purpose of
6+
# other versions (3.11, 3.12, 3.13, 3.14) will be uploaded to us-east-1 for the purpose of
77
# testing ADOT Python
88
name: Sample App Deployment - Python ECR
99
on:
@@ -75,7 +75,7 @@ jobs:
7575
strategy:
7676
fail-fast: false
7777
matrix:
78-
python-version: [ '3.8', '3.9', '3.11', '3.12', '3.13', '3.14' ]
78+
python-version: [ '3.11', '3.12', '3.13', '3.14' ]
7979
runs-on: ubuntu-latest
8080
steps:
8181
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

terraform/python/ec2/adaptive-sampling/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ variable "get_adot_wheel_command" {
3838
}
3939

4040
variable "language_version" {
41-
default = "3.9"
41+
default = "3.10"
4242
}
4343

4444
variable "cpu_architecture" {

0 commit comments

Comments
 (0)