Skip to content

Update os distro and runtime versions in compatibility tests #80

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 3 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ setup-codebuild-agent:

.PHONY: test-smoke
test-smoke: setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent tests/integration/codebuild-local/test_one.sh tests/integration/codebuild/buildspec.os.alpine.1.yml alpine 3.12 3.8
CODEBUILD_IMAGE_TAG=codebuild-agent tests/integration/codebuild-local/test_one.sh tests/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 3.9

.PHONY: test-integ
test-integ: setup-codebuild-agent
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can include this package in your preferred base image to make that base imag

## Requirements
The Python Runtime Interface Client package currently supports Python versions:
- 3.6.x up to and including 3.9.x
- 3.7.x up to and including 3.9.x

## Usage

Expand Down Expand Up @@ -58,7 +58,7 @@ Example Dockerfile (to keep the image light we use a multi-stage build):
# Define custom function directory
ARG FUNCTION_DIR="/function"

FROM python:buster as build-image
FROM public.ecr.aws/docker/library/python:buster as build-image

# Include global arg in this stage of the build
ARG FUNCTION_DIR
Expand All @@ -82,7 +82,7 @@ RUN pip install \
awslambdaric


FROM python:buster
FROM public.ecr.aws/docker/library/python:buster

# Include global arg in this stage of the build
ARG FUNCTION_DIR
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/codebuild-local/Dockerfile.agent
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM amazonlinux:2
FROM public.ecr.aws/amazonlinux/amazonlinux:2

RUN amazon-linux-extras enable docker && \
yum clean metadata && \
Expand Down
7 changes: 4 additions & 3 deletions tests/integration/codebuild/buildspec.os.alpine.3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:
variables:
OS_DISTRIBUTION: alpine
PYTHON_LOCATION: "/usr/local/bin/python"
TEST_NAME: "aws-lambda-python-rtc-alpine-3-test"
TEST_NAME: "aws-lambda-python-rtc-alpine-test"
batch:
build-matrix:
static:
Expand All @@ -15,9 +15,10 @@ batch:
env:
variables:
DISTRO_VERSION:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
RUNTIME_VERSION:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand Down
1 change: 0 additions & 1 deletion tests/integration/codebuild/buildspec.os.amazonlinux.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ batch:
DISTRO_VERSION:
- "1"
RUNTIME_VERSION:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand Down
1 change: 0 additions & 1 deletion tests/integration/codebuild/buildspec.os.amazonlinux.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ batch:
DISTRO_VERSION:
- "2"
RUNTIME_VERSION:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/codebuild/buildspec.os.centos.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:
variables:
OS_DISTRIBUTION: centos
PYTHON_LOCATION: "/usr/local/bin/python3"
TEST_NAME: "aws-lambda-python-rtc-centos-1-test"
TEST_NAME: "aws-lambda-python-rtc-centos-test"
batch:
build-matrix:
static:
Expand All @@ -17,7 +17,6 @@ batch:
DISTRO_VERSION:
- "7"
RUNTIME_VERSION:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/codebuild/buildspec.os.debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ batch:
variables:
DISTRO_VERSION:
- "buster"
- "bullseye"
RUNTIME_VERSION:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand Down
110 changes: 0 additions & 110 deletions tests/integration/codebuild/buildspec.os.ubuntu.1.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:
variables:
OS_DISTRIBUTION: ubuntu
PYTHON_LOCATION: "/usr/bin/python"
TEST_NAME: "aws-lambda-python-rtc-ubuntu-2-test"
TEST_NAME: "aws-lambda-python-rtc-ubuntu-test"
batch:
build-matrix:
static:
Expand All @@ -16,7 +16,9 @@ batch:
variables:
DISTRO_VERSION:
- "20.04"
- "22.04"
RUNTIME_VERSION:
- "3.7"
- "3.8"
- "3.9"
phases:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/docker/Dockerfile.echo.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG DISTRO_VERSION

# Stage 1 - bundle base image + runtime interface client
# Grab a fresh copy of the image and install GCC
FROM python:${RUNTIME_VERSION}-alpine${DISTRO_VERSION} AS python-alpine
FROM public.ecr.aws/docker/library/python:${RUNTIME_VERSION}-alpine${DISTRO_VERSION} AS python-alpine
# Install libstdc++
RUN apk add --no-cache \
libstdc++
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/docker/Dockerfile.echo.amazonlinux
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG DISTRO_VERSION
# Stage 1 - bundle base image + runtime interface client
# Grab a fresh copy of the image and install Python
FROM amazonlinux:${DISTRO_VERSION} AS python-amazonlinux-builder
FROM public.ecr.aws/amazonlinux/amazonlinux:${DISTRO_VERSION} AS python-amazonlinux-builder

ARG RUNTIME_VERSION

Expand Down Expand Up @@ -38,7 +38,7 @@ RUN RUNTIME_LATEST_VERSION=${RUNTIME_VERSION}.$(curl -s https://www.python.org/f
&& ln -s /usr/local/bin/python${RUNTIME_VERSION} /usr/local/bin/python${RUNTIME_LATEST_VERSION}

# Stage 2 - clean python build dependencies
FROM amazonlinux:${DISTRO_VERSION} AS python-amazonlinux
FROM public.ecr.aws/amazonlinux/amazonlinux:${DISTRO_VERSION} AS python-amazonlinux
RUN yum install -y \
libffi-devel

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/docker/Dockerfile.echo.centos
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG DISTRO_VERSION

# Stage 1 - bundle base image + runtime interface client
# Grab a fresh copy of the image and install Python
FROM centos:${DISTRO_VERSION} AS python-centos-builder
FROM public.ecr.aws/docker/library/centos:${DISTRO_VERSION} AS python-centos-builder

ARG RUNTIME_VERSION

Expand Down Expand Up @@ -39,7 +39,7 @@ RUN RUNTIME_LATEST_VERSION=${RUNTIME_VERSION}.$(curl -s https://www.python.org/f
&& ln -s /usr/local/bin/python${RUNTIME_VERSION} /usr/local/bin/python${RUNTIME_LATEST_VERSION}

# Stage 2 - clean python build dependencies
FROM centos:${DISTRO_VERSION} AS python-centos
FROM public.ecr.aws/docker/library/centos:${DISTRO_VERSION} AS python-centos
RUN yum install -y \
libffi-devel

Expand Down
6 changes: 3 additions & 3 deletions tests/integration/docker/Dockerfile.echo.debian
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG RUNTIME_VERSION
ARG DISTRO_VERSION

# Stage 1 - build function and dependencies
FROM python:${RUNTIME_VERSION}-${DISTRO_VERSION} AS python-debian-builder
FROM public.ecr.aws/docker/library/python:${RUNTIME_VERSION}-${DISTRO_VERSION} AS python-debian-builder

# Install aws-lambda-cpp build dependencies
RUN apt-get update && \
Expand Down Expand Up @@ -40,8 +40,8 @@ RUN pip install \


# Stage 2 - final runtime interface client image
# Grab a fresh slim copy of the Node image
FROM python:${RUNTIME_VERSION}-slim-${DISTRO_VERSION}
# Grab a fresh slim copy of the Python image
FROM public.ecr.aws/docker/library/python:${RUNTIME_VERSION}-slim-${DISTRO_VERSION}

# Include global arg in this stage of the build
ARG FUNCTION_DIR="/home/app/"
Expand Down
6 changes: 5 additions & 1 deletion tests/integration/docker/Dockerfile.echo.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ ARG DISTRO_VERSION

# Stage 1 - bundle base image + runtime interface client
# Grab a fresh copy of the image and install Python
FROM ubuntu:${DISTRO_VERSION} AS python-image
FROM public.ecr.aws/ubuntu/ubuntu:${DISTRO_VERSION} AS python-image

ENV DEBIAN_FRONTEND=noninteractive

ARG RUNTIME_VERSION

# Install python and pip
RUN apt-get update && \
apt-get install -y \
software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && \
apt-get install -y \
curl \
Expand Down