Skip to content

chore: sync upstream and clean gradle caches under $HOME - #11

Merged
azlekov merged 3 commits into
mainfrom
chore/upstream-sync-cleanup-home
Aug 26, 2026
Merged

chore: sync upstream and clean gradle caches under $HOME#11
azlekov merged 3 commits into
mainfrom
chore/upstream-sync-cleanup-home

Conversation

@azlekov

@azlekov azlekov commented Aug 26, 2026

Copy link
Copy Markdown

Brings in the two upstream commits we were behind on (compscidr/main up to 892b796).

What upstream changed

f86d06f switched cleanup.sh off hardcoded /root paths so a RUN_AS_ROOT=false runner — whose gradle home is /home/runner/.gradle — is actually covered. The /root globs had silently stopped matching there and caches grew unbounded.

Conflict resolution

cleanup.sh conflicted: our fork rewrote it to persist modules-2 / build-cache-* / transforms-* and LRU-cap the cache dirs, while upstream still deletes build-cache and transforms after every job.

Resolved by keeping our behaviour and adopting upstream's $HOME fix only for the paths we do touch — the daemon dir, journals, lock files, and the lru_cap targets. The same fix is applied to pre-job.sh, which carried the identical hardcoded /root paths and which upstream never touched.

Impact here

None for this deployment: docker-compose.yml mounts the caches at /root/* and those containers run as root, so $HOME is /root. The change only makes the hooks correct if a runner is ever started with RUN_AS_ROOT=false.

Both scripts pass bash -n.

🤖 Generated with Claude Code

compscidr and others added 3 commits August 19, 2026 16:07
With RUN_AS_ROOT=false the runner (and this job-completed hook) runs as
the runner user, whose gradle home is /home/runner/.gradle — the /root
paths silently stopped matching and caches grew unbounded.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…adle

fix: clean gradle caches under $HOME, not hardcoded /root
Upstream f86d06f switched cleanup.sh off hardcoded /root paths so the
RUN_AS_ROOT=false runner user (/home/runner) is covered too.

Our cleanup.sh diverged: it persists modules-2/build-cache-*/transforms-*
and LRU-caps the cache dirs instead of wiping them. Resolved by keeping
our behaviour and adopting upstream's $HOME fix for the paths we do touch
(daemon, journals, locks, lru_cap targets), and applied the same $HOME fix
to pre-job.sh, which had the identical hardcoded paths.

Our compose mounts the caches at /root/*, where $HOME is /root, so
behaviour is unchanged for this deployment.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@azlekov
azlekov merged commit 1ebd4e1 into main Aug 26, 2026
11 checks passed
@azlekov
azlekov deleted the chore/upstream-sync-cleanup-home branch August 26, 2026 06:20
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.

2 participants