Skip to content

Commit 4feed02

Browse files
authored
Test Python 3.11 runtime in integration tests (#815)
1 parent 476e6e0 commit 4feed02

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/main-build-python39.yml renamed to .github/workflows/main-build-python311.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
name: Python38 Layer Integration Test
2-
# This workflow is for verifying python3.9 layer in Lambda python3.8 environment
1+
name: Python-3.11 Layer Integration Test
2+
# This workflow is for verifying python3.11 layer in Lambda python3.8 environment
33
on:
44
push:
55
branches:
66
- main
77
- release/*
88
paths-ignore:
99
- '.github/**'
10-
- '!.github/workflows/main-build-python39.yml'
10+
- '!.github/workflows/main-build-python311.yml'
1111
- '**.md'
1212
workflow_dispatch:
1313

1414
concurrency:
15-
group: main-build-python39-${{ github.ref_name }}
15+
group: main-build-python311-${{ github.ref_name }}
1616
cancel-in-progress: true
1717

1818

@@ -22,7 +22,7 @@ permissions:
2222
jobs:
2323
integration-test:
2424
runs-on: ubuntu-20.04
25-
name: Python39-${{ matrix.architecture }}-IntegrationTest
25+
name: Python311-${{ matrix.architecture }}-IntegrationTest
2626
strategy:
2727
fail-fast: false
2828
matrix:
@@ -86,7 +86,7 @@ jobs:
8686
TF_VAR_sdk_layer_name: opentelemetry-python-aws-sdk-wrapper-${{ matrix.architecture }}
8787
TF_VAR_function_name: ${{ env.TERRAFORM_LAMBDA_FUNCTION_NAME }}
8888
TF_VAR_architecture: ${{ env.LAMBDA_FUNCTION_ARCH }}
89-
TF_VAR_runtime: 'python3.9'
89+
TF_VAR_runtime: 'python3.11'
9090
- name: Extract endpoint
9191
id: extract-endpoint
9292
run: terraform output -raw api-gateway-url

adot/python/src/template.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ Resources:
1414
Description: Opentelemetry Python layer
1515
ContentUri: ./otel
1616
CompatibleRuntimes:
17-
- python3.10
17+
- python3.8
1818
- python3.9
19+
- python3.10
20+
- python3.11
1921
Metadata:
2022
BuildMethod: makefile
2123
api:
@@ -28,7 +30,7 @@ Resources:
2830
Type: AWS::Serverless::Function
2931
Properties:
3032
Handler: lambda_function.lambda_handler
31-
Runtime: python3.9
33+
Runtime: python3.10
3234
CodeUri: ./function
3335
Description: Build ADOT Python Lambda layer and sample app from scratch
3436
MemorySize: 512

python/integration-tests/aws-sdk/wrapper/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ locals {
55
resource "aws_lambda_layer_version" "sdk_layer" {
66
layer_name = var.sdk_layer_name
77
filename = "${path.module}/../../../../opentelemetry-lambda/python/src/build/layer.zip"
8-
compatible_runtimes = ["python3.10", "python3.9"]
8+
compatible_runtimes = ["python3.10", "python3.11"]
99
license_info = "Apache-2.0"
1010
source_code_hash = filebase64sha256("${path.module}/../../../../opentelemetry-lambda/python/src/build/layer.zip")
1111
}

python/sample-apps/aws-sdk/deploy/wrapper/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ variable "architecture" {
1313
variable "runtime" {
1414
type = string
1515
description = "Python runtime version used for sample Lambda Function"
16-
default = "python3.9"
16+
default = "python3.10"
1717
}

0 commit comments

Comments
 (0)