Skip to content

[14.5-stable] evetest: add the evetest CI workflows and the fixes made to them on master - #7151

Merged
milan-zededa merged 56 commits into
lf-edge:14.5-stablefrom
milan-zededa:evetest-workflow-14.5
Nov 20, 2026
Merged

milan-zededa merged 56 commits into
lf-edge:14.5-stablefrom
milan-zededa:evetest-workflow-14.5

Conversation

@milan-zededa

@milan-zededa milan-zededa commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add the evetest CI workflows to 14.5-stable, together with the fixes that were
made to the workflows and to evetest itself on master after the evetest copy
of #6833 was taken. With this, evetest runs in the 14.5-stable CI: on PRs
(evetest-pr) and nightly (evetest-nightly).

This is the 14.5-stable counterpart of #7131 (the 16.0-stable backport, the
same set of commits) and #7111. The commits are cherry-picks of the master
commits, taken from the 16.0-stable backport.

Backport of #7131, #7111, #7127, #6276, #6680, #6968, #6970, #6975, #6978, #6988,
#6989, #7002, #7003, #7012, #7020, #7021, #7022, #7024, #7030, #7042, #7043, #7045,
#7079, #7084, #7085, #7097, #7099, #7103

Deviations from the original commits:

  • The same commits as in [16.0-stable] evetest: add the evetest CI workflows and the fixes made to them on master #7131 are not included:
    • "collect Go coverage across nightly suites": 14.5-stable does not
      support coverage collection, so it would produce no data. The coverage
      steps of evetest-run-suite are removed as well.
    • Seven commits only change code that 14.5-stable does not have, because
      eve-k support was removed from evetest on this branch (the cluster and
      K3s related fixes, and the TestPNAC retest interval).
    • "mention 17.0-stable as the branch published by CI" is replaced by the
      same documentation change for 14.5-stable, made in the additional commit
      below.
  • In the commits that were kept, the parts referring to tests that do not
    exist in 14.5-stable are removed (the TestPNAC and NIC change cases of the
    test suites, the cluster commands in the evetest README, and
    TestSwitchNIPortConfigRace, TestSwitchNIDeletedWithAppsAttached and
    TestDownloadBurstWithDeadMgmtPorts in the split test suites).
  • The CI is adapted to what 14.5-stable has: it does not have the
    build-eve composite action, so build.yml tags the exported image with its
    build version and uploads the version artifact inline, and the nightly
    workflow does not build COVER=y images or collect coverage. Only the kvm
    image is staged on the brokers, since 14.5-stable has no eve-k evetest
    flavor. pr-gate.yml gets the evetest gate. 14.5-stable has no
    rerun-ci.yml, so it is added here with only the /evetest comment
    handling (no /rerun red|yellow).
    The per-build version tag and its helper script (.github/scripts/add_repo_tag.py)
    are temporary: they exist only because Eden still runs next to evetest on
    14.5-stable.
  • "yetus: Fix bufcompat parameters" (yetus: Fix bufcompat parameters #6276) is included as a cherry-pick (only
    its .yetus/personality.sh part applies here). An additional commit ("yetus:
    run buf against the evetest protobuf module") adds the Yetus buf setup that
    came with the evetest framework on master and that this branch lacks:
    --buf-basedir and --user-plugins in yetus.yml, and
    .yetus/plugins.d/submodules.sh (taken from 17.0-stable; it initializes
    the eve-api submodule so buf can resolve its imports). Without them
    buflint and bufcompat fail on any PR that touches evetest/grpcapi/proto,
    as this one does.
  • An additional commit ("adapt the backported CI and tests to 14.5-stable")
    contains these adaptations, including the removal of the eve-k only cluster
    and kuberegistration test suites that the cherry-picks would otherwise bring
    back, the removal of the eve-k flavor from the broker image CLI, and the
    update of the evetest docs to say that CI publishes the images of
    14.5-stable.
  • evetest/go.mod conflicts were resolved by hand (no k8s dependencies).

PR dependencies

None.

How to test and validate this PR

  • go build ./... and go vet ./... in evetest/ pass.
  • The evetest workflows are exercised by the CI of this PR (evetest-pr, which
    needs the per-build version artifact added to build.yml), and by a manual
    dispatch of evetest-nightly on 14.5-stable after the merge.

Changelog notes

None. Test and CI changes only; no user-facing changes.

PR Backports

This PR is itself a backport to 14.5-stable.

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR

For backport PRs (remove it if it's not a backport):

  • I've added a reference link to the original PR
  • PR's title follows the template

And the last but not least:

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

No device testing is needed: the changes affect only the evetest framework and
CI workflows.

🤖 Generated with Claude Code

@milan-zededa milan-zededa added the testing New test or test framework changes label Nov 19, 2026
milan-zededa and others added 25 commits November 19, 2026 10:32
Adds evetest-pr.yml (per-PR run, against a freshly built-but-
unpublished PR image, gated on its build having succeeded for that
exact commit AND either the PR being approved or a CODEOWNER having
requested a run with an "/evetest" comment -- checked live by the PR
Gate, since a new build, a new review or a new comment can come first)
and evetest-nightly.yml (full run against a branch's tip, on a schedule/
manual dispatch, against whatever publish.yml already published for
that commit -- the full-coverage safety net for evetest-pr.yml's own
PR-time test skipping).

Shared per-suite execution lives in the evetest-run-suite composite
action: checkout/image loading, running the suite, formatting/
uploading results, and (when a suite fails) an EVETEST_PAUSE_ON_FAILURE
live investigation -- live-investigation-watcher.sh polls the suite
over evetest's own gRPC control plane and has Claude inspect the
still-running device/SDN directly (status, eve ssh/logs, collect-info,
sdn ssh) rather than post-mortem from collected artifacts, which often
can't find a root cause. Findings land in one claude-analysis.md per
suite, posted as a PR comment and prepended into a nightly failure
ledger (published alongside an Allure report on GitHub Pages) so a
recurring failure is recognized as such instead of re-investigated
from scratch every time.

On a PR, Claude is also asked up front which suites/tests can be
skipped as clearly unrelated or redundant with another already-kept
test, given the diff and each suite's own doc comments -- skipped
suites still get their own (immediately-resolved) status check rather
than never appearing at all.

A CODEOWNER controls what runs with a PR comment (rerun-ci.yml re-runs
the PR Gate, which reads the comment and tells evetest-pr.yml):
  /evetest               - run now, with Claude deciding what to skip
  /evetest all           - run every suite
  /evetest <name> ...    - run only the named suites/tests/variants
                           (select-tests.sh turns names into the
                           matrix and an EVETEST_SKIP list)

Signed-off-by: Milan Lenco <milan@zededa.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 259455f)
Add trigger-evetest-nightly.sh, which dispatches evetest-nightly.yml via
the GitHub API so it can be driven by any external scheduler with
Internet access, instead of relying on GitHub's best-effort schedule
trigger.

The target repository and branch are mandatory arguments, and the token
is read from the GH_TOKEN environment variable rather than stored in the
script.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 6fc9331)
Add --registration-token, so a runner can be installed by someone who
was handed a short-lived registration token (from the GitHub UI or API)
instead of a PAT with repository Administration permission. --gh-pat is
now required only when no registration token is given.

