From 310373446af03f1f99f9a50badf3df2c8a288c08 Mon Sep 17 00:00:00 2001 From: gjclark Date: Wed, 11 Sep 2024 14:29:23 -0800 Subject: [PATCH] feat: Use python3.9 --- Makefile | 2 +- README.MD | 2 +- build/dependency_builder.sh | 2 +- build/lambda-ci.Dockerfile | 2 +- cloudformation/thin-egress-app.yaml.j2 | 7 ++++--- tests/test_tea_bumper.py | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e3b3aef5..4cd8b301 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ Makefile.config: include Makefile.config ifdef DOCKER_COMMAND -DOCKER_LAMBDA_CI = $(DOCKER_COMMAND) lambci/lambda:build-python3.8 +DOCKER_LAMBDA_CI = $(DOCKER_COMMAND) lambci/lambda:build-python3.9 DOCKER_DEPENDENCY_BUILDER = $(DOCKER_COMMAND) tea-dependency-builder endif diff --git a/README.MD b/README.MD index 0211fa7b..3c22b2e7 100644 --- a/README.MD +++ b/README.MD @@ -40,7 +40,7 @@ releases see the [GitHub Actions README](.github/workflows/README.md).* In order to build TEA, you will need to have a few tools installed: - `make` for build automation -- `python3.8` for running tests and creating the CloudFormation template +- `python3.9` for running tests and creating the CloudFormation template - `docker` for building the dependency layer - `git` for installing rain-api-core - `zip` for creating zip files diff --git a/build/dependency_builder.sh b/build/dependency_builder.sh index 2ef5b670..72907924 100755 --- a/build/dependency_builder.sh +++ b/build/dependency_builder.sh @@ -12,7 +12,7 @@ mkdir -p $BUILD_DIR/python cd $BUILD_DIR/python || exit echo "Installing ${REQUIREMENTS_FILE}" -python3.8 -m pip install \ +python3.9 -m pip install \ --upgrade \ -r "$REQUIREMENTS_FILE" \ --target $BUILD_DIR/python \ diff --git a/build/lambda-ci.Dockerfile b/build/lambda-ci.Dockerfile index cc5152aa..e0ef814e 100644 --- a/build/lambda-ci.Dockerfile +++ b/build/lambda-ci.Dockerfile @@ -1,3 +1,3 @@ -FROM lambci/lambda:build-python3.8 +FROM lambci/lambda:build-python3.9 RUN pip install pip-tools diff --git a/cloudformation/thin-egress-app.yaml.j2 b/cloudformation/thin-egress-app.yaml.j2 index a13e85c3..613b2132 100644 --- a/cloudformation/thin-egress-app.yaml.j2 +++ b/cloudformation/thin-egress-app.yaml.j2 @@ -532,7 +532,7 @@ Resources: vpcid: !Sub "${PrivateVPC}" Timeout: !Ref LambdaTimeout Handler: update_lambda.lambda_handler - Runtime: 'python3.8' + Runtime: 'python3.9' Layers: - !Ref EgressLambdaDependencyLayer #MemorySize: 128 @@ -561,6 +561,7 @@ Resources: - python3.6 - python3.7 - python3.8 + - python3.9 # TODO (gjclark): Make sure that 3.8 and 3.9 do both work Content: S3Bucket: !Ref LambdaCodeS3Bucket S3Key: !Ref LambdaCodeDependencyArchive @@ -630,7 +631,7 @@ Resources: OTEL_COLLECTOR_URL: !Ref OtCollectorURL Timeout: !Ref LambdaTimeout Handler: app.app - Runtime: 'python3.8' + Runtime: 'python3.9' Layers: - !Ref EgressLambdaDependencyLayer - !Sub "arn:aws:lambda:${AWS::Region}:901920570463:layer:aws-otel-python38-ver-1-5-0:3" @@ -1110,7 +1111,7 @@ Resources: BUILD_VERSION: "{{ build_version }}" MATURITY: !Ref Maturity Handler: tea_bumper.lambda_handler - Runtime: 'python3.8' + Runtime: 'python3.9' Layers: - !Ref EgressLambdaDependencyLayer diff --git a/tests/test_tea_bumper.py b/tests/test_tea_bumper.py index c4ec094e..b94275aa 100644 --- a/tests/test_tea_bumper.py +++ b/tests/test_tea_bumper.py @@ -35,7 +35,7 @@ def test_lambda(client_iam, client_lambda, test_lambda_code_zip): client_lambda.create_function( FunctionName="test-lambda", - Runtime="python3.8", + Runtime="python3.9", Role=role["Arn"], Code={ "ZipFile": b64encode(test_lambda_code_zip)