Skip to content

Commit 400c645

Browse files
author
Mohammed Ehab
committed
ci: make Alpine test reflect real customer install; drop redundant job
Two changes so the suite is non-redundant and matches customer behavior: 1. Remove elfutils-dev from Dockerfile.echo.alpine. With libdw present, backward-cpp uses the DWARF backend and never includes execinfo.h, which masked the musl/Alpine build failure (#128) - the CI built clean even on Alpine 3.17+ while real customers (minimal documented deps, no elfutils-dev) failed. Without it the integration test now exercises the execinfo.h path and genuinely guards the fix. Verified: pre-fix code now fails the Alpine build with 'execinfo.h: No such file', fixed code builds and invokes. 2. Remove the pip-install-from-source job: it reused the same per-OS Dockerfiles + RIE invoke as integration-test, so it duplicated coverage. With change (1), integration-test already covers the customer install path across all supported OS/Python combinations.
1 parent 113d147 commit 400c645

2 files changed

Lines changed: 7 additions & 117 deletions

File tree

.github/workflows/test-on-push-and-pr.yml

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -245,118 +245,3 @@ jobs:
245245
TEST_NAME="ric-integ-test"
246246
docker rm -f "${TEST_NAME}-app" "${TEST_NAME}-tester" 2>/dev/null || true
247247
docker network rm "${TEST_NAME}-net" 2>/dev/null || true
248-
249-
# Builds awslambdaric from source and runs an end-to-end invoke through the
250-
# Lambda RIE on every supported OS, pinned to the newest Python (3.14). The
251-
# source install compiles the vendored aws-lambda-cpp (the backward.cpp /
252-
# execinfo.h path), so the Alpine (musl) row guards the libexecinfo regression
253-
# from issue #128. Reuses the per-OS Dockerfiles (ubuntu via deadsnakes,
254-
# Amazon Linux builds Python from source) since there are no official
255-
# python:3.14 images for those distros. Amazon Linux 2 is omitted as it does
256-
# not provide Python 3.14.
257-
pip-install-from-source:
258-
runs-on: ubuntu-latest
259-
strategy:
260-
fail-fast: false
261-
matrix:
262-
include:
263-
- distro: alpine
264-
distro_version: "3.21"
265-
runtime_version: "3.14"
266-
python_location: /usr/local/bin/python
267-
- distro: debian
268-
distro_version: bookworm
269-
runtime_version: "3.14"
270-
python_location: /usr/local/bin/python
271-
- distro: ubuntu
272-
distro_version: "24.04"
273-
runtime_version: "3.14"
274-
python_location: /usr/bin/python3.14
275-
- distro: amazonlinux2023
276-
distro_version: "2023"
277-
runtime_version: "3.14"
278-
python_location: /usr/local/bin/python3
279-
280-
name: "pip install + invoke / ${{ matrix.distro }} ${{ matrix.distro_version }} / python ${{ matrix.runtime_version }}"
281-
282-
steps:
283-
- uses: actions/checkout@v4
284-
285-
- name: Extract RIE
286-
run: |
287-
mkdir -p .scratch
288-
ARCHITECTURE=$(arch)
289-
if [[ "$ARCHITECTURE" == "x86_64" ]]; then
290-
RIE="aws-lambda-rie"
291-
elif [[ "$ARCHITECTURE" == "aarch64" ]]; then
292-
RIE="aws-lambda-rie-arm64"
293-
else
294-
echo "Architecture $ARCHITECTURE is not currently supported."
295-
exit 1
296-
fi
297-
tar -xvf tests/integration/resources/${RIE}.tar.gz --directory .scratch
298-
echo "RIE=${RIE}" >> "$GITHUB_ENV"
299-
300-
- name: Build Docker image
301-
run: |
302-
DOCKERFILE="tests/integration/docker/Dockerfile.echo.${{ matrix.distro }}"
303-
TMPFILE=".scratch/Dockerfile.tmp"
304-
cp "$DOCKERFILE" "$TMPFILE"
305-
if [[ "${{ matrix.distro }}" == "alpine" ]]; then
306-
echo "RUN apk add curl" >> "$TMPFILE"
307-
fi
308-
echo "COPY .scratch/${RIE} /usr/bin/${RIE}" >> "$TMPFILE"
309-
docker build . \
310-
-f "$TMPFILE" \
311-
-t ric-piptest \
312-
--build-arg RUNTIME_VERSION=${{ matrix.runtime_version }} \
313-
--build-arg DISTRO_VERSION=${{ matrix.distro_version }} \
314-
--build-arg ARCHITECTURE=$(arch)
315-
316-
- name: Run invoke test
317-
run: |
318-
TEST_NAME="ric-piptest"
319-
docker network create "${TEST_NAME}-net"
320-
321-
docker run \
322-
--detach \
323-
--name "${TEST_NAME}-app" \
324-
--network "${TEST_NAME}-net" \
325-
--entrypoint="" \
326-
ric-piptest \
327-
sh -c "/usr/bin/${RIE} ${{ matrix.python_location }} -m awslambdaric app.handler"
328-
329-
sleep 2
330-
331-
docker run \
332-
--name "${TEST_NAME}-tester" \
333-
--env "TARGET=${TEST_NAME}-app" \
334-
--network "${TEST_NAME}-net" \
335-
--entrypoint="" \
336-
ric-piptest \
337-
sh -c 'curl -sS -X POST "http://${TARGET}:8080/2015-03-31/functions/function/invocations" -d "{}" --max-time 10'
338-
339-
ACTUAL="$(docker logs --tail 1 "${TEST_NAME}-tester" | xargs)"
340-
EXPECTED="success"
341-
echo "Response: ${ACTUAL}"
342-
if [ "$ACTUAL" != "$EXPECTED" ]; then
343-
echo "FAIL: expected '${EXPECTED}', got '${ACTUAL}'"
344-
exit 1
345-
fi
346-
echo "PASS"
347-
348-
- name: Dump container logs
349-
if: always()
350-
run: |
351-
TEST_NAME="ric-piptest"
352-
echo "=== App container logs ==="
353-
docker logs "${TEST_NAME}-app" 2>&1 || true
354-
echo "=== Tester container logs ==="
355-
docker logs "${TEST_NAME}-tester" 2>&1 || true
356-
357-
- name: Cleanup
358-
if: always()
359-
run: |
360-
TEST_NAME="ric-piptest"
361-
docker rm -f "${TEST_NAME}-app" "${TEST_NAME}-tester" 2>/dev/null || true
362-
docker network rm "${TEST_NAME}-net" 2>/dev/null || true

tests/integration/docker/Dockerfile.echo.alpine

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ RUN apk add --no-cache \
1313

1414
# Stage 2 - build function and dependencies
1515
FROM python-alpine AS build-image
16-
# Install aws-lambda-cpp build dependencies
16+
# Install aws-lambda-cpp build dependencies.
17+
# NOTE: this is the minimal toolchain a customer needs to build awslambdaric
18+
# from source on Alpine. We intentionally do NOT install elfutils-dev: with
19+
# libdw present, the bundled backward-cpp uses the DWARF backend and never
20+
# includes execinfo.h, which would mask the musl/Alpine build issue (#128).
21+
# Without it, backward-cpp falls back to the execinfo.h path - exactly what
22+
# customers hit - so this test genuinely exercises the fix.
1723
RUN apk add --no-cache \
1824
build-base \
1925
libtool \
2026
autoconf \
2127
automake \
22-
elfutils-dev \
2328
make \
2429
cmake \
2530
libcurl

0 commit comments

Comments
 (0)