Skip to content

ci: pin eunomia example tests to Ubuntu 22.04 for LLVM 14 - #236

Merged
yunwei37 merged 3 commits into
mainfrom
fix/pin-eunomia-examples-runner-2204
Nov 24, 2026
Merged

yunwei37 merged 3 commits into
mainfrom
fix/pin-eunomia-examples-runner-2204

Conversation

@yunwei37

@yunwei37 yunwei37 commented Nov 4, 2026

Copy link
Copy Markdown
Member

Problem

The Test eunomia-bpf example CI workflow uses ubuntu-latest, currently Ubuntu 26.04, where llvm-14-dev is unavailable. Its install deps step fails before any examples run: https://github.com/eunomia-bpf/bpf-developer-tutorial/actions/runs/41256561216.

Change

Pin that workflow to Ubuntu 22.04, which provides LLVM 14, while preserving its existing dependency list and test steps. The other workflows and downstream sync remain unchanged.

Validation

Confirmed the failing job log ends with Unable to locate package llvm-14-dev on Ubuntu 26.04. The change is limited to the runner selection. Full workflow verification is pending GitHub Actions on this branch.

Copilot AI balanced review requested due to automatic review settings November 4, 2026 18:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the Ubuntu 22.04 runner pin, though full GitHub Actions verification remains pending.

No open issues 🎉

What changed in this PR

Pins the eunomia-bpf example CI workflow to Ubuntu 22.04 to restore access to llvm-14-dev.

Changes:

  • Replaces ubuntu-latest with ubuntu-22.04 and adds a comment explaining the LLVM 14 requirement.
  • Leaves dependencies and test steps unchanged; full GitHub Actions verification remains pending.
File Description
.github/​workflows/​test-eunomia.yaml Pins the runner to Ubuntu 22.04 for LLVM 14 availability.

Review effort: Balanced

@yunwei37

yunwei37 commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

Checked the two red workflows against main before assuming they relate to this
pin.

Test bpftrace examples — pre-existing on main. It fails at the same
step with the same message, on a commit that contains none of this change:

ref run result
main (11-01) 41256046946 failure, test 37 uprobe-rust bpftrace attach
main (10-25) 40146512288 failure
main (10-18) 39082577796 success

Both failures end in Error: bpftrace failed to attach or trace the hello function from src/37-uprobe-rust/args. So the bpftrace example has been red
on main for two weekly runs, and this branch simply inherits it. Separate
from the LLVM 14 pin, which touches test-eunomia.yaml only.

build is the other red check; it is the same workflow family and reports
the same step, so treat it as one issue rather than two.

Worth noting for the pin itself: the failure this PR fixes is in
Test eunomia-bpf example CI (install deps needing llvm-14-dev on
ubuntu-latest = 26.04). Since Test bpftrace examples already runs on
ubuntu-22.04, the same pin does not cover the bpftrace breakage — that one
needs its own diagnosis (attach permission or bpftrace version on the runner).

The pin change itself is correct and matches what I applied in bpftime
(#714/#715) for the same class of runner drift.

AI-generated response; a maintainer will review and follow up later

@yunwei37 yunwei37 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the head a99b1cc6. The pin is correct and matches the same runner
drift handled in bpftime #714/#715: Test eunomia-bpf example CI runs
llvm.sh/apt for LLVM 14 on ubuntu-latest, which is now 26.04 and has no
llvm-14-dev, so install deps fails before any example builds.

One attribution note, since both checks on this head are red and only one is
about the pin:

  • Test bpftrace examples → test 37 uprobe-rust bpftrace attach, with
    Error: bpftrace failed to attach or trace the hello function. This fails the
    same way on main (11-01 run 41256046946, 10-25 run 40146512288), so it
    predates the branch.
  • That workflow already runs on ubuntu-22.04, so this pin does not cover
    it — the bpftrace breakage needs its own diagnosis (attach permission or
    bpftrace version on the runner).

build reports the same step, so treat it as one issue rather than two.

AI-generated response; a maintainer will review and follow up later

@yunwei37

Copy link
Copy Markdown
Member Author

Cross-check on the three build checks, so the state is unambiguous:

build result
pinned to 22.04 (this PR's change) success
pinned to 22.04 success
Test bpftrace examples failure

So the llvm-14-dev problem this PR targets is genuinely fixed — two of the
three jobs now pass. The third is a different bug in the same area:
test-bpftrace.yml asserts on bpftrace's probe-count wording
("Attaching 1 probe", which became "Attached 1 probe" from 0.20), and also
timed out at 3 s before bpftrace had flushed anything.

That is #237, and it is green on its own run now, so the two are complementary
and can land in either order:

#236  pin the examples to Ubuntu 22.04  → clears `Unable to locate package llvm-14-dev`
#237  fix the bpftrace assertion       → clears the remaining `Test bpftrace examples`

AI-generated response; a maintainer will review and follow up later

The uprobe example job greps for "Attaching 1 probe", which is what bpftrace
<= 0.19 prints. From 0.20 the same line reads "Attached 1 probe", so the
assertion fails on a run where the probe attached and the program traced
successfully:

  Attached 1 probe
  traced
  Hello, world! 1 in 2

That is the failure on main since 09-06 (run 34001245551) and it has been red
every week since, on a workflow that was otherwise working.

Match Attach(ing|ed) 1 probe instead, so the check tracks the probe being
installed rather than one release's wording. Verified against both spellings and
against a missing-probe output.

(cherry picked from commit a498df8)
The wording fix was not the only failure. Run 43179933746 on this branch still
failed, with an empty /tmp/bpftrace_output.txt: the 'timeout 3' killed bpftrace
during startup (attach plus spawning the -c command), and because the output is
redirected to a file nothing had been flushed, so the check read it as
'failed to attach' rather than 'took too long'.

Raise the budget to 10s, and say which case it is when the check fails, so the
next failure is diagnosable from the log alone.

Verified the check on three inputs: attached+traced passes, an empty file fails
with the new message, a missing file fails.

(cherry picked from commit 1172b9b)

@yunwei37 yunwei37 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 8b52f19ecd

The delta since the last review point (a99b1cc6) is two test-bpftrace.yml commits.

  1. The probe-count assertion now matches Attach(ing|ed) 1 probe. bpftrace ≤ 0.19 prints Attaching N probes, 0.20+ prints Attached N probes; the assertion is about the probe being installed, so matching both wordings is correct rather than loosening the check — it still requires traced and a probe count of exactly one.
  2. The uprobe run gets timeout 10 instead of timeout 3, plus a diagnostic when the redirect file is empty. A timeout that fires mid-startup leaves an empty file, which previously read as "failed to attach"; the extra time and the explicit message distinguish the two.

Both are || true-guarded runs followed by a grep assertion, so a timeout still fails loudly rather than passing silently. The earlier pin of this workflow's sibling (test-eunomia.yaml) to ubuntu-22.04 for LLVM 14 is unchanged.

Note for whoever merges: #237 carries the same two test-bpftrace.yml commits, so whichever lands second will need a rebase.

AI patrol review

@yunwei37

Copy link
Copy Markdown
Member Author

Verdict: ready to merge

Head 8b52f19e carries a patrol review of its change (see the review above/below on this pull request), and every check on this head is green. Nothing in the change is left for the patrol to fix.

Merge is the maintainer's to make: bpf-developer-tutorial is not in the small-repository group, so the patrol does not merge it.

AI patrol review

@yunwei37 yunwei37 added the AI review: ready to merge patrol review verdict label Nov 15, 2026

@yunwei37 yunwei37 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: ready to merge

The review above stands for this head; checks are green and the branch is level with its base.

AI patrol review

@yunwei37 yunwei37 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: ready to merge, but #237 supersedes it

Both hunks in this branch — the ubuntu-22.04 pin for LLVM 14 and the bpftrace Attach(ing|ed) / 10s timeout change — are byte-identical to the same two files on #237, which carries this branch plus two documentation files. Landing #237 together with this one would apply the same change twice; land #237 and close this, or land this first and rebase #237 to its two doc files.

The change itself: ubuntu-latest moved to 26.04, which ships no llvm-14-dev, so Test eunomia-bpf example CI has been failing on main since 2026-11-08 with Error: Unable to locate package llvm-14-dev / exit 100. Pinning to ubuntu-22.04 restores LLVM 14 and is the smallest fix available today; the durable fix is a floating LLVM package name, which deserves its own issue so the pin does not outlive its reason.

The bpftrace half is the better-diagnosed part of the pair: timeout 3 was cutting bpftrace off mid-startup (leaving an empty output file that reads as "failed to attach"), and grep "Attaching 1 probe" was pinned to bpftrace ≤ 0.19's wording, which 0.20 changed to Attached. Both are fixed correctly here, and both are described in the comments.

AI patrol review

@yunwei37 yunwei37 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: not recommended to merge — superseded by #237

All three commits here are in #237, same messages and same content, replayed on top of #234's two documentation commits:

  • a99b1cc → ec82217 ci: pin eunomia example workflow to Ubuntu 22.04 for LLVM 14
  • cc3b2a3 → 1172b9b ci(bpftrace): accept both 'Attaching' and 'Attached' probe wording
  • 8b52f19 → a498df8 ci(bpftrace): give the uprobe example room to start

The pin is the fix #224 and #238 are blocked on: ubuntu-latest now resolves to the 26.04 image, which has no llvm-14-dev, so sudo apt install clang llvm-14-dev llvm fails before any example runs. Both build jobs pass on #237's head, which carries this pin.

AI patrol review

@yunwei37 yunwei37 removed the AI review: ready to merge patrol review verdict label Nov 17, 2026
@yunwei37

Copy link
Copy Markdown
Member Author

Verdict: not recommended to merge — superseded by #237

#237 now carries this PR's exact workflow patch. git diff of the two pull requests shows only #237's two extra documentation commits (src/24-hide/README.zh.md line-break fix, src/38-btf-uprobe/test-verify/README.zh.md translation); the test-eunomia.yaml runner pin and the test-bpftrace.yml assertion fix are byte-identical, in the same three-commit shape. Both are green on every check, both are MERGEABLE/CLEAN.

So landing #237 lands this change, and landing both would only add a second commit pair that says the same thing. Merge #237 and close this one, or drop #237's duplicate CI commits if the documentation is not wanted yet.

Rescinding the verdict this PR carried: its last comment said "ready to merge", which was true while it was the only carrier of the fix. It is not any more.

AI patrol review

@yunwei37
yunwei37 merged commit 4c3e616 into main Nov 24, 2026
7 checks passed
@yunwei37
yunwei37 deleted the fix/pin-eunomia-examples-runner-2204 branch November 24, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants