ci / lint the workflow and the shell (push) Successful in 7s
ci / build, test, smoke (push) Successful in 1m35s
ci / the operator page in a real browser (push) Successful in 2m27s
ci / the same smoke on an image with no base (push) Successful in 4m18s
ci / build the image and smoke it (push) Successful in 4m19s
Run 2500 went red on one assertion — `the two bans the edge wrote are inside one
block: expected 2, got 0` — while the same code was green at 149b2c0 (run 2482).
The engine's bans leave the request path through the durable writer, so the
listing is eventually consistent, and this host had a load average over 100 while
the writer had not run yet. The count is now polled until it answers twice,
bounded at 20 s, so a ban that never arrives still fails the gate. Locally after
the change: passed 256, failed 0.
Run 2501 is the x86-64 half of the AOT measurement and its gate passed there:
RID linux-musl-x64, `binary bytes: 56351320`, `file says: … x86-64 … static-pie
linked, stripped`, `program headers naming an interpreter: 0`, `NEEDED shared
objects: 0`, `image size: 94.5MB`. The job still went red one step later, on the
reporting step: `grep -c` exits 1 when it matches nothing, and a zero count of
refused queries is a finding rather than a step failure. Both greps now report
instead of aborting.
92 lines
4.8 KiB
YAML
92 lines
4.8 KiB
YAML
# The NativeAOT relitigation, run on the architecture that ships it.
|
|
#
|
|
# Not a merge gate. `ci.yml` gates what ships; this one measures what does not
|
|
# ship yet, and it is the only place the x86-64 musl AOT build can be produced —
|
|
# the musl AOT ILC crashes under emulation on Apple Silicon, so a local build
|
|
# can only ever produce the arm64 half of the story.
|
|
#
|
|
# What it gates, and only this: that the AOT link is FULLY STATIC — no PT_INTERP,
|
|
# no NEEDED shared object — because that is the claim `Dockerfile.aot-probe`
|
|
# makes and the claim a scratch image depends on. A build that links against a
|
|
# shared libc would still produce a bootable-looking image and a silently
|
|
# different artifact.
|
|
#
|
|
# What it reports without gating: that the binary then refuses to start, because
|
|
# SQLitePCLRaw resolves libe_sqlite3 by dynamic loading and NativeAOT says
|
|
# "Dynamic loading not supported". Behind that wall sits the next one — EF's
|
|
# precompile-queries generator (docs/ARCHITECTURE.md, NativeAOT entry). Both are
|
|
# recorded here rather than argued, and both are why the shipped images are the
|
|
# chiseled and the self-contained-scratch ones.
|
|
name: aot-probe
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '17 4 * * 1'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
IMAGE: openwaf-aot-probe:ci
|
|
|
|
jobs:
|
|
aot:
|
|
name: the static musl link, on x86-64
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Docker CLI + compose plugin
|
|
run: |
|
|
set -eu
|
|
if command -v docker >/dev/null 2>&1; then
|
|
echo "docker already present: $(docker --version)"
|
|
else
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get update -qq
|
|
apt-get install -qq -y ca-certificates curl gnupg >/dev/null
|
|
install -m 0755 -d /etc/apt/keyrings
|
|
curl -fsSL https://download.docker.com/linux/debian/gpg \
|
|
| gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
|
chmod a+r /etc/apt/keyrings/docker.gpg
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" \
|
|
> /etc/apt/sources.list.d/docker.list
|
|
apt-get update -qq
|
|
apt-get install -qq -y docker-ce-cli docker-compose-plugin docker-buildx-plugin >/dev/null
|
|
fi
|
|
[ -S /var/run/docker.sock ] || { echo "no /var/run/docker.sock on this runner"; exit 1; }
|
|
|
|
- name: Build the AOT image and keep the link report
|
|
run: |
|
|
set -eu
|
|
docker build -f Dockerfile.aot-probe -t "$IMAGE" --progress=plain . 2>&1 | tee /tmp/aot-build.log
|
|
printf 'image size: %s\n' "$(docker image ls --format '{{.Size}}' "$IMAGE")"
|
|
# The gate: the two lines the build stage prints about the binary itself.
|
|
grep -E 'program headers naming an interpreter: 0$' /tmp/aot-build.log >/dev/null \
|
|
|| { echo 'the AOT binary names an interpreter — the link is not static'; exit 1; }
|
|
grep -E 'NEEDED shared objects: 0$' /tmp/aot-build.log >/dev/null \
|
|
|| { echo 'the AOT binary needs a shared object — the link is not static'; exit 1; }
|
|
grep -E 'static-pie linked' /tmp/aot-build.log >/dev/null \
|
|
|| { echo 'file(1) does not call this a static-pie executable'; exit 1; }
|
|
grep -E 'binary bytes: [0-9]+' /tmp/aot-build.log || true
|
|
|
|
# Reported, not gated: what the binary does once it is running. It is
|
|
# expected to die, and the log line it dies with is the finding.
|
|
- name: Start it and record what it says
|
|
run: |
|
|
set -uo pipefail
|
|
docker run -d --name aotprobe -p 18099:8080 \
|
|
-e OPENWAF_ADMIN_TOKEN=ci-only-throwaway \
|
|
-e ReverseProxy__Clusters__upstream__Destinations__upstream1__Address=http://127.0.0.1:1/ \
|
|
"$IMAGE" >/dev/null
|
|
sleep 20
|
|
docker inspect --format 'container state: {{.State.Status}} health: {{if .State.Health}}{{.State.Health.Status}}{{else}}no healthcheck{{end}}' aotprobe
|
|
# `|| true` on both greps: grep exits 1 when it matches nothing, and a
|
|
# zero count is a finding, not a step failure. Measured on run 2501,
|
|
# where the reporting step died on exactly that while the static-link
|
|
# gate above it had already passed (56,351,320-byte static-pie x86-64
|
|
# binary, 0 interpreters, 0 NEEDED, 94.5 MB image).
|
|
docker logs aotprobe 2>&1 | { grep -m1 -E 'Hosting failed to start|DllNotFoundException|Dynamic loading not supported' || echo 'no startup failure line found — that would be news worth reading'; }
|
|
docker logs aotprobe 2>&1 | { grep -c "Query wasn't precompiled and dynamic code isn't supported with NativeAOT" || true; } \
|
|
| sed 's/^/queries refused at run time: /'
|
|
docker rm -f aotprobe >/dev/null 2>&1
|