diff --git a/.github/workflows/deploy-docs-website.yml b/.github/workflows/deploy-docs-website.yml index afd40986..12fb4bc0 100644 --- a/.github/workflows/deploy-docs-website.yml +++ b/.github/workflows/deploy-docs-website.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: "3.10" - run: pip install -r requirements/requirements-docs.txt - run: mkdocs gh-deploy --force diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f3eab342..854c3912 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.10" - uses: TrueBrain/actions-flake8@v2 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 61be46f5..c224e8b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.10" - name: Install dependencies run: | diff --git a/Makefile b/Makefile index f8f27971..f25e3904 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ DOCKER := docker # On Linux we need to do a bit of userid finagling so that the output files # end up being owned by us and not by root. On Mac this works out of the box. DOCKER_USER_ARG := --user "$(shell id -u):$(shell id -g)" -DOCKER_COMMAND = $(DOCKER) run --rm $(DOCKER_USER_ARG) -v "$$PWD":/var/task $(DOCKER_ARGS) +DOCKER_COMMAND = $(DOCKER) run --rm $(DOCKER_USER_ARG) -v "$$PWD":/var/task $(DOCKER_ARGS) --entrypoint "" PYTHON := python3 BUILD_VENV := $(DIR)/.venv @@ -57,7 +57,6 @@ Makefile.config: include Makefile.config ifdef DOCKER_COMMAND -DOCKER_LAMBDA_CI = $(DOCKER_COMMAND) lambci/lambda:build-python3.8 DOCKER_DEPENDENCY_BUILDER = $(DOCKER_COMMAND) tea-dependency-builder endif @@ -71,7 +70,7 @@ all: build ; # Build everything .PHONY: build -build: \ +build: tea-dependency-builder \ $(DIR)/thin-egress-app-code.zip \ $(DIR)/thin-egress-app-dependencies.zip \ $(DIR)/thin-egress-app.yaml \ @@ -106,7 +105,7 @@ $(BUILD_VENV): requirements/requirements-make.txt $(DIR)/thin-egress-app-dependencies.zip: requirements/requirements.txt $(REQUIREMENTS_DEPS) rm -rf $(DIR)/python @mkdir -p $(DIR)/python - $(DOCKER_LAMBDA_CI) build/dependency_builder.sh "$(DIR)/thin-egress-app-dependencies.zip" "$(DIR)" + $(DOCKER_DEPENDENCY_BUILDER) build/dependency_builder.sh "$(DIR)/thin-egress-app-dependencies.zip" "$(DIR)" .SECONDARY: $(DIST_MD_RESOURCES) $(DIST_MD_RESOURCES): $(DIR)/code/%.html: %.md $(BUILD_VENV) @@ -271,8 +270,8 @@ cleandeploy: ############### .PHONY: tea-dependency-builder -tea-dependency-builder: build/lambda-ci.Dockerfile - $(DOCKER) build -f build/lambda-ci.Dockerfile -t tea-dependency-builder ./build +tea-dependency-builder: build/tea-dependency-builder.Dockerfile + $(DOCKER) build -f build/tea-dependency-builder.Dockerfile -t tea-dependency-builder ./build @mkdir -p $(EMPTY) @touch $@ diff --git a/README.MD b/README.MD index 0211fa7b..6a918261 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.10` 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..734c23c7 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 -m pip install \ --upgrade \ -r "$REQUIREMENTS_FILE" \ --target $BUILD_DIR/python \ diff --git a/build/lambda-ci.Dockerfile b/build/lambda-ci.Dockerfile deleted file mode 100644 index cc5152aa..00000000 --- a/build/lambda-ci.Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM lambci/lambda:build-python3.8 - -RUN pip install pip-tools diff --git a/build/tea-dependency-builder.Dockerfile b/build/tea-dependency-builder.Dockerfile new file mode 100644 index 00000000..eed5c650 --- /dev/null +++ b/build/tea-dependency-builder.Dockerfile @@ -0,0 +1,4 @@ +FROM public.ecr.aws/lambda/python:3.10 + +RUN yum install -y git zip +RUN pip install pip-tools diff --git a/cloudformation/thin-egress-app.yaml.j2 b/cloudformation/thin-egress-app.yaml.j2 index 220a071c..c5b8f276 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.10' Layers: - !Ref EgressLambdaDependencyLayer #MemorySize: 128 @@ -558,9 +558,7 @@ Resources: Type: AWS::Lambda::LayerVersion Properties: CompatibleRuntimes: - - python3.6 - - python3.7 - - python3.8 + - python3.10 Content: S3Bucket: !Ref LambdaCodeS3Bucket S3Key: !Ref LambdaCodeDependencyArchive @@ -630,7 +628,7 @@ Resources: OTEL_COLLECTOR_URL: !Ref OtCollectorURL Timeout: !Ref LambdaTimeout Handler: app.app - Runtime: 'python3.8' + Runtime: 'python3.10' Layers: - !Ref EgressLambdaDependencyLayer - !Sub "arn:aws:lambda:${AWS::Region}:901920570463:layer:aws-otel-python-amd64-ver-1-25-0:1" @@ -1110,7 +1108,7 @@ Resources: BUILD_VERSION: "{{ build_version }}" MATURITY: !Ref Maturity Handler: tea_bumper.lambda_handler - Runtime: 'python3.8' + Runtime: 'python3.10' Layers: - !Ref EgressLambdaDependencyLayer diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index 3e603d48..30b77fbe 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile requirements/requirements-dev.in # -boto3==1.35.18 +boto3==1.35.23 # via # -r requirements/requirements-dev.in # moto -botocore==1.35.18 +botocore==1.35.23 # via # -c requirements/requirements.txt # boto3 @@ -40,12 +40,10 @@ docker==7.1.0 # via moto exceptiongroup==1.2.2 # via pytest -idna==3.8 +idna==3.10 # via requests importlib-metadata==7.1.0 - # via - # build - # opentelemetry-api + # via opentelemetry-api iniconfig==2.0.0 # via pytest jinja2==3.1.4 @@ -121,7 +119,7 @@ tomli==2.0.1 # coverage # pip-tools # pytest -urllib3==1.26.20 +urllib3==2.2.3 # via # -c requirements/requirements.txt # botocore @@ -140,7 +138,7 @@ wrapt==1.16.0 # opentelemetry-instrumentation xmltodict==0.13.0 # via moto -zipp==3.20.1 +zipp==3.20.2 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/requirements-docs.txt b/requirements/requirements-docs.txt index 748bd608..16590dbd 100644 --- a/requirements/requirements-docs.txt +++ b/requirements/requirements-docs.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile requirements/requirements-docs.in @@ -16,13 +16,8 @@ colorama==0.4.6 # via mkdocs-material ghp-import==2.1.0 # via mkdocs -idna==3.8 +idna==3.10 # via requests -importlib-metadata==8.4.0 - # via - # markdown - # mkdocs - # mkdocs-get-deps jinja2==3.1.4 # via # mkdocs @@ -45,11 +40,11 @@ mkdocs==1.6.1 # -r requirements/requirements-docs.in # mkdocs-asf-theme # mkdocs-material -mkdocs-asf-theme==0.3.2 +mkdocs-asf-theme==0.4.0 # via -r requirements/requirements-docs.in mkdocs-get-deps==0.2.0 # via mkdocs -mkdocs-material==9.5.34 +mkdocs-material==9.5.35 # via mkdocs-asf-theme mkdocs-material-extensions==1.3.1 # via mkdocs-material @@ -59,7 +54,7 @@ paginate==0.5.7 # via mkdocs-material pathspec==0.12.1 # via mkdocs -platformdirs==4.3.2 +platformdirs==4.3.6 # via mkdocs-get-deps pygments==2.18.0 # via mkdocs-material @@ -67,8 +62,6 @@ pymdown-extensions==10.9 # via mkdocs-material python-dateutil==2.9.0.post0 # via ghp-import -pytz==2024.1 - # via babel pyyaml==6.0.2 # via # mkdocs @@ -77,15 +70,13 @@ pyyaml==6.0.2 # pyyaml-env-tag pyyaml-env-tag==0.1 # via mkdocs -regex==2024.7.24 +regex==2024.9.11 # via mkdocs-material requests==2.32.3 # via mkdocs-material six==1.16.0 # via python-dateutil -urllib3==2.2.2 +urllib3==2.2.3 # via requests -watchdog==4.0.2 +watchdog==5.0.2 # via mkdocs -zipp==3.20.1 - # via importlib-metadata diff --git a/requirements/requirements-make.txt b/requirements/requirements-make.txt index a881ddcd..0d2eb832 100644 --- a/requirements/requirements-make.txt +++ b/requirements/requirements-make.txt @@ -1,11 +1,9 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile requirements/requirements-make.in # -importlib-metadata==8.4.0 - # via markdown jinja2==3.1.4 # via -r requirements/requirements-make.in markdown==3.7 @@ -20,5 +18,3 @@ pymdown-extensions==10.9 # via -r requirements/requirements-make.in pyyaml==6.0.2 # via pymdown-extensions -zipp==3.20.1 - # via importlib-metadata diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt index 9b8d1746..8f7eb685 100644 --- a/requirements/requirements-test.txt +++ b/requirements/requirements-test.txt @@ -1,12 +1,12 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile requirements/requirements-test.in # -boto3==1.35.14 +boto3==1.35.23 # via -r requirements/requirements-test.in -botocore==1.35.14 +botocore==1.35.23 # via # boto3 # s3transfer @@ -16,7 +16,7 @@ charset-normalizer==3.3.2 # via requests exceptiongroup==1.2.2 # via pytest -idna==3.8 +idna==3.10 # via requests iniconfig==2.0.0 # via pytest @@ -28,7 +28,7 @@ packaging==24.1 # via pytest pluggy==1.5.0 # via pytest -pytest==8.3.2 +pytest==8.3.3 # via -r requirements/requirements-test.in python-dateutil==2.9.0.post0 # via botocore @@ -42,7 +42,7 @@ six==1.16.0 # via python-dateutil tomli==2.0.1 # via pytest -urllib3==1.26.20 +urllib3==2.2.3 # via # botocore # requests diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 95794745..c75888da 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,12 +1,12 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile requirements/requirements.in # blessed==1.20.0 # via inquirer -botocore==1.35.18 +botocore==1.35.23 # via chalice cachetools==5.5.0 # via @@ -57,7 +57,7 @@ six==1.16.0 # blessed # chalice # python-dateutil -urllib3==1.26.20 +urllib3==2.2.3 # via # botocore # cfnresponse diff --git a/tea-cli/pyproject.toml b/tea-cli/pyproject.toml index 57265517..913c3e99 100644 --- a/tea-cli/pyproject.toml +++ b/tea-cli/pyproject.toml @@ -14,7 +14,7 @@ packages = [{include = "tea_cli"}] tea = "tea_cli:main.main" [tool.poetry.dependencies] -python = "^3.8" +python = "^3.10" boto3 = "^1.26.163" cryptography = "^41.0.1" diff --git a/tests/test_tea_bumper.py b/tests/test_tea_bumper.py index c4ec094e..f090ffe3 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.10", Role=role["Arn"], Code={ "ZipFile": b64encode(test_lambda_code_zip)