Skip to content

Upgrade python version to 3.10 #5632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 28 additions & 46 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
version: 2.1

parameters:
ubuntu-amd64-machine-image:
type: string
default: "ubuntu-2004:2022.04.1"
ubuntu-arm64-machine-image:
type: string
default: "ubuntu-2004:2022.04.1"

executors:
ubuntu-machine-amd64:
machine:
image: << pipeline.parameters.ubuntu-amd64-machine-image >>

jobs:
install:
machine:
image: ubuntu-2004:202107-02
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- checkout
Expand All @@ -13,11 +25,9 @@ jobs:
name: Install prerequisites
command: |
sudo apt-get update
sudo apt-get install -y libsasl2-dev python3.8-venv python3.8-dev
sudo apt-get install -y libsasl2-dev
- run:
name: Setup environment
environment:
VENV_BIN: "/usr/bin/python3.8 -m venv"
command: |
make install
mkdir -p target/reports
Expand All @@ -33,8 +43,7 @@ jobs:
- repo

preflight:
docker:
- image: buildpack-deps:focal
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
Expand All @@ -44,8 +53,7 @@ jobs:
command: make lint

unit-tests:
docker:
- image: buildpack-deps:focal
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
Expand All @@ -70,8 +78,7 @@ jobs:
- repo/target/coverage/

itest-lambda-docker:
machine:
image: ubuntu-2004:202107-02
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
Expand Down Expand Up @@ -134,8 +141,7 @@ jobs:
path: target/reports/

itest-sqs-provider:
machine:
image: ubuntu-2004:202107-02
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
Expand Down Expand Up @@ -170,8 +176,7 @@ jobs:
path: target/reports/

itest-lambda-provider:
machine:
image: ubuntu-2004:202107-02
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
Expand All @@ -197,8 +202,7 @@ jobs:
path: target/reports/

itest-bootstrap:
machine:
image: ubuntu-2004:202107-02
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
Expand Down Expand Up @@ -244,26 +248,6 @@ jobs:
steps:
- attach_workspace:
at: /tmp/workspace
- when:
condition:
equal: [ arm64, << parameters.platform >> ]
steps:
- run:
# Since we are using an old version of ubuntu, we need to install the latest version of docker
name: Update docker engine to most current
command: |
# Remove old version
sudo apt-get remove --purge docker docker-engine docker.io containerd runc -y
# Install Docker deb package repo
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
# Install the latest version of Docker and haveged
# (https://github.com/docker/compose/issues/6678#issuecomment-526831488)
sudo apt-get install docker-ce docker-ce-cli containerd.io haveged -y
sudo usermod -aG docker $USER
- run:
name: Build full docker image
command: make docker-build
Expand Down Expand Up @@ -301,7 +285,7 @@ jobs:
type: string
machine_image:
description: "CircleCI machine type to run at"
default: "ubuntu-2004:202107-02"
default: << pipeline.parameters.ubuntu-amd64-machine-image >>
type: string
machine:
image: << parameters.machine_image >>
Expand Down Expand Up @@ -333,8 +317,7 @@ jobs:
- repo/target/coverage/

report:
docker:
- image: buildpack-deps:focal
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
Expand All @@ -358,8 +341,7 @@ jobs:
path: htmlcov/

docker-push:
machine:
image: ubuntu-2004:202107-02
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
Expand Down Expand Up @@ -438,7 +420,7 @@ workflows:
- docker-build:
name: docker-build-amd64
platform: amd64
machine_image: ubuntu-2004:202107-02
machine_image: << pipeline.parameters.ubuntu-amd64-machine-image >>
resource_class: medium
requires:
- preflight
Expand All @@ -447,22 +429,22 @@ workflows:
platform: arm64
# The latest version of ubuntu is not yet supported for ARM:
# https://circleci.com/docs/2.0/arm-resources/
machine_image: ubuntu-2004:202101-01
machine_image: << pipeline.parameters.ubuntu-arm64-machine-image >>
resource_class: arm.medium
requires:
- preflight
- docker-test:
name: docker-test-arm64
platform: arm64
resource_class: arm.medium
machine_image: ubuntu-2004:202101-01
machine_image: << pipeline.parameters.ubuntu-arm64-machine-image >>
requires:
- docker-build-arm64
- docker-test:
name: docker-test-amd64
platform: amd64
resource_class: medium
machine_image: ubuntu-2004:202107-02
machine_image: << pipeline.parameters.ubuntu-amd64-machine-image >>
requires:
- docker-build-amd64
- report:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pro-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:
uses: actions/checkout@v2
with:
path: localstack
- name: Set up Python 3.8
- name: Set up Python 3.10
id: setup-python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.10'
- name: Set up Node 14.x
uses: actions/setup-node@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG IMAGE_TYPE=full

# java-builder: Stage to build a custom JRE (with jlink)
FROM python:3.8.13-slim-buster@sha256:8b65f13c26b411a8dd331e60ab12e36058aef2a4586eaf0da6b6cc5522f9852d as java-builder
FROM python:3.10.4-slim-buster@sha256:48c4a798972f30b485fea59076ec186644da63c1845f38e32b6c2fada51e7144 as java-builder
ARG TARGETARCH

# install OpenJDK 11
Expand Down Expand Up @@ -34,7 +34,7 @@ jdk.localedata --include-locales en,th \


# base: Stage which installs necessary runtime dependencies (OS packages, java, maven,...)
FROM python:3.8.13-slim-buster@sha256:8b65f13c26b411a8dd331e60ab12e36058aef2a4586eaf0da6b6cc5522f9852d as base
FROM python:3.10.4-slim-buster@sha256:48c4a798972f30b485fea59076ec186644da63c1845f38e32b6c2fada51e7144 as base
ARG TARGETARCH

# Install runtime OS package dependencies
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
License :: OSI Approved :: Apache Software License
Topic :: Internet
Topic :: Software Development :: Testing
Expand Down