Skip to content

ci(docker): use the GHA layer cache on GitHub-hosted runners only - #29

Merged
hbrombeer merged 1 commit into
mainfrom
ci/self-hosted-no-gha-cache
Sep 29, 2026
Merged

hbrombeer merged 1 commit into
mainfrom
ci/self-hosted-no-gha-cache

Conversation

@hbrombeer

Copy link
Copy Markdown
Member

cache-from/cache-to of docker-gradle-build-push.yml now apply only when runner.environment == 'github-hosted'; on ARC/self-hosted runners the build runs without a layer cache.

Why: from the hbr1 ARC runners the GHA cache downloads at tens of KB/s. The plugin-match:0.9.0 tag build (2026-09-29) spent 20+ minutes on a single 93 MB cache layer (~60 KB/s, log: #15 sha256:67bf… 72.35MB / 92.76MB 1214.1s), and the base image was local immediately. The 60-minute ARC timeout in the same file exists for the same symptom.

Tests: tests/test_docker_workflow.py knows the runner context and format() and checks: public/hosted → gha cache-from and cache-to (mode=max); private/ARC → no cache-from, no cache-to. 4/4 green locally.

Next step (separate): a layer cache of our own on hbr1 (persistent BuildKit daemon or a registry cache in the ARC cluster), so ARC builds get fast and cached.

From the self-hosted ARC runners the GHA cache downloads at tens of KB/s:
the plugin-match 0.9.0 image spent 20+ minutes pulling one 93 MB cached
layer at ~60 KB/s for a build that takes a few minutes uncached. Gate
cache-from and cache-to on runner.environment so ARC builds run without
a layer cache, and hosted runners keep it.
@hbrombeer
hbrombeer merged commit 5fb660b into main Sep 29, 2026
2 checks passed
@hbrombeer
hbrombeer deleted the ci/self-hosted-no-gha-cache branch September 29, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant