gh-workflows: make cache hits optional in eve build jobs#5734
gh-workflows: make cache hits optional in eve build jobs#5734europaul wants to merge 3 commits intolf-edge:masterfrom
Conversation
eriknordmark
left a comment
There was a problem hiding this comment.
We seem to be getting
Error: Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: linuxkit-amd64-bfa34420ddb162ede9036e29fa8f6b360d47fdb1-generic-k
for many (but not all) of the PRs.
I don't know whether this will help or whether it will make the builds exceed the total time allowed on the runner.
But if we think it can help we can give it a try.
6749c1d to
3968b50
Compare
|
GitHub Actions cache entries expire too quickly, so between the packages job and the eve job they are often already gone. This causes the eve job to fail on cache miss rather than just rebuilding. Make the cache restore steps non-fatal by removing fail-on-cache-miss and gating the docker-load steps on actual cache hits. Change the eve build step to run 'make pkgs eve' instead of just 'make eve' so that if the cache was not restored, packages are simply rebuilt. Add qemu setup to the eve job for riscv64, since it cross-builds on amd64 runners and needs qemu if packages must be rebuilt from scratch. Applied to both build.yml (PR builds) and buildondemand.yml (on-demand builds). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paul Gaiduk <paulg@zededa.com>
The paths-ignore filter excluded all of .github/**, which meant changes to the build workflow itself would not trigger a PR build. Add a negation pattern to re-include build.yml so the workflow can validate its own changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paul Gaiduk <paulg@zededa.com>
fbcb710 to
14aad05
Compare
Remove dead 'ensure zstd for cache' step in build.yml that referenced nonexistent matrix.os with stale runner names. Add .github/actionlint.yaml to whitelist custom self-hosted runner labels (zededa-ubuntu-2204, zededa-ubuntu-2204-arm64, jumbo). Pass pull_request.head.ref through an environment variable instead of using it directly in an inline script to prevent potential script injection from malicious branch names. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paul Gaiduk <paulg@zededa.com>
14aad05 to
220e039
Compare
| inputs: | ||
| command: | ||
| required: true | ||
| type: string |
There was a problem hiding this comment.
we hit this error from actionlint
e:.github/workflows/buildondemand.yml:71:15: could not parse action metadata in "/github/workspace/.github/actions/run-make": line 6: unexpected key "type" for definition of input "clean" [action]
I think those fields have been removed a long time ago - my local linter was always showing error. But since we have actionlint now in CI - it's an actual CI error to have them
| run: | # Runners must provide default credentials | ||
| docker login | ||
|
|
||
| - name: ensure packages for cross-arch build |
There was a problem hiding this comment.
Why is this getting included again? We don't need it anymore since our runners are already prepared for binary emulation....
|
This PR is gonna be superseded by #5782 |
Description
GitHub Actions cache entries expire too quickly, so between the packages job
and the eve job they are often already gone. This causes the eve job to fail
on cache miss rather than just rebuilding.
Make the cache restore steps non-fatal by removing
fail-on-cache-missandgating the docker-load steps on actual cache hits. Change the eve build step
to run
make pkgs eveinstead of justmake eveso that if the cache wasnot restored, packages are simply rebuilt.
Applied to both
build.yml(PR builds) andbuildondemand.yml(on-demandbuilds).
publish.ymlis not affected since it pushes packages to Docker Huband the eve job pulls from the registry.
How to test and validate this PR
warm (packages job finishes quickly and cache is still valid) and when the
cache has expired (eve job rebuilds packages via
make pkgs eve).workflow_dispatch) and verify the samebehavior for arm64/riscv64 matrix entries.
Changelog notes
No user-facing changes.
PR Backports
Checklist
check them.
🤖 Generated with Claude Code