From e48d19f8cb9d2fca443b82e7e55bdd39d8fdf039 Mon Sep 17 00:00:00 2001 From: Phillip Huang Date: Mon, 26 Jun 2023 05:44:29 -0700 Subject: [PATCH 01/12] Adds '--no-same-owner' option to all scripts tar commands (#46) --- scripts/preinstall.sh | 4 ++-- scripts/update_dependencies.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/preinstall.sh b/scripts/preinstall.sh index 8b9b0305..7a2a71d7 100755 --- a/scripts/preinstall.sh +++ b/scripts/preinstall.sh @@ -20,8 +20,8 @@ else . ./versions # unpack dependencies - tar xzf ./curl-$CURL_VERSION.tar.gz && \ - tar xzf ./aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE.tar.gz + tar xzf ./curl-$CURL_VERSION.tar.gz --no-same-owner && \ + tar xzf ./aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE.tar.gz --no-same-owner ( # Build Curl diff --git a/scripts/update_dependencies.sh b/scripts/update_dependencies.sh index a28bfbc0..9ddcc1ba 100755 --- a/scripts/update_dependencies.sh +++ b/scripts/update_dependencies.sh @@ -32,5 +32,5 @@ wget -c https://github.com/awslabs/aws-lambda-cpp/archive/refs/tags/v$AWS_LAMBDA ) # Pack again and remove the folder -tar -czvf aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE.tar.gz aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE && \ +tar -czvf aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE.tar.gz aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE --no-same-owner && \ rm -rf aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE From beef54fe37bccb1a583848b9001759d1a0d457f2 Mon Sep 17 00:00:00 2001 From: Andrea Culot <95755271+andclt@users.noreply.github.com> Date: Mon, 26 Jun 2023 16:38:02 +0100 Subject: [PATCH 02/12] Use python3.8 in al2 integ tests (#72) --- test/integration/docker/Dockerfile.echo.amazonlinux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/docker/Dockerfile.echo.amazonlinux b/test/integration/docker/Dockerfile.echo.amazonlinux index 28a77e47..61fe15c1 100644 --- a/test/integration/docker/Dockerfile.echo.amazonlinux +++ b/test/integration/docker/Dockerfile.echo.amazonlinux @@ -10,7 +10,7 @@ FROM amazonlinux:${DISTRO_VERSION} AS node-amazonlinux ARG RUNTIME_VERSION ARG DISTRO_VERSION # Install Py3 required to build Node16+ -RUN if [[ "${DISTRO_VERSION}" == "2" ]] ; then amazon-linux-extras install python3 ; fi +RUN if [[ "${DISTRO_VERSION}" == "2" ]] ; then amazon-linux-extras install python3.8 && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 ; fi # Install NodeJS RUN curl -sL https://rpm.nodesource.com/setup_${RUNTIME_VERSION}.x | bash - && \ yum install -y nodejs From 4ce3e806e43c102f9ab75b1035401415592195a9 Mon Sep 17 00:00:00 2001 From: Sean O Brien Date: Wed, 5 Jul 2023 18:10:46 +0100 Subject: [PATCH 03/12] Create pull request template. (#73) --- .github/PULL_REQUEST_TEMPLATE.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..19904207 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +_Issue #, if available:_ + +_Description of changes:_ + +_Target (OCI, Managed Runtime, both):_ + +By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. From 37bc71593b800d9e49a4cec13590abfbc0c24537 Mon Sep 17 00:00:00 2001 From: Andrea Culot <95755271+andclt@users.noreply.github.com> Date: Wed, 27 Sep 2023 10:10:47 +0100 Subject: [PATCH 04/12] Bump package-lock deps (#79) --- package-lock.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 759f2330..45f8b20b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -95,9 +95,9 @@ } }, "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -147,9 +147,9 @@ } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -2984,9 +2984,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -3213,9 +3213,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -5030,9 +5030,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" From 8c9052107d6c1b3451b7da06811d93482ee5b4c3 Mon Sep 17 00:00:00 2001 From: Andrea Culot <95755271+andclt@users.noreply.github.com> Date: Thu, 28 Sep 2023 22:06:23 +0100 Subject: [PATCH 05/12] Remove unrecognized --disable-websockets option (#80) --- scripts/preinstall.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/preinstall.sh b/scripts/preinstall.sh index 7a2a71d7..dabc794d 100755 --- a/scripts/preinstall.sh +++ b/scripts/preinstall.sh @@ -68,7 +68,6 @@ else --disable-unix-sockets \ --disable-verbose \ --disable-versioned-symbols \ - --disable-websockets \ --with-pic \ --without-brotli \ --without-ca-bundle \ From 743fe9db6e8f23c63b4316fa9852e714b678bfdb Mon Sep 17 00:00:00 2001 From: Andrea Culot <95755271+andclt@users.noreply.github.com> Date: Mon, 16 Oct 2023 12:30:22 +0100 Subject: [PATCH 06/12] Update Distros and integration tests (#82) * Replace deprecated install scripts for AmazonLinux integration tests * Remove Alpine3.14 since it has reached EOL * Add Debian bookworm to integration tests --- .../codebuild/buildspec.os.alpine.1.yml | 1 - .../codebuild/buildspec.os.alpine.2.yml | 1 - .../codebuild/buildspec.os.debian.2.yml | 110 ++++++++++++++++++ .../docker/Dockerfile.echo.amazonlinux | 13 ++- 4 files changed, 120 insertions(+), 5 deletions(-) create mode 100644 test/integration/codebuild/buildspec.os.debian.2.yml diff --git a/test/integration/codebuild/buildspec.os.alpine.1.yml b/test/integration/codebuild/buildspec.os.alpine.1.yml index 9a5f5353..701594c2 100644 --- a/test/integration/codebuild/buildspec.os.alpine.1.yml +++ b/test/integration/codebuild/buildspec.os.alpine.1.yml @@ -14,7 +14,6 @@ batch: env: variables: DISTRO_VERSION: - - "3.14" - "3.15" - "3.16" RUNTIME_VERSION: diff --git a/test/integration/codebuild/buildspec.os.alpine.2.yml b/test/integration/codebuild/buildspec.os.alpine.2.yml index 85a04c40..7d194341 100644 --- a/test/integration/codebuild/buildspec.os.alpine.2.yml +++ b/test/integration/codebuild/buildspec.os.alpine.2.yml @@ -16,7 +16,6 @@ batch: env: variables: DISTRO_VERSION: - - "3.14" - "3.15" - "3.16" RUNTIME_VERSION: diff --git a/test/integration/codebuild/buildspec.os.debian.2.yml b/test/integration/codebuild/buildspec.os.debian.2.yml new file mode 100644 index 00000000..dbb6984a --- /dev/null +++ b/test/integration/codebuild/buildspec.os.debian.2.yml @@ -0,0 +1,110 @@ +version: 0.2 + +env: + variables: + OS_DISTRIBUTION: debian + NPX_BINARY_LOCATION: "/usr/local/bin/npx" +batch: + build-matrix: + static: + ignore-failure: false + env: + privileged-mode: true + dynamic: + env: + variables: + DISTRO_VERSION: + - "bookworm" + RUNTIME_VERSION: + - "16" + - "18" +phases: + pre_build: + commands: + - export IMAGE_TAG="nodejs-${OS_DISTRIBUTION}-${DISTRO_VERSION}:${RUNTIME_VERSION}" + - echo "Extracting and including the Runtime Interface Emulator" + - SCRATCH_DIR=".scratch" + - mkdir "${SCRATCH_DIR}" + - ARCHITECTURE=$(arch) + - > + if [[ "$ARCHITECTURE" == "x86_64" ]]; then + RIE="aws-lambda-rie" + elif [[ "$ARCHITECTURE" == "aarch64" ]]; then + RIE="aws-lambda-rie-arm64" + else + echo "Architecture $ARCHITECTURE is not currently supported." + exit 1 + fi + - tar -xvf test/integration/resources/${RIE}.tar.gz --directory "${SCRATCH_DIR}" + - > + cp "test/integration/docker/Dockerfile.echo.${OS_DISTRIBUTION}" \ + "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" + - > + echo "COPY ${SCRATCH_DIR}/${RIE} /usr/bin/${RIE}" >> \ + "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" + - > + if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; + then + echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." + else + echo "Performing DockerHub login . . ." + docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD + fi + - > + echo "RUN apt-get update && apt-get install -y curl" >> \ + "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" + - echo "Building image ${IMAGE_TAG}" + - > + docker build . \ + -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ + -t "${IMAGE_TAG}" \ + --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ + --build-arg DISTRO_VERSION="${DISTRO_VERSION}" + build: + commands: + - set -x + - echo "Running Image ${IMAGE_TAG}" + - docker network create "${OS_DISTRIBUTION}-network" + - > + docker run \ + --detach \ + --name "${OS_DISTRIBUTION}-app" \ + --network "${OS_DISTRIBUTION}-network" \ + --entrypoint="" \ + "${IMAGE_TAG}" \ + sh -c "/usr/bin/${RIE} ${NPX_BINARY_LOCATION} aws-lambda-ric index.handler" + - sleep 2 + - > + docker run \ + --name "${OS_DISTRIBUTION}-tester" \ + --env "TARGET=${OS_DISTRIBUTION}-app" \ + --network "${OS_DISTRIBUTION}-network" \ + --entrypoint="" \ + "${IMAGE_TAG}" \ + sh -c 'curl -X POST "http://${TARGET}:8080/2015-03-31/functions/function/invocations" -d "{}" --max-time 10' + - actual="$(docker logs --tail 1 "${OS_DISTRIBUTION}-tester" | xargs)" + - expected='success' + - | + echo "Response: ${actual}" + if [[ "$actual" != "$expected" ]]; then + echo "fail! runtime: $RUNTIME - expected output $expected - got $actual" + exit -1 + fi + finally: + - | + echo "---------Container Logs: ${OS_DISTRIBUTION}-app----------" + echo + docker logs "${OS_DISTRIBUTION}-app" || true + echo + echo "---------------------------------------------------" + echo "--------Container Logs: ${OS_DISTRIBUTION}-tester--------" + echo + docker logs "${OS_DISTRIBUTION}-tester" || true + echo + echo "---------------------------------------------------" + - echo "Cleaning up..." + - docker stop "${OS_DISTRIBUTION}-app" || true + - docker rm --force "${OS_DISTRIBUTION}-app" || true + - docker stop "${OS_DISTRIBUTION}-tester" || true + - docker rm --force "${OS_DISTRIBUTION}-tester" || true + - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file diff --git a/test/integration/docker/Dockerfile.echo.amazonlinux b/test/integration/docker/Dockerfile.echo.amazonlinux index 61fe15c1..c17bfbd6 100644 --- a/test/integration/docker/Dockerfile.echo.amazonlinux +++ b/test/integration/docker/Dockerfile.echo.amazonlinux @@ -12,9 +12,16 @@ ARG DISTRO_VERSION # Install Py3 required to build Node16+ RUN if [[ "${DISTRO_VERSION}" == "2" ]] ; then amazon-linux-extras install python3.8 && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 ; fi # Install NodeJS -RUN curl -sL https://rpm.nodesource.com/setup_${RUNTIME_VERSION}.x | bash - && \ - yum install -y nodejs - +RUN if [[ "${RUNTIME_VERSION}" == "14" ]]; then \ + yum install -y tar gzip xz && \ + AARCH="$([[ "$(arch)" == "x86_64" ]] && echo "x64" || echo "arm64")" && \ + NODE_URL="https://nodejs.org/download/release/v14.21.3/node-v14.21.3-linux-$AARCH.tar.xz" && \ + curl -fL "$NODE_URL" | tar -C /usr --strip-components 1 -xJf - && \ + yum clean all -q && rm -rf /var/cache/yum ; \ +else \ + yum install https://rpm.nodesource.com/pub_${RUNTIME_VERSION}.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y && \ + yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1s ; \ +fi # Stage 2 - build function and dependencies FROM node-amazonlinux AS build-image From 532f5cfb7cf5b446d430c5fb29e1b348723af779 Mon Sep 17 00:00:00 2001 From: Andrea Culot <95755271+andclt@users.noreply.github.com> Date: Wed, 18 Oct 2023 10:16:26 +0100 Subject: [PATCH 07/12] Clean up images after running integ tests (#84) --- test/integration/codebuild/buildspec.os.alpine.1.yml | 3 ++- test/integration/codebuild/buildspec.os.alpine.2.yml | 1 + test/integration/codebuild/buildspec.os.amazonlinux.2.yml | 3 ++- test/integration/codebuild/buildspec.os.amazonlinux.2023.yml | 3 ++- test/integration/codebuild/buildspec.os.centos.yml | 3 ++- test/integration/codebuild/buildspec.os.debian.2.yml | 3 ++- test/integration/codebuild/buildspec.os.debian.yml | 3 ++- test/integration/codebuild/buildspec.os.ubuntu.1.yml | 3 ++- test/integration/codebuild/buildspec.os.ubuntu.2.yml | 3 ++- 9 files changed, 17 insertions(+), 8 deletions(-) diff --git a/test/integration/codebuild/buildspec.os.alpine.1.yml b/test/integration/codebuild/buildspec.os.alpine.1.yml index 701594c2..dc3ceae7 100644 --- a/test/integration/codebuild/buildspec.os.alpine.1.yml +++ b/test/integration/codebuild/buildspec.os.alpine.1.yml @@ -109,4 +109,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.alpine.2.yml b/test/integration/codebuild/buildspec.os.alpine.2.yml index 7d194341..9ba6dd83 100644 --- a/test/integration/codebuild/buildspec.os.alpine.2.yml +++ b/test/integration/codebuild/buildspec.os.alpine.2.yml @@ -102,3 +102,4 @@ phases: - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.amazonlinux.2.yml b/test/integration/codebuild/buildspec.os.amazonlinux.2.yml index 75257c5b..9426db59 100644 --- a/test/integration/codebuild/buildspec.os.amazonlinux.2.yml +++ b/test/integration/codebuild/buildspec.os.amazonlinux.2.yml @@ -105,4 +105,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml b/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml index 9083fbb0..36751605 100644 --- a/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml +++ b/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml @@ -104,4 +104,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.centos.yml b/test/integration/codebuild/buildspec.os.centos.yml index c5bc27c2..49c92f17 100644 --- a/test/integration/codebuild/buildspec.os.centos.yml +++ b/test/integration/codebuild/buildspec.os.centos.yml @@ -107,4 +107,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.debian.2.yml b/test/integration/codebuild/buildspec.os.debian.2.yml index dbb6984a..bee81012 100644 --- a/test/integration/codebuild/buildspec.os.debian.2.yml +++ b/test/integration/codebuild/buildspec.os.debian.2.yml @@ -107,4 +107,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.debian.yml b/test/integration/codebuild/buildspec.os.debian.yml index 9952ade8..a9160321 100644 --- a/test/integration/codebuild/buildspec.os.debian.yml +++ b/test/integration/codebuild/buildspec.os.debian.yml @@ -109,4 +109,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.ubuntu.1.yml b/test/integration/codebuild/buildspec.os.ubuntu.1.yml index 27e8962b..2427e5ac 100644 --- a/test/integration/codebuild/buildspec.os.ubuntu.1.yml +++ b/test/integration/codebuild/buildspec.os.ubuntu.1.yml @@ -107,4 +107,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.ubuntu.2.yml b/test/integration/codebuild/buildspec.os.ubuntu.2.yml index 21ce6ea6..3875078a 100644 --- a/test/integration/codebuild/buildspec.os.ubuntu.2.yml +++ b/test/integration/codebuild/buildspec.os.ubuntu.2.yml @@ -105,4 +105,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true From 6036a95e9f9e692e3c8dde28980c8fde45b502f2 Mon Sep 17 00:00:00 2001 From: Andrea Culot <95755271+andclt@users.noreply.github.com> Date: Wed, 18 Oct 2023 17:38:19 +0100 Subject: [PATCH 08/12] Update integ tests (#85) * Onboard Alpine3.17 and Alpine 3.18 * Remove node setup from Github actions * Remove Alpine3.15 --- .github/workflows/test-on-push-and-pr.yml | 24 ---- .../codebuild/buildspec.os.alpine.1.yml | 1 - .../codebuild/buildspec.os.alpine.2.yml | 1 - .../codebuild/buildspec.os.alpine.3.yml | 112 ++++++++++++++++++ .../codebuild/buildspec.os.alpine.4.yml | 104 ++++++++++++++++ .../integration/docker/Dockerfile.echo.alpine | 13 +- .../docker/Dockerfile.programmatic.alpine | 13 +- 7 files changed, 240 insertions(+), 28 deletions(-) create mode 100644 test/integration/codebuild/buildspec.os.alpine.3.yml create mode 100644 test/integration/codebuild/buildspec.os.alpine.4.yml diff --git a/.github/workflows/test-on-push-and-pr.yml b/.github/workflows/test-on-push-and-pr.yml index ddd8784d..f12bf0e9 100644 --- a/.github/workflows/test-on-push-and-pr.yml +++ b/.github/workflows/test-on-push-and-pr.yml @@ -12,10 +12,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up node - uses: actions/setup-node@v1 - with: - node-version: '16' - name: Run 'pr' target run: make pr @@ -24,10 +20,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up node - uses: actions/setup-node@v1 - with: - node-version: '16' - name: Run alpine integration tests run: DISTRO=alpine make test-integ @@ -36,10 +28,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up node - uses: actions/setup-node@v1 - with: - node-version: '16' - name: Run amazonlinux integration tests run: DISTRO=amazonlinux make test-integ @@ -48,10 +36,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up node - uses: actions/setup-node@v1 - with: - node-version: '16' - name: Run centos integration tests run: DISTRO=centos make test-integ @@ -60,10 +44,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up node - uses: actions/setup-node@v1 - with: - node-version: '16' - name: Run debian integration tests run: DISTRO=debian make test-integ @@ -72,9 +52,5 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up node - uses: actions/setup-node@v1 - with: - node-version: '16' - name: Run ubuntu integration tests run: DISTRO=ubuntu make test-integ \ No newline at end of file diff --git a/test/integration/codebuild/buildspec.os.alpine.1.yml b/test/integration/codebuild/buildspec.os.alpine.1.yml index dc3ceae7..a754022e 100644 --- a/test/integration/codebuild/buildspec.os.alpine.1.yml +++ b/test/integration/codebuild/buildspec.os.alpine.1.yml @@ -14,7 +14,6 @@ batch: env: variables: DISTRO_VERSION: - - "3.15" - "3.16" RUNTIME_VERSION: - "14" diff --git a/test/integration/codebuild/buildspec.os.alpine.2.yml b/test/integration/codebuild/buildspec.os.alpine.2.yml index 9ba6dd83..7af04039 100644 --- a/test/integration/codebuild/buildspec.os.alpine.2.yml +++ b/test/integration/codebuild/buildspec.os.alpine.2.yml @@ -16,7 +16,6 @@ batch: env: variables: DISTRO_VERSION: - - "3.15" - "3.16" RUNTIME_VERSION: - "14" diff --git a/test/integration/codebuild/buildspec.os.alpine.3.yml b/test/integration/codebuild/buildspec.os.alpine.3.yml new file mode 100644 index 00000000..8b7fd04d --- /dev/null +++ b/test/integration/codebuild/buildspec.os.alpine.3.yml @@ -0,0 +1,112 @@ +version: 0.2 + +env: + variables: + OS_DISTRIBUTION: alpine + NPX_BINARY_LOCATION: "/usr/local/bin/npx" +batch: + build-matrix: + static: + ignore-failure: false + env: + privileged-mode: true + dynamic: + env: + variables: + DISTRO_VERSION: + - "3.17" + - "3.18" + RUNTIME_VERSION: + - "16" + - "18" +phases: + pre_build: + commands: + - export IMAGE_TAG="nodejs-${OS_DISTRIBUTION}-${DISTRO_VERSION}:${RUNTIME_VERSION}" + - echo "Extracting and including the Runtime Interface Emulator" + - SCRATCH_DIR=".scratch" + - mkdir "${SCRATCH_DIR}" + - ARCHITECTURE=$(arch) + - > + if [[ "$ARCHITECTURE" == "x86_64" ]]; then + RIE="aws-lambda-rie" + elif [[ "$ARCHITECTURE" == "aarch64" ]]; then + RIE="aws-lambda-rie-arm64" + else + echo "Architecture $ARCHITECTURE is not currently supported." + exit 1 + fi + - tar -xvf test/integration/resources/${RIE}.tar.gz --directory "${SCRATCH_DIR}" + - > + cp "test/integration/docker/Dockerfile.echo.${OS_DISTRIBUTION}" \ + "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" + - > + echo "RUN apk add curl" >> \ + "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" + - > + echo "COPY ${SCRATCH_DIR}/${RIE} /usr/bin/${RIE}" >> \ + "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" + - > + if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; + then + echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." + else + echo "Performing DockerHub login . . ." + docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD + fi + - echo "Building image ${IMAGE_TAG}" + - > + docker build . \ + -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ + -t "${IMAGE_TAG}" \ + --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ + --build-arg DISTRO_VERSION="${DISTRO_VERSION}" + build: + commands: + - set -x + - echo "Running Image ${IMAGE_TAG}" + - docker network create "${OS_DISTRIBUTION}-network" + - > + docker run \ + --detach \ + --name "${OS_DISTRIBUTION}-app" \ + --network "${OS_DISTRIBUTION}-network" \ + --entrypoint="" \ + "${IMAGE_TAG}" \ + sh -c "/usr/bin/${RIE} ${NPX_BINARY_LOCATION} aws-lambda-ric index.handler" + - sleep 2 + - > + docker run \ + --name "${OS_DISTRIBUTION}-tester" \ + --env "TARGET=${OS_DISTRIBUTION}-app" \ + --network "${OS_DISTRIBUTION}-network" \ + --entrypoint="" \ + "${IMAGE_TAG}" \ + sh -c 'curl -X POST "http://${TARGET}:8080/2015-03-31/functions/function/invocations" -d "{}" --max-time 10' + - actual="$(docker logs --tail 1 "${OS_DISTRIBUTION}-tester" | xargs)" + - expected='success' + - | + echo "Response: ${actual}" + if [[ "$actual" != "$expected" ]]; then + echo "fail! runtime: $RUNTIME - expected output $expected - got $actual" + exit -1 + fi + finally: + - | + echo "---------Container Logs: ${OS_DISTRIBUTION}-app----------" + echo + docker logs "${OS_DISTRIBUTION}-app" || true + echo + echo "---------------------------------------------------" + echo "--------Container Logs: ${OS_DISTRIBUTION}-tester--------" + echo + docker logs "${OS_DISTRIBUTION}-tester" || true + echo + echo "---------------------------------------------------" + - echo "Cleaning up..." + - docker stop "${OS_DISTRIBUTION}-app" || true + - docker rm --force "${OS_DISTRIBUTION}-app" || true + - docker stop "${OS_DISTRIBUTION}-tester" || true + - docker rm --force "${OS_DISTRIBUTION}-tester" || true + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.alpine.4.yml b/test/integration/codebuild/buildspec.os.alpine.4.yml new file mode 100644 index 00000000..75a9932d --- /dev/null +++ b/test/integration/codebuild/buildspec.os.alpine.4.yml @@ -0,0 +1,104 @@ +version: 0.2 + +env: + variables: + OS_DISTRIBUTION: alpine + NODE_BINARY_LOCATION: "/usr/local/bin/node" + NPX_BINARY_LOCATION: "/usr/local/bin/npx" +batch: + build-matrix: + static: + ignore-failure: false + env: + type: LINUX_CONTAINER + privileged-mode: true + dynamic: + env: + variables: + DISTRO_VERSION: + - "3.17" + - "3.18" + RUNTIME_VERSION: + - "16" + - "18" +phases: + pre_build: + commands: + - export IMAGE_TAG="nodejs-${OS_DISTRIBUTION}-${DISTRO_VERSION}:${RUNTIME_VERSION}" + - echo "Extracting and including the Runtime Interface Emulator" + - SCRATCH_DIR=".scratch" + - mkdir "${SCRATCH_DIR}" + - tar -xvf test/integration/resources/aws-lambda-rie.tar.gz --directory "${SCRATCH_DIR}" + - > + cp "test/integration/docker/Dockerfile.programmatic.${OS_DISTRIBUTION}" \ + "${SCRATCH_DIR}/Dockerfile.programmatic.${OS_DISTRIBUTION}.tmp" + - > + echo "RUN apk add curl" >> \ + "${SCRATCH_DIR}/Dockerfile.programmatic.${OS_DISTRIBUTION}.tmp" + - > + echo "COPY ${SCRATCH_DIR}/aws-lambda-rie /usr/bin/aws-lambda-rie" >> \ + "${SCRATCH_DIR}/Dockerfile.programmatic.${OS_DISTRIBUTION}.tmp" + - > + if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; + then + echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." + else + echo "Performing DockerHub login . . ." + docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD + fi + - echo "Building image ${IMAGE_TAG}" + - > + docker build . \ + -f "${SCRATCH_DIR}/Dockerfile.programmatic.${OS_DISTRIBUTION}.tmp" \ + -t "${IMAGE_TAG}" \ + --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ + --build-arg DISTRO_VERSION="${DISTRO_VERSION}" + build: + commands: + - set -x + - echo "Running Image ${IMAGE_TAG}" + - docker network create "${OS_DISTRIBUTION}-network" + - > + docker run \ + --detach \ + -e "NODE_BINARY_LOCATION=${NODE_BINARY_LOCATION}" \ + --name "${OS_DISTRIBUTION}-app" \ + --network "${OS_DISTRIBUTION}-network" \ + --entrypoint="" \ + "${IMAGE_TAG}" \ + sh -c '/usr/bin/aws-lambda-rie ${NODE_BINARY_LOCATION} index.mjs' + - sleep 2 + - > + docker run \ + --name "${OS_DISTRIBUTION}-tester" \ + --env "TARGET=${OS_DISTRIBUTION}-app" \ + --network "${OS_DISTRIBUTION}-network" \ + --entrypoint="" \ + "${IMAGE_TAG}" \ + sh -c 'curl -X POST "http://${TARGET}:8080/2015-03-31/functions/function/invocations" -d "{}" --max-time 10' + - actual="$(docker logs --tail 1 "${OS_DISTRIBUTION}-tester" | xargs)" + - expected='success' + - | + echo "Response: ${actual}" + if [[ "$actual" != "$expected" ]]; then + echo "fail! runtime: $RUNTIME - expected output $expected - got $actual" + echo "---------Container Logs: ${OS_DISTRIBUTION}-app----------" + echo + docker logs "${OS_DISTRIBUTION}-app" + echo + echo "---------------------------------------------------" + echo "--------Container Logs: ${OS_DISTRIBUTION}-tester--------" + echo + docker logs "${OS_DISTRIBUTION}-tester" + echo + echo "---------------------------------------------------" + exit -1 + fi + finally: + - echo "Cleaning up..." + - docker stop "${OS_DISTRIBUTION}-app" || true + - docker rm --force "${OS_DISTRIBUTION}-app" || true + - docker stop "${OS_DISTRIBUTION}-tester" || true + - docker rm --force "${OS_DISTRIBUTION}-tester" || true + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/docker/Dockerfile.echo.alpine b/test/integration/docker/Dockerfile.echo.alpine index b2eea223..bba37350 100644 --- a/test/integration/docker/Dockerfile.echo.alpine +++ b/test/integration/docker/Dockerfile.echo.alpine @@ -5,6 +5,8 @@ ARG DISTRO_VERSION # Stage 1 - build function and dependencies FROM node:${RUNTIME_VERSION}-alpine${DISTRO_VERSION} AS build-image +# Include global arg in this stage of the build +ARG DISTRO_VERSION # Install aws-lambda-cpp build dependencies RUN apk add --update-cache \ build-base \ @@ -14,12 +16,21 @@ RUN apk add --update-cache \ libffi-dev \ autoconf \ automake \ - libexecinfo-dev \ make \ cmake \ python3 \ libcurl +# AWS Lambda CPP and libcurl rely on backtrace which requires libexecinfo from Alpine. +# Since starting from Alpine3.17 libexecinfo is no longer available, temporarily source it from Alpine3.16 +# while awaiting an upstream resolution in AWS Lambda CPP. +RUN if [[ "${DISTRO_VERSION}" == "3.17" ]] || [[ "${DISTRO_VERSION}" == "3.18" ]] ; \ +then \ + apk add --update-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ libexecinfo-dev ; \ +else \ + apk add --update-cache libexecinfo-dev ; \ +fi + # Include global arg in this stage of the build ARG FUNCTION_DIR # Create function directory diff --git a/test/integration/docker/Dockerfile.programmatic.alpine b/test/integration/docker/Dockerfile.programmatic.alpine index 9727fd38..1057cd24 100644 --- a/test/integration/docker/Dockerfile.programmatic.alpine +++ b/test/integration/docker/Dockerfile.programmatic.alpine @@ -5,6 +5,8 @@ ARG DISTRO_VERSION # Stage 1 - build function and dependencies FROM node:${RUNTIME_VERSION}-alpine${DISTRO_VERSION} AS build-image +# Include global arg in this stage of the build +ARG DISTRO_VERSION # Install aws-lambda-cpp build dependencies RUN apk add --update-cache \ build-base \ @@ -14,12 +16,21 @@ RUN apk add --update-cache \ libffi-dev \ autoconf \ automake \ - libexecinfo-dev \ make \ cmake \ python3 \ libcurl +# AWS Lambda CPP and libcurl rely on backtrace which requires libexecinfo from Alpine. +# Since starting from Alpine3.17 libexecinfo is no longer available, temporarily source it from Alpine3.16 +# while awaiting an upstream resolution in AWS Lambda CPP. +RUN if [[ "${DISTRO_VERSION}" == "3.17" ]] || [[ "${DISTRO_VERSION}" == "3.18" ]] ; \ +then \ + apk add --update-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ libexecinfo-dev ; \ +else \ + apk add --update-cache libexecinfo-dev ; \ +fi + # Include global arg in this stage of the build ARG FUNCTION_DIR # Create function directory From d5f78f11b17fd4e8de3201decbf952c3c2a6cbe1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 19:00:16 +0100 Subject: [PATCH 09/12] Bump @babel/traverse from 7.22.5 to 7.23.2 (#86) --- package-lock.json | 172 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 122 insertions(+), 50 deletions(-) diff --git a/package-lock.json b/package-lock.json index 45f8b20b..eb46fa92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,17 +44,89 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/compat-data": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.5.tgz", @@ -104,12 +176,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.5.tgz", - "integrity": "sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -162,22 +234,22 @@ "dev": true }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -239,9 +311,9 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.5.tgz", - "integrity": "sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { "@babel/types": "^7.22.5" @@ -260,9 +332,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -292,13 +364,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -377,9 +449,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.5.tgz", - "integrity": "sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -389,33 +461,33 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.5.tgz", - "integrity": "sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -433,13 +505,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { From d3d0d9b1ee207bdcfcf35a31b9637c82a512121c Mon Sep 17 00:00:00 2001 From: Andrea Culot Date: Tue, 24 Oct 2023 23:44:12 +0100 Subject: [PATCH 10/12] Update distros in integ tests --- test/integration/codebuild/buildspec.os.alpine.2.yml | 2 -- test/integration/codebuild/buildspec.os.alpine.4.yml | 2 -- .../{buildspec.os.debian.yml => buildspec.os.debian.1.yml} | 0 3 files changed, 4 deletions(-) rename test/integration/codebuild/{buildspec.os.debian.yml => buildspec.os.debian.1.yml} (100%) diff --git a/test/integration/codebuild/buildspec.os.alpine.2.yml b/test/integration/codebuild/buildspec.os.alpine.2.yml index 7af04039..5117783f 100644 --- a/test/integration/codebuild/buildspec.os.alpine.2.yml +++ b/test/integration/codebuild/buildspec.os.alpine.2.yml @@ -19,8 +19,6 @@ batch: - "3.16" RUNTIME_VERSION: - "14" - - "16" - - "18" phases: pre_build: commands: diff --git a/test/integration/codebuild/buildspec.os.alpine.4.yml b/test/integration/codebuild/buildspec.os.alpine.4.yml index 75a9932d..55725955 100644 --- a/test/integration/codebuild/buildspec.os.alpine.4.yml +++ b/test/integration/codebuild/buildspec.os.alpine.4.yml @@ -16,10 +16,8 @@ batch: env: variables: DISTRO_VERSION: - - "3.17" - "3.18" RUNTIME_VERSION: - - "16" - "18" phases: pre_build: diff --git a/test/integration/codebuild/buildspec.os.debian.yml b/test/integration/codebuild/buildspec.os.debian.1.yml similarity index 100% rename from test/integration/codebuild/buildspec.os.debian.yml rename to test/integration/codebuild/buildspec.os.debian.1.yml From 3b83f79e27a1e342008a03164f534c498e6596e7 Mon Sep 17 00:00:00 2001 From: Andrea Culot Date: Tue, 24 Oct 2023 23:47:10 +0100 Subject: [PATCH 11/12] Add Node20 to the test matrix --- README.md | 1 + test/integration/codebuild/buildspec.os.alpine.3.yml | 1 + test/integration/codebuild/buildspec.os.alpine.4.yml | 2 +- test/integration/codebuild/buildspec.os.amazonlinux.2023.yml | 1 + test/integration/codebuild/buildspec.os.centos.yml | 1 + test/integration/codebuild/buildspec.os.debian.1.yml | 1 + test/integration/codebuild/buildspec.os.debian.2.yml | 1 + test/integration/codebuild/buildspec.os.ubuntu.2.yml | 1 + 8 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98932542..041e0e2a 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ The NodeJS Runtime Interface Client package currently supports NodeJS versions: - 14.x - 16.x - 18.x + - 20.x ## Usage diff --git a/test/integration/codebuild/buildspec.os.alpine.3.yml b/test/integration/codebuild/buildspec.os.alpine.3.yml index 8b7fd04d..3f567878 100644 --- a/test/integration/codebuild/buildspec.os.alpine.3.yml +++ b/test/integration/codebuild/buildspec.os.alpine.3.yml @@ -19,6 +19,7 @@ batch: RUNTIME_VERSION: - "16" - "18" + - "20" phases: pre_build: commands: diff --git a/test/integration/codebuild/buildspec.os.alpine.4.yml b/test/integration/codebuild/buildspec.os.alpine.4.yml index 55725955..a4528465 100644 --- a/test/integration/codebuild/buildspec.os.alpine.4.yml +++ b/test/integration/codebuild/buildspec.os.alpine.4.yml @@ -18,7 +18,7 @@ batch: DISTRO_VERSION: - "3.18" RUNTIME_VERSION: - - "18" + - "20" phases: pre_build: commands: diff --git a/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml b/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml index 36751605..bdda5692 100644 --- a/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml +++ b/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml @@ -17,6 +17,7 @@ batch: - "2023" RUNTIME_VERSION: - "18" + - "20" phases: pre_build: commands: diff --git a/test/integration/codebuild/buildspec.os.centos.yml b/test/integration/codebuild/buildspec.os.centos.yml index 49c92f17..586f4cf6 100644 --- a/test/integration/codebuild/buildspec.os.centos.yml +++ b/test/integration/codebuild/buildspec.os.centos.yml @@ -20,6 +20,7 @@ batch: - "14" - "16" - "18" + - "20" phases: pre_build: commands: diff --git a/test/integration/codebuild/buildspec.os.debian.1.yml b/test/integration/codebuild/buildspec.os.debian.1.yml index a9160321..9978db79 100644 --- a/test/integration/codebuild/buildspec.os.debian.1.yml +++ b/test/integration/codebuild/buildspec.os.debian.1.yml @@ -20,6 +20,7 @@ batch: - "14" - "16" - "18" + - "20" phases: pre_build: commands: diff --git a/test/integration/codebuild/buildspec.os.debian.2.yml b/test/integration/codebuild/buildspec.os.debian.2.yml index bee81012..146ffc56 100644 --- a/test/integration/codebuild/buildspec.os.debian.2.yml +++ b/test/integration/codebuild/buildspec.os.debian.2.yml @@ -18,6 +18,7 @@ batch: RUNTIME_VERSION: - "16" - "18" + - "20" phases: pre_build: commands: diff --git a/test/integration/codebuild/buildspec.os.ubuntu.2.yml b/test/integration/codebuild/buildspec.os.ubuntu.2.yml index 3875078a..95f6b226 100644 --- a/test/integration/codebuild/buildspec.os.ubuntu.2.yml +++ b/test/integration/codebuild/buildspec.os.ubuntu.2.yml @@ -18,6 +18,7 @@ batch: - "22.04" RUNTIME_VERSION: - "18" + - "20" phases: pre_build: commands: From b8d562ee8e541377c3910bd3b16ea075894bfd27 Mon Sep 17 00:00:00 2001 From: Andrea Culot <95755271+andclt@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:42:54 +0100 Subject: [PATCH 12/12] Release aws-lambda-ric 3.1.0 (#88) --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index eb46fa92..d0d6913d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "aws-lambda-ric", - "version": "3.0.0", + "version": "3.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "aws-lambda-ric", - "version": "3.0.0", + "version": "3.1.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 4820d07d..8a7374ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aws-lambda-ric", - "version": "3.0.0", + "version": "3.1.0", "description": "AWS Lambda Runtime Interface Client for NodeJs", "homepage": "https://github.com/aws/aws-lambda-nodejs-runtime-interface-client", "main": "dist/index.mjs",