From 67aa826c60296573d750425f85b13aa85b7d2039 Mon Sep 17 00:00:00 2001 From: Andy Price Date: Wed, 20 Mar 2024 15:26:50 +0000 Subject: [PATCH] Revert "UML-3337 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 | 4 ++-- mock_sirius_backend/Dockerfile | 2 +- .../environment/modules/lambda/lambda.tf | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lambda_functions/v1/Dockerfile b/lambda_functions/v1/Dockerfile index e949e2da..f209f088 100644 --- a/lambda_functions/v1/Dockerfile +++ b/lambda_functions/v1/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-slim-buster +FROM python:3.8-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 b27fa731..1e3d774a 100644 --- a/lambda_functions/v1/Dockerfile-tests +++ b/lambda_functions/v1/Dockerfile-tests @@ -1,4 +1,4 @@ -FROM python:3.10-slim-buster +FROM python:3.8.17-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 f6312906..6534c25e 100644 --- a/lambda_functions/v1/requirements/dev-requirements.txt +++ b/lambda_functions/v1/requirements/dev-requirements.txt @@ -1,15 +1,15 @@ -connexion==2.14.2 -fakeredis==2.21.3 +connexion==2.7.0 +fakeredis==1.4.5 flake8==3.8.4 flake8-quotes==3.2.0 hypothesis==6.0.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.1 -yarl==1.9.4 -importlib-metadata==7.0.2 +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 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 a1c5dd66..3e193d77 100644 --- a/lambda_functions/v1/requirements/pact-requirements.txt +++ b/lambda_functions/v1/requirements/pact-requirements.txt @@ -1,3 +1,3 @@ -connexion==2.14.2 +connexion==2.7.0 swagger-ui-bundle requests diff --git a/lambda_functions/v1/requirements/requirements.txt b/lambda_functions/v1/requirements/requirements.txt index 04a27cd7..d78b1be9 100644 --- a/lambda_functions/v1/requirements/requirements.txt +++ b/lambda_functions/v1/requirements/requirements.txt @@ -1,7 +1,7 @@ #Update this date to trigger update of layers: 20230619 -Flask==3.0.2 +Flask==2.2.5 markupsafe==2.1.1 -localstack-client==2.5 +localstack-client==1.39 redis==4.4.4 requests==2.31.0 Werkzeug==3.0.1 diff --git a/mock_sirius_backend/Dockerfile b/mock_sirius_backend/Dockerfile index 84e4476f..c6030e53 100644 --- a/mock_sirius_backend/Dockerfile +++ b/mock_sirius_backend/Dockerfile @@ -1,5 +1,5 @@ # our base image -FROM python:3.10-slim +FROM python:3.8-slim WORKDIR /var/www/ COPY requirements.txt . diff --git a/terraform/environment/modules/lambda/lambda.tf b/terraform/environment/modules/lambda/lambda.tf index e39ddf8e..f83c03ea 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.10" + runtime = "python3.8" 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.10"] + compatible_runtimes = ["python3.8"] lifecycle { ignore_changes = [