Skip to content

Commit 5ce0f33

Browse files
authored
Merge pull request #336 from andclt/events-v4-serialization-v2
Events v4 serialization v2
2 parents d8deb6b + 61653bf commit 5ce0f33

25 files changed

+164
-77
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ ___
7373
'com.amazonaws:aws-lambda-java-tests:1.1.1'
7474
```
7575

76-
[Leiningen](http://leiningen.org) and [Boot](http://boot-clj.com)
76+
[Leiningen](http://leiningen.org)
7777

7878
```clojure
7979
[com.amazonaws/aws-lambda-java-core "1.2.1"]

aws-lambda-java-runtime-interface-client/Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
x86_64_ALIAS := amd64
2+
aarch64_ALIAS := arm64
3+
ARCHITECTURE := $(shell arch)
4+
ARCHITECTURE_ALIAS := $($(shell echo "$(ARCHITECTURE)_ALIAS"))
5+
ARCHITECTURE_ALIAS := $(or $(ARCHITECTURE_ALIAS),amd64) # on any other archs defaulting to amd64
6+
17
.PHONY: target
28
target:
39
$(info ${HELP_MESSAGE})
@@ -9,12 +15,16 @@ test:
915

1016
.PHONY: setup-codebuild-agent
1117
setup-codebuild-agent:
12-
docker build -t codebuild-agent - < test/integration/codebuild-local/Dockerfile.agent
18+
docker build -t codebuild-agent \
19+
--build-arg ARCHITECTURE=$(ARCHITECTURE_ALIAS) \
20+
- < test/integration/codebuild-local/Dockerfile.agent
1321

1422
.PHONY: test-smoke
1523
test-smoke: setup-codebuild-agent
16-
CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.yml alpine 3.12 corretto11
17-
CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.amazoncorretto.yml amazoncorretto amazoncorretto 11
24+
CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 corretto11 linux/amd64
25+
CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 corretto11 linux/arm64/v8
26+
CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.amazoncorretto.yml amazoncorretto amazoncorretto 11 linux/amd64
27+
CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.amazoncorretto.yml amazoncorretto amazoncorretto 11 linux/arm64/v8
1828

1929
.PHONY: test-integ
2030
test-integ: setup-codebuild-agent

aws-lambda-java-runtime-interface-client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The Runtime Interface Client library can be installed into the image separate fr
2424
Dockerfile
2525
```dockerfile
2626
# we'll use Amazon Linux 2 + Corretto 11 as our base
27-
FROM amazoncorretto:11 as base
27+
FROM public.ecr.aws/amazoncorretto/amazoncorretto:11 as base
2828

2929
# configure the build environment
3030
FROM base as build

aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/ClasspathLoader.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
*/
2020
public class ClasspathLoader {
2121

22-
private static final Set<String> BLACKLIST = new HashSet<>();
22+
private static final Set<String> BLOCKLIST = new HashSet<>();
2323
private static final ClassLoader SYSTEM_CLASS_LOADER = ClassLoader.getSystemClassLoader();
2424
private static final int CLASS_SUFFIX_LEN = ".class".length();
2525

2626
static {
2727
// NativeClient loads a native library and crashes if loaded here so just exclude it
28-
BLACKLIST.add("lambdainternal.runtimeapi.NativeClient");
28+
BLOCKLIST.add("com.amazonaws.services.lambda.runtime.api.client.runtimeapi.NativeClient");
2929
}
3030

3131
private static String pathToClassName(final String path) {
@@ -52,7 +52,7 @@ private static void loadClassesInJar(File file) throws IOException {
5252

5353
String name = pathToClassName(entry.getName());
5454

55-
if(BLACKLIST.contains(name)) {
55+
if(BLOCKLIST.contains(name)) {
5656
continue;
5757
}
5858

aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# we use centos 7 to build against glibc 2.17
2-
FROM centos:7
2+
FROM public.ecr.aws/docker/library/centos:7
33

44
ARG CURL_VERSION
55

aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3
1+
FROM public.ecr.aws/docker/library/alpine:3
22

33
ARG CURL_VERSION
44

aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -euo pipefail
66
SRC_DIR=$(dirname "$0")
77
DST_DIR=${1}
88
MULTI_ARCH=${2}
9-
CURL_VERSION=7.77.0
9+
CURL_VERSION=7.83.0
1010

1111
# Not using associative arrays to maintain bash 3 compatibility with building on MacOS
1212
# MacOS ships with bash 3 and associative arrays require bash 4+
Binary file not shown.
Binary file not shown.
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
FROM public.ecr.aws/amazoncorretto/amazoncorretto:8
22

3+
ARG ARCHITECTURE="amd64"
4+
5+
ENV DOCKER_CLI_PLUGIN_DIR="/root/.docker/cli-plugins"
6+
37
RUN amazon-linux-extras enable docker && \
48
yum clean metadata && \
5-
yum install -y docker tar maven unzip file
9+
yum install -y docker tar maven unzip file wget
10+
RUN mkdir -p "${DOCKER_CLI_PLUGIN_DIR}"
11+
RUN wget \
12+
"$(curl https://api.github.com/repos/docker/buildx/releases/latest | grep browser_download_url | grep "linux-${ARCHITECTURE}" | cut -d '"' -f 4)" \
13+
-O "${DOCKER_CLI_PLUGIN_DIR}"/docker-buildx
14+
RUN chmod +x "${DOCKER_CLI_PLUGIN_DIR}"/docker-buildx

0 commit comments

Comments
 (0)