With --destroy, --gh-pat becomes optional: without it the VM and its
cloud-init snippet are removed, but the runner stays registered on
GitHub and has to be removed there manually.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit edca7d1)
Name the GitHub runner exactly as given by --name, and the VM after it
by default, instead of prefixing both with "gh-runner-". A new optional
--vm-name sets the Proxmox VM name separately; pass it again with
--destroy. The cloud-init snippet file keeps its prefix so it cannot
clash with other snippets.

Without the prefix, a VM name could match the evetest broker VM or its
per-test "ev-*" VMs, which --destroy would then remove, so reject those
names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit e93c1b1)
A remote broker pulls the SDN image itself, so an SDN image built from
an unmerged change was unavailable to it and every test failed.

When SetupDevices can neither find nor pull the SDN image, the broker
still fails the request with the pull error, now as a FailedPrecondition
status carrying an ErrorInfo detail with a dedicated reason. A harness
that recognizes it uploads its local copy through the new
PushSDNContainerImage RPC and repeats the request, as it already does
for the EVE container image. An older harness just fails with the pull
error. The broker-side receive logic and the harness-side upload loop
are shared between the two image types.

make evetest now ensures the local SDN image also with a remote broker.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit fbf37c7)
Allow the nightly trigger to set the collect-coverage workflow input,
so a cron can enable coverage collection on selected days only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit a273c3e)
The concurrency group of evetest-pr was built from the head_branch of the
triggering PR Gate run. That is the PR branch for a review-triggered gate
but the default branch for a workflow_run-triggered one, so the two
triggers of a single PR landed in different groups (and both ran Claude
to decide the skips and then the whole suite), while all
workflow_run-triggered gates of unrelated PRs shared one group and
cancelled each other.

Drop the group and instead decide in discover-suites, before Claude is
asked anything, using the PR number from the gate's run-context:
- a trigger for a commit that another active run already tests is
  ignored;
- a trigger for a new head commit of the PR cancels the active run of the
  older commit;
- a trigger for a commit that is no longer the PR head is ignored.

Active runs are recognised by an evetest-active-<pr>-<sha> artifact that
each run uploads once it has passed the check; unlike a per-commit status
it can be found after a force-push.

A cancelled or timed out run leaves the suites that never got a runner
with their "Queued" status, so add a cleanup job that turns the statuses
of this run that are still pending into errors.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 389299a)
The "Report suite statuses" step posts one commit status per suite in a
quick burst. A single 5xx from the GitHub status API aborted the whole
discover-suites job and, with it, the evetest run. Retry with backoff on
5xx, 429 and 403 before giving up.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 91e37ce)
Claude used to post a new PR comment on every evetest run that skipped
tests, so reruns piled up stale comments. Have the workflow post the
summary instead: a marker-tagged comment is updated in place for the
latest run, and removed when the latest run skips nothing (e.g. after
"/evetest all").

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 33d2fb5)
Every failed run posted a new analysis comment, so reruns piled up stale
ones. Tag the comment with a per-suite marker and, at the end of each
run (unless cancelled), collapse the suite's previous comment: as
resolved if the run passed, as outdated if it failed again. A new
comment is posted only when the run failed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 6f6cd80)
With EVETEST_PAUSE_ON_FAILURE, t.Errorf/Fatalf block until the test is
resumed. Several places called them while holding devicesM or netModelM,
so the Status RPC (devicesM) and SSH-based CLI commands (netModelM) hung
for the whole pause and nothing could observe the failure or resume the
test.

Report failures only after releasing the lock in checkRebootCounts (all
mismatches in a single error), teardownDevices and UpdateNetworkModel.

Signed-off-by: Milan Lenco <milan@zededa.com>

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit bea59cb)
evetest status had no timeout, so one wedged Status RPC stalled the
watcher silently until the job hit its 6h limit. Time out status,
continue and the Claude investigation, and force-resume the test after
repeated status timeouts so a paused run cannot hang indefinitely.

Signed-off-by: Milan Lenco <milan@zededa.com>

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit c1afd1c)
Status functions are only allowed in if: conditions, so the runner
rejected the composite action at load time. Derive the minimize
classifier from job.status in the shell instead.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit a12ab60)
Clicking a failed test in the nightly Allure report showed only
gotestsum's generic "Failed" message plus the raw log trace; the real
failure message and Claude's conclusion ended up only in the nightly
ledger and the job's step summary.

Inject both into the JUnit XML before it is uploaded for the report:
the new inject-junit-analysis.py rewrites each failing testcase's
failure message with the failure message and conclusion that
live-investigation-watcher.sh recorded in live-investigation.md, so
Allure's test overview page displays them. The suite-level testcase
fails whenever any of its subtests do, so it gets every recorded
analysis, each prefixed with the subtest's name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 2240189)
…tartup

The watcher gave up if the evetest gRPC server was not reachable within
10 minutes of its launch, but the evetest image build that precedes it
can take longer. A test failing after that paused forever, as nothing
was left to investigate and resume it. Wait for as long as the shell
running the evetest step is alive instead.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 215f8f4)
A test paused at a checkpoint or on failure waits until someone runs
'evetest continue'. When nobody does, e.g. in CI, the run hangs until
the job times out. EVETEST_PAUSE_LIMIT=<seconds> makes the harness
resume on its own after that long, as if 'evetest continue' was issued.
The default of 0 keeps waiting indefinitely.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit d322dac)
Add a pause-limit input to the suite action, passed as EVETEST_PAUSE_LIMIT
whenever pause-on-failure is enabled, so a paused test cannot hold the
runner when the live investigation does not resume it. Cap one
investigation below that limit so its report is written before the forced
resume.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 9c4eefa)
For PRs from forks, evetest-pr checks out the PR's head repository, so
the git remote in the workspace points at the fork. Without GH_REPO,
gh infers the repository from that remote, and both `gh pr comment`
(posting Claude's failure analysis) and `gh pr diff` (in
live-investigation-watcher.sh) look up the PR number in the fork and
fail with "Could not resolve to a PullRequest". The analysis comment
step has continue-on-error, so it failed silently and no analysis was
posted; the watcher likewise ran Claude without the PR diff.

Set GH_REPO to github.repository for both steps, as the step that
collapses previous analysis comments already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit f4b5c6a)
`gh pr diff` fails with HTTP 406 for a PR touching more than 300 files,
which a vendor bump easily exceeds (e.g. PR lf-edge#5644). discover-suites
then failed before any suite was scheduled, so evetest never ran for
such PRs even though "Ready for evetest" was reported.

Check out the PR head from the upstream repo with actions/checkout,
blobless and with the full history of every branch (about 20 MB), and
diff it against its merge-base with the base branch. Vendored code is
left out of the diff; instead, the vendored modules added, removed or
bumped are read from vendor/modules.txt and listed in pr-context.txt.

If fetching or diffing fails, Claude is not asked for a skip decision
and the run falls back to the full suite instead of failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit e6f1a74)
The suite jobs run the evetest-run-suite action and its scripts with
secrets (Anthropic key, GitHub token) from the PR checkout, which may
be a fork. After checking out the PR, replace that directory with the
base branch's copy so the PR cannot alter the code that handles them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit ccbf879)
The "Run evetest" step exports ANTHROPIC_API_KEY and GH_TOKEN so the
live-investigation watcher can use them, but the same step then runs
`make -C evetest evetest`, i.e. PR-controlled code, with the same
environment. Unset both once the watcher has been started; it keeps
its own copy and make and everything it spawns no longer inherit them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 5307aff)
The live-investigation watcher still fetched the PR diff with
`gh pr diff`, which the API refuses for PRs touching more than 300
files (e.g. vendor bumps). Claude was then told no diff was supplied.

Move the git-based diff computation, introduced for the test-skipping
step, into .github/actions/evetest-run-suite/pr-diff.sh and use it from
both the workflow and the watcher. Vendored code stays excluded and is
summarised in pr-vendored.txt.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 0d9fde1)
PR Gate used the latest /evetest comment of a CODEOWNER regardless of
its age, so every later push of the PR re-triggered evetest from the
same stale comment, and the comment stayed visible forever.

PR Gate now ignores minimized comments and passes the node ID of the
comment it acted on to evetest-pr. Once that workflow starts a run (or
finds one already testing the same commit), it reacts to the comment
with a rocket and collapses it as resolved. A further run requires a
new /evetest comment, or a PR approval.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit e97d6a4)
The Proxmox broker crashed with "panic: send on closed channel" inside
go-proxmox's TermWebSocket after a VM's serial console connection broke.
The function's close callback closes its result channels one second
after signalling its goroutines to stop. If the connection is already
broken, the writer goroutine fails to send the websocket close frame
and blocks reporting that on the unbuffered error channel, which
nobody reads any more. The channel is then closed under it and the
panic happens in a library goroutine, so it cannot be recovered and
takes down the broker together with every session it serves. The
latest go-proxmox release has the same code.

Talk the termproxy protocol directly with gorilla/websocket instead,
reusing only the library's authenticated API session. There are no
channels: Read and Write go straight to the websocket, writes are
serialized, every write has a deadline, a failed keepalive closes the
console so a silently dead connection cannot block Read forever, and
Close only uses methods gorilla allows concurrently with everything
else.

The tests run the client against a fake termproxy server, including
a connection that breaks underneath an active console. That is the
scenario that made the old code panic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 9b323d1)
PVE answers a lookup of a VM that does not exist with an HTTP 500,
the same status it uses for any other server-side failure, such as
failing to fork an API worker on a host that is out of memory. Two
code paths misread such failures:

- When the create call failed, SetupDevice checked whether the VM
  existed anyway and quietly assumed nothing was created if that
  lookup failed. On a host out of memory, PVE had already written a
  placeholder config holding "lock: create" before failing to fork the
  create worker, and that VM was leaked. Even when found, it could not
  have been deleted, since a plain delete refuses a locked VM.
- Teardown treated any lookup error other than a transport error as
  proof that the VM was gone, and leaked the VM on a 500.

Add removeVM, which treats only PVE's "Configuration file ... does not
exist" as a missing VM, stops the VM if it is running (paused
included) and deletes it, overriding any lock left on it. Teardown and
both failed-setup paths use it. On a failed create the cleanup runs
before vmCreateMutex is released: if nothing was created, the VMID is
free again, and removing it after another device was given that ID
would delete that device's VM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 723baf2)
milan-zededa and others added 2 commits November 19, 2026 10:32
When a Proxmox host runs out of RAM the kernel killed the largest qemu
process, which once was the broker VM and failed every test that was
using it.

Add evetest-oom-hook.pl, a host hookscript that sets oom_score_adj on
guest post-start by role: the broker VM is best protected (-900), runner
VMs less (-500), and VMs created by the broker for tests are killed
first (+500). The role is taken from the VM's tags. The broker and
runner installers set the tag and attach the hookscript directly. A VM
has only one hookscript, so evetest-hook.pl, which the broker attaches
to test VMs, runs it for them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 2d79309)
When a host has many light runners but very few full-size ones, the
full-size runners can be registered with only the evetest-runner label,
so that they never take light suites and stay free for heavy ones.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 7cc6f9d)
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.18%. Comparing base (272ffae) to head (ace68aa).
⚠️ Report is 375 commits behind head on 14.5-stable.

Additional details and impacted files
@@               Coverage Diff               @@
##           14.5-stable    #7151      +/-   ##
===============================================
+ Coverage        24.97%   32.18%   +7.20%     
===============================================
  Files                8       14       +6     
  Lines             1185     2663    +1478     
===============================================
+ Hits               296      857     +561     
- Misses             820     1806     +986     
+ Partials            69        0      -69     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@milan-zededa
milan-zededa force-pushed the evetest-workflow-14.5 branch 2 times, most recently from 761ff6f to 9122e66 Compare November 19, 2026 14:25
@milan-zededa

Copy link
Copy Markdown
Contributor Author

Yetus fails only due to the known perlcritic issue.

milan-zededa and others added 15 commits November 19, 2026 16:14
The suite ran about two hours and was tagged heavy only because of that
runtime, although every test uses a single device. Split it by topic
into TestLocalNetworkInstanceSuite, TestSwitchNetworkInstanceSuite,
TestAppRoutingSuite and TestAppNICsSuite, none of them tagged heavy, so
that they can also run on the light runners and finish in 20-40 minutes
each. Each test keeps its own device requirements, so none depends on
its former neighbours.

Update the suite references in the tests' doc comments.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 8d1b767)
The exported image was named after the PR number only, so a consumer
that caches images by name (the evetest broker) kept testing the first
build of a PR after later pushes. Also tag the image with its unique
build version; the evetest-run-suite loader derives the version to test
from that tag. The PR-number tag stays for Eden.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>

(cherry picked from commit 043466a)
Every suite job of a PR (or coverage nightly) run downloaded both EVE
image artifacts, about 2.4 GB, and loaded them into its own Docker, so a
run fetched them once per suite from the same two hosts.

Let the jobs share one upload per broker instead. A job asks the broker
for the right to upload an image ("evetest broker image claim-upload"):
it gets a ticket, or learns that the broker already has the image or that
another job is uploading it, in which case it waits and takes over if that
job fails. Only the claim winner downloads the artifact and uploads it
("image upload"); a claim lapses after 60 minutes if the upload does not
start and after 10 minutes without upload progress, and is released when the
upload ends or on request ("image release-claim").
The upload names the image by the ticket alone.

A test that needs the image in the runner's Docker (an EVE upgrade
target) loads it back from the broker with the new PullEVEContainerImage
when it cannot pull it.

The build publishes its image version as an artifact so that the jobs
know which image to ask for before downloading anything; evetest-pr.yml
accepts it only in the form of that PR's versions. The coverage nightly
takes the version from its build job outputs. The download-image-artifacts
path of evetest-run-suite is removed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>

(cherry picked from commit 733fefc)
The job summary heading was emitted as an HTML <h2> directly followed
by Claude's markdown report, so the report's first line (its title)
was swallowed into the HTML block and shown as literal text. Its
sub-headings also rendered at the same level as the section heading.

Write the section heading as markdown followed by a blank line, and
run the report through shift-headings.sh so its headings nest below it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 9e884c7)
TestVolumes always ran on ext4, where volumes are files. On ZFS,
volumes are backed by zvols and go through a different volume handler
(zvol creation and destruction, dataset cleanup, iSCSI/vhost block
devices), which only the eden storage tests covered so far.

TestVolumes now takes the FILESYSTEM parameter, and TestStorageSuite
runs it once more on ZFS (TestVolumesOnZFS), grouped with the other ZFS
tests so they can share a device. On ZFS, the test also reboots the
device once the standalone volumes are created and checks that all of
them are reported as created again, i.e. that the zvols survive a
reboot and volumemgr picks them up at boot. Before the reboot, it sets
timer.gc.vdisk to its minimum (60s): volumemgr garbage-collects ZFS
datasets every timer.gc.vdisk/10 (6 minutes by default), and reads the
interval only at boot. After the reboot the GC thus runs every 6
seconds while the zvols exist. The test then creates an unused zvol
directly on the device, named like a volume EVE has no config for, and
checks that the GC destroys it while it keeps the zvols of all
configured volumes. The ext4 run keeps its name and does not reboot.

TestMountedVolumes and TestExtraDiskAttach were not given ZFS variants:
with coverage collection, they reached only one statement on ZFS that
TestVolumesOnZFS did not.

Signed-off-by: Milan Lenco <milan@zededa.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7eedcf8)
A new controller epoch tells EVE that the controller may have lost its
state, so EVE must republish all of its info messages. Nothing in
evetest covered this.

TestDeviceInfo now re-applies its configuration with ControllerEpoch
incremented and waits for a new ZInfoHardware. EVE otherwise publishes
the hardware info only once after boot, so its arrival proves that the
full republish happened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit cebe939)
Apps read /eve/v1/network.json from the metadata server to learn the
external IP under which they are reachable, along with their own and the
device's identity. TestAppInstanceMetadata did not use this endpoint.

The test now fetches network.json from inside the app and asserts the
app instance UUID, the device UUID and name, and that external-ipv4
contains the IPv4 address of ethernet0, the port used by the app's
network instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 6a1353e)
Rewrite of the Eden local_datastore test. An app running in a Local
network instance advertises evetest-local-ds.local over mDNS and serves
a random file over HTTP. A standalone volume is then downloaded from
that ".local" datastore and verified by SHA256. A negative variant uses
a host name nobody advertises and expects "mDNS host not found".

The app is a new test app, lfedge/evetest-local-ds. HTTPStorage gets an
OmitPort option, because the downloader recognizes a local datastore by
the URL host ending with ".local", which a ":port" suffix would hide.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit d18718f)
Brings the latest Adam patch (lf-edge/adam#164), which stops the log
stream from silently losing entries. Previously Adam dropped published
entries once a subscriber's 100-entry channel was full, so a large log
chunk uploaded by the device (e.g. the hundreds of lines of a kernel
panic stack trace) could lose its tail even though it was stored. Adam
also flushed the stream response before subscribing, so entries
published in between could be missed.

Affected tests in the telemetry suite: TestKernelPanicReport and
TestDeviceLogs. Both failed intermittently because log lines present
in Adam's store never reached the live log watch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit fc84110)
Since EVE images are staged on the broker once per host, the runner's
Docker no longer holds the PR build image up front. buildNetbootArtifacts
pulled it with a plain docker pull, which fails for PR images that are
published to no registry (TestBootstrapWithNetworkBoot: "pull access
denied for evebuild/pr").

Use pullEVEImage instead, which falls back to loading the image from the
broker when the registry pull fails, as the EVE upgrade path already does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit d91d407)
A config that makes EVE reboot, such as withdrawing a node's cluster
config, is often confirmed only after the device boots again: the reboot
can come before zedagent publishes its next metrics. The 2-minute
confirm wait in ApplyConfig then expires during the boot, as seen in
TestClusterToSingleConversion, where the confirmation arrived a second
after the deadline.

Add deviceRebootTimeout to the wait while a reboot declared with
ExpectAdditionalReboots has not been observed yet, as Setup already does
for the config-fetch wait of a rebooted device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 6342f69)
make evetest mounts ~/.linuxkit/cache into the evetest container, which
runs as root (to create the SDN tunnel, TAP devices, bridges and dummy
interfaces, and to use /dev/kvm and the Docker socket). When
TestVGAPassthroughNoHostAccess compiles its bpftrace tracer there,
bpftrace-compiler creates cache/blobs/sha256 and rewrites index.json as
root. The user's linuxkit can then neither add blobs to the cache nor
update its index, and on CI the next job's "rm -fr ~/.linuxkit" fails
with "Permission denied", so the runner fails every suite it picks up
within seconds.

Chown the mounted linuxkit and bpftrace-compiler caches to the host
user whenever the entrypoint fixes the ownership of the artifacts. A
container killed before it gets to that still leaves root-owned files
behind, so CI also removes the cache with sudo, as it already does for
the workspace and the collected artifacts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit bc45470)
The commits backported from master assume the master CI and the eve-k
support, which 14.5-stable lacks:

- Keep the build-eve composite action out. 14.5-stable's build.yml builds
  the EVE images inline, so tag the exported image with its build version
  and upload the version artifact there instead (the helper script moves
  to .github/scripts/).
- Take pr-gate.yml and rerun-ci.yml with the evetest gate and the
  /evetest comment handling on top of the 14.5-stable versions.
- Drop the nightly COVER=y builds and coverage reporting, and look for a
  published kvm image only.
- Remove the cluster config builder, the cluster and kuberegistration
  suites and the eve-k hypervisor flavor of the broker image CLI, in line
  with the removal of eve-k from evetest.
- Publish the images of 14.5-stable in the evetest README.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
We use evetest as base directory for protobuf files, but inside evetest we
have more than one protbuf module:

- evetest/grpcapi/eve-api
- evetest/grpcapi/proto

Every time .proto files are touched on evetest, two images will be
merged into one but the bufcompat plugin will later check against each one
of the module, leading to the following error:

Failure: input contained 2 images, whereas against contained 1 images

Fix it by pointing only to evetest/grpcapi/proto (eve-api it's a separated
project, we don't need to check it here).

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
(cherry picked from commit be781df)
Signed-off-by: Milan Lenco <milan@zededa.com>
The evetest copy on this branch was taken without the Yetus changes that
came with the evetest framework on master. Without them buflint and
bufcompat fail on any PR that touches evetest/grpcapi/proto:

- point buf at evetest/grpcapi/proto (--buf-basedir), the same place the
  previous commit points BUF_BASEDIR to;
- load .yetus/plugins.d (--user-plugins) with the submodules plugin, which
  initializes the eve-api git submodule so that buf can resolve its imports.

The plugin is taken from 17.0-stable.

Signed-off-by: Milan Lenco <milan@zededa.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@milan-zededa

milan-zededa commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

The failing test job (https://github.com/lf-edge/eve/actions/runs/44552603543/job/135660122257) is unrelated to this PR: FuzzIOBundle2PassthroughRule in pkg/pillar/cmd/usbmanager failed with context deadline exceeded, i.e. the fuzzing time budget ran out on a loaded runner, not an assertion failure. This PR changes nothing under pkg/.

@milan-zededa

Copy link
Copy Markdown
Contributor Author

No need to waste eden runners on this PR (it is just evetest changes) - canceling

@milan-zededa
milan-zededa merged commit df8fcb4 into lf-edge:14.5-stable Nov 20, 2026
31 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing New test or test framework changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants