From f6330399e0cea67617ece5f543f681b7e21da041 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Tue, 19 Mar 2024 15:10:02 +0000 Subject: [PATCH 1/4] new python and package versions --- lambda_functions/v1/Dockerfile | 2 +- lambda_functions/v1/Dockerfile-tests | 2 +- .../v1/requirements/dev-requirements.txt | 22 +++++++++---------- .../v1/requirements/pact-requirements.txt | 2 +- .../v1/requirements/requirements.txt | 6 ++--- mock_sirius_backend/Dockerfile | 2 +- .../environment/modules/lambda/lambda.tf | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lambda_functions/v1/Dockerfile b/lambda_functions/v1/Dockerfile index f209f088..f7bc2442 100644 --- a/lambda_functions/v1/Dockerfile +++ b/lambda_functions/v1/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8-slim-buster +FROM python:3.11-slim-buster WORKDIR /var/www/lambda_functions/v1 # Install Python Dependencies diff --git a/lambda_functions/v1/Dockerfile-tests b/lambda_functions/v1/Dockerfile-tests index 1e3d774a..017d2993 100644 --- a/lambda_functions/v1/Dockerfile-tests +++ b/lambda_functions/v1/Dockerfile-tests @@ -1,4 +1,4 @@ -FROM python:3.8.17-slim-buster +FROM python:3.11-slim-buster ARG FUNCTION_DIR="lpa_data/lambda_functions/v1" # Create function directory diff --git a/lambda_functions/v1/requirements/dev-requirements.txt b/lambda_functions/v1/requirements/dev-requirements.txt index 6534c25e..65e38664 100644 --- a/lambda_functions/v1/requirements/dev-requirements.txt +++ b/lambda_functions/v1/requirements/dev-requirements.txt @@ -1,15 +1,15 @@ -connexion==2.7.0 -fakeredis==1.4.5 +connexion==2.14.2 +fakeredis==2.21.3 flake8==3.8.4 flake8-quotes==3.2.0 hypothesis==6.0.0 -moto~=4.1 -pytest==6.2.1 -pytest-cov==2.10.1 -pytest-env==0.6.2 -pytest-html==3.1.1 -tenacity==6.3.1 -validators==0.18.2 -yarl==1.6.3 -importlib-metadata==4.13.0 +moto~=4.2.3 +pytest==7.4.4 +pytest-cov==4.1.0 +pytest-env==1.1.3 +pytest-html==4.1.1 +tenacity==8.2.3 +validators==0.23.2 +yarl==1.9.4 +importlib-metadata==7.0.2 opg-sirius-service==2.1.1 diff --git a/lambda_functions/v1/requirements/pact-requirements.txt b/lambda_functions/v1/requirements/pact-requirements.txt index 3e193d77..a1c5dd66 100644 --- a/lambda_functions/v1/requirements/pact-requirements.txt +++ b/lambda_functions/v1/requirements/pact-requirements.txt @@ -1,3 +1,3 @@ -connexion==2.7.0 +connexion==2.14.2 swagger-ui-bundle requests diff --git a/lambda_functions/v1/requirements/requirements.txt b/lambda_functions/v1/requirements/requirements.txt index d78b1be9..42a7b991 100644 --- a/lambda_functions/v1/requirements/requirements.txt +++ b/lambda_functions/v1/requirements/requirements.txt @@ -1,9 +1,9 @@ #Update this date to trigger update of layers: 20230619 -Flask==2.2.5 +Flask==3.0.2 markupsafe==2.1.1 -localstack-client==1.39 +localstack-client==2.5 redis==4.4.4 requests==2.31.0 Werkzeug==3.0.1 -requests-aws4auth==1.0.1 +requests-aws4auth==1.2.3 opg-sirius-service==2.1.1 diff --git a/mock_sirius_backend/Dockerfile b/mock_sirius_backend/Dockerfile index c6030e53..e0d0b009 100644 --- a/mock_sirius_backend/Dockerfile +++ b/mock_sirius_backend/Dockerfile @@ -1,5 +1,5 @@ # our base image -FROM python:3.8-slim +FROM python:3.11-slim WORKDIR /var/www/ COPY requirements.txt . diff --git a/terraform/environment/modules/lambda/lambda.tf b/terraform/environment/modules/lambda/lambda.tf index f83c03ea..a89d5471 100644 --- a/terraform/environment/modules/lambda/lambda.tf +++ b/terraform/environment/modules/lambda/lambda.tf @@ -13,7 +13,7 @@ resource "aws_lambda_function" "lambda_function" { function_name = local.lambda role = aws_iam_role.lambda_role.arn handler = var.handler - runtime = "python3.8" + runtime = "python3.11" timeout = 15 depends_on = [aws_cloudwatch_log_group.lambda] layers = [aws_lambda_layer_version.lambda_layer.arn] @@ -58,7 +58,7 @@ resource "aws_lambda_layer_version" "lambda_layer" { source_code_hash = data.archive_file.lambda_layer_archive.output_base64sha256 layer_name = "lpa_requirements_${var.environment}" - compatible_runtimes = ["python3.8"] + compatible_runtimes = ["python3.11"] lifecycle { ignore_changes = [ From 7de0f0e8e6435f6c3a3b2df7c92a085aab991b6f Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Tue, 19 Mar 2024 15:14:14 +0000 Subject: [PATCH 2/4] for compatibility, earlier requests4auth --- lambda_functions/v1/requirements/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda_functions/v1/requirements/requirements.txt b/lambda_functions/v1/requirements/requirements.txt index 42a7b991..04a27cd7 100644 --- a/lambda_functions/v1/requirements/requirements.txt +++ b/lambda_functions/v1/requirements/requirements.txt @@ -5,5 +5,5 @@ localstack-client==2.5 redis==4.4.4 requests==2.31.0 Werkzeug==3.0.1 -requests-aws4auth==1.2.3 +requests-aws4auth==1.0.1 opg-sirius-service==2.1.1 From a3d83cf967f170cf40c4bec2862427feda29d273 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Tue, 19 Mar 2024 15:16:50 +0000 Subject: [PATCH 3/4] fix --- lambda_functions/v1/requirements/dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda_functions/v1/requirements/dev-requirements.txt b/lambda_functions/v1/requirements/dev-requirements.txt index 65e38664..f6312906 100644 --- a/lambda_functions/v1/requirements/dev-requirements.txt +++ b/lambda_functions/v1/requirements/dev-requirements.txt @@ -9,7 +9,7 @@ pytest-cov==4.1.0 pytest-env==1.1.3 pytest-html==4.1.1 tenacity==8.2.3 -validators==0.23.2 +validators==0.23.1 yarl==1.9.4 importlib-metadata==7.0.2 opg-sirius-service==2.1.1 From 768488e5e874b6f5f658b7df1d49b0c87b7506fe Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Wed, 20 Mar 2024 13:30:42 +0000 Subject: [PATCH 4/4] python 3.10 --- lambda_functions/v1/Dockerfile | 2 +- lambda_functions/v1/Dockerfile-tests | 2 +- mock_sirius_backend/Dockerfile | 2 +- terraform/environment/modules/lambda/lambda.tf | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lambda_functions/v1/Dockerfile b/lambda_functions/v1/Dockerfile index f7bc2442..e949e2da 100644 --- a/lambda_functions/v1/Dockerfile +++ b/lambda_functions/v1/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-slim-buster +FROM python:3.10-slim-buster WORKDIR /var/www/lambda_functions/v1 # Install Python Dependencies diff --git a/lambda_functions/v1/Dockerfile-tests b/lambda_functions/v1/Dockerfile-tests index 017d2993..b27fa731 100644 --- a/lambda_functions/v1/Dockerfile-tests +++ b/lambda_functions/v1/Dockerfile-tests @@ -1,4 +1,4 @@ -FROM python:3.11-slim-buster +FROM python:3.10-slim-buster ARG FUNCTION_DIR="lpa_data/lambda_functions/v1" # Create function directory diff --git a/mock_sirius_backend/Dockerfile b/mock_sirius_backend/Dockerfile index e0d0b009..84e4476f 100644 --- a/mock_sirius_backend/Dockerfile +++ b/mock_sirius_backend/Dockerfile @@ -1,5 +1,5 @@ # our base image -FROM python:3.11-slim +FROM python:3.10-slim WORKDIR /var/www/ COPY requirements.txt . diff --git a/terraform/environment/modules/lambda/lambda.tf b/terraform/environment/modules/lambda/lambda.tf index a89d5471..e39ddf8e 100644 --- a/terraform/environment/modules/lambda/lambda.tf +++ b/terraform/environment/modules/lambda/lambda.tf @@ -13,7 +13,7 @@ resource "aws_lambda_function" "lambda_function" { function_name = local.lambda role = aws_iam_role.lambda_role.arn handler = var.handler - runtime = "python3.11" + runtime = "python3.10" timeout = 15 depends_on = [aws_cloudwatch_log_group.lambda] layers = [aws_lambda_layer_version.lambda_layer.arn] @@ -58,7 +58,7 @@ resource "aws_lambda_layer_version" "lambda_layer" { source_code_hash = data.archive_file.lambda_layer_archive.output_base64sha256 layer_name = "lpa_requirements_${var.environment}" - compatible_runtimes = ["python3.11"] + compatible_runtimes = ["python3.10"] lifecycle { ignore_changes = [