diff --git a/.github/workflows/test-on-push-and-pr.yml b/.github/workflows/test-on-push-and-pr.yml index fe17cda..f12bf0e 100644 --- a/.github/workflows/test-on-push-and-pr.yml +++ b/.github/workflows/test-on-push-and-pr.yml @@ -12,11 +12,45 @@ jobs: steps: - uses: actions/checkout@v2 - env: - GITHUB_WORKSPACE: / - - name: Set up python - uses: actions/setup-python@v2 - with: - python-version: '3.8' - name: Run 'pr' target run: make pr + + alpine: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Run alpine integration tests + run: DISTRO=alpine make test-integ + + amazonlinux: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Run amazonlinux integration tests + run: DISTRO=amazonlinux make test-integ + + centos: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Run centos integration tests + run: DISTRO=centos make test-integ + + debian: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Run debian integration tests + run: DISTRO=debian make test-integ + + ubuntu: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Run ubuntu integration tests + run: DISTRO=ubuntu make test-integ \ No newline at end of file diff --git a/Makefile b/Makefile index ab2ba46..ff99587 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ test-smoke: setup-codebuild-agent .PHONY: test-integ test-integ: setup-codebuild-agent - CODEBUILD_IMAGE_TAG=codebuild-agent tests/integration/codebuild-local/test_all.sh tests/integration/codebuild/. + CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild/. .PHONY: check-security check-security: @@ -41,7 +41,9 @@ dev: init test # Verifications to run before sending a pull request .PHONY: pr -pr: init check-format check-security dev test-smoke +pr: init check-format check-security dev setup-codebuild-agent + CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild + .PHONY: clean clean: diff --git a/RELEASE.CHANGELOG.md b/RELEASE.CHANGELOG.md index 854b8b3..572f874 100644 --- a/RELEASE.CHANGELOG.md +++ b/RELEASE.CHANGELOG.md @@ -1,3 +1,9 @@ +### June 19, 2024 + +`2.0.12`: + +- Relax simplejson dependency and keep it backwards compatible ([#153](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/152)) + ### March 27, 2024 `2.0.11`: diff --git a/awslambdaric/__init__.py b/awslambdaric/__init__.py index 58ca90b..c0d8290 100644 --- a/awslambdaric/__init__.py +++ b/awslambdaric/__init__.py @@ -2,4 +2,4 @@ Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. """ -__version__ = "2.0.11" +__version__ = "2.0.12" diff --git a/awslambdaric/lambda_runtime_marshaller.py b/awslambdaric/lambda_runtime_marshaller.py index 42ee127..3b28313 100644 --- a/awslambdaric/lambda_runtime_marshaller.py +++ b/awslambdaric/lambda_runtime_marshaller.py @@ -16,9 +16,9 @@ class Encoder(json.JSONEncoder): def __init__(self): if os.environ.get("AWS_EXECUTION_ENV") == "AWS_Lambda_python3.12": - super().__init__(use_decimal=False, ensure_ascii=False) + super().__init__(use_decimal=False, ensure_ascii=False, allow_nan=True) else: - super().__init__(use_decimal=False) + super().__init__(use_decimal=False, allow_nan=True) def default(self, obj): if isinstance(obj, decimal.Decimal): diff --git a/requirements/base.txt b/requirements/base.txt index 135561f..819c723 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1 +1 @@ -simplejson==3.18.4 +simplejson>=3.18.4 diff --git a/tests/integration/codebuild-local/test_all.sh b/tests/integration/codebuild-local/test_all.sh index 0c5168c..1a09241 100755 --- a/tests/integration/codebuild-local/test_all.sh +++ b/tests/integration/codebuild-local/test_all.sh @@ -5,6 +5,7 @@ set -euo pipefail CODEBUILD_IMAGE_TAG="${CODEBUILD_IMAGE_TAG:-al2/x86_64/standard/3.0}" DRYRUN="${DRYRUN-0}" +DISTRO="${DISTRO:=""}" function usage { echo "usage: test_all.sh buildspec_yml_dir" @@ -51,10 +52,12 @@ main() { usage exit 1 fi - + BUILDSPEC_YML_DIR="$1" + echo $DISTRO $BUILDSPEC_YML_DIR + ls $BUILDSPEC_YML_DIR HAS_YML=0 - for f in "$BUILDSPEC_YML_DIR"/*.yml ; do + for f in "$BUILDSPEC_YML_DIR"/*"$DISTRO"*.yml ; do [ -f "$f" ] || continue; do_one_yaml "$f" HAS_YML=1 diff --git a/tests/integration/codebuild/buildspec.os.alpine.yml b/tests/integration/codebuild/buildspec.os.alpine.yml index da09a26..8d13f9e 100644 --- a/tests/integration/codebuild/buildspec.os.alpine.yml +++ b/tests/integration/codebuild/buildspec.os.alpine.yml @@ -19,7 +19,6 @@ batch: - "3.14" - "3.15" RUNTIME_VERSION: - - "3.7" - "3.8" - "3.9" - "3.10" diff --git a/tests/integration/codebuild/buildspec.os.centos.yml b/tests/integration/codebuild/buildspec.os.centos.yml index 4058a1e..e6930b9 100644 --- a/tests/integration/codebuild/buildspec.os.centos.yml +++ b/tests/integration/codebuild/buildspec.os.centos.yml @@ -17,7 +17,6 @@ batch: DISTRO_VERSION: - "7" RUNTIME_VERSION: - - "3.7" - "3.8" - "3.9" - "3.10" diff --git a/tests/integration/codebuild/buildspec.os.debian.yml b/tests/integration/codebuild/buildspec.os.debian.yml index 628fd95..7365f07 100644 --- a/tests/integration/codebuild/buildspec.os.debian.yml +++ b/tests/integration/codebuild/buildspec.os.debian.yml @@ -18,7 +18,6 @@ batch: - "buster" - "bullseye" RUNTIME_VERSION: - - "3.7" - "3.8" - "3.9" - "3.10" diff --git a/tests/integration/codebuild/buildspec.os.ubuntu.yml b/tests/integration/codebuild/buildspec.os.ubuntu.yml index b876817..2e312f6 100644 --- a/tests/integration/codebuild/buildspec.os.ubuntu.yml +++ b/tests/integration/codebuild/buildspec.os.ubuntu.yml @@ -18,7 +18,6 @@ batch: - "20.04" - "22.04" RUNTIME_VERSION: - - "3.7" - "3.8" - "3.9" - "3.10" diff --git a/tests/integration/docker/Dockerfile.echo.alpine b/tests/integration/docker/Dockerfile.echo.alpine index 9b239e4..a53efc0 100644 --- a/tests/integration/docker/Dockerfile.echo.alpine +++ b/tests/integration/docker/Dockerfile.echo.alpine @@ -14,14 +14,14 @@ RUN apk add --no-cache \ FROM python-alpine AS build-image # Install aws-lambda-cpp build dependencies RUN apk add --no-cache \ - build-base \ - libtool \ - autoconf \ - automake \ - libexecinfo-dev \ - make \ - cmake \ - libcurl + build-base \ + libtool \ + autoconf \ + automake \ + elfutils-dev \ + make \ + cmake \ + libcurl # Include global args in this stage of the build ARG RIC_BUILD_DIR="/home/build/"