Repository navigation
Add workload through leveraging OCI images to run on CI - #438
henrybear327 wants to merge 2 commits into
Conversation
0ad18e6 to
e3e97d3
Compare
| set -e | ||
|
|
||
| # Async preemption can deliver a signal while the vCPU is in the EL1 MRS path. | ||
| export GOCACHE=/tmp/elfuse-go-cache GOTOOLCHAIN=local GODEBUG=asyncpreemptoff=1 |
There was a problem hiding this comment.
GODEBUG=asyncpreemptoff=1 hides an elfuse bug instead of exercising it: the comment admits that a signal delivered while the vCPU is in the EL1 MRS path breaks the guest, and nothing else tracks that. Every Go guest runs with async preemption on by default, so this lane stays green while that failure ships. As a follow-up, please file an issue with a repro and link it here, so the override can be dropped once it is fixed.
| # Redis treats port 0 as disabled. | ||
| local port="" try=0 | ||
| while [ "$try" -lt 10 ]; do | ||
| port=$((20000 + RANDOM % 20000)) |
There was a problem hiding this comment.
There is a race between the nc -z probe and redis binding the port. Runners on this host share loopback, so another lane can take the port in between, and that shows up as "server guest exited before readiness" with nothing pointing at the real cause. As a follow-up, retry start_server with a fresh port when the guest exits before it is ready.
scripts/ci/oci-runtime.sh runs elfuse on a real runtime per key: python, node, go, jvm, c, and redis, each driving a workload from scripts/ci/workloads and requiring its sentinel. The node and redis lanes serve from one guest to the host or to a second guest, and redis moves to a new port when another process bound its pick first. The go lane keeps async preemption on and requires a goroutine spinning on one P to be preempted. The oci-runtime job builds crane and umoci from source as oci-smoke does, then runs each key on the self-hosted macOS runner. Runners on one host share $HOME, so each key and runner gets a store, kept between runs and named for the hash of elfuse-oci.py and oci-runtime.sh; a change to either starts a fresh store and removes the old one. Like oci-smoke, it pulls the library images through mirror.gcr.io, pinned by digest here, so a run pulls an image only when its store lacks it. The helpers oci-smoke.sh defined move to scripts/ci/oci-lib.sh, which both lanes source. wait_for there probes once more than the oci-smoke.sh copy did, so it fails after the full timeout instead of half a second short of it.
docs/oci-images.md lists what each oci-runtime key covers, and docs/usage.md gives the local command and notes that a runtime lane keeps its images in the store.
e3e97d3 to
f62bd3f
Compare
Based on the workload used in #224 and the newly merged OCI image capability, python, node, go, jvm, c, and redis images are pulled and run on CI for all PR, making sure that elfuse is able to execute common workload normally after changes.
Summary by cubic
Adds
oci-runtimeCI lanes that run elfuse against real runtimes (python, node, go, jvm, c, redis) on OCI images, so common workloads are exercised on every PR and push. The smoke helper functions move to a sharedoci-lib.sh, and each lane is documented indocs/oci-images.mdanddocs/usage.md.The python lane covers threaded SQLite writers, filesystem walks, subprocesses, and Unix sockets longer than the host's
sun_path. The node and redis lanes expose server guests to the host or a second guest, and the go lane formats generated files withGOMAXPROCS=2and requires async preemption to interrupt a spinning goroutine.Written for commit f62bd3f. Summary will update on new commits.