Skip to content

ci: tolerate protected toolcache files when clearing runner space - #356

Merged
velaraptor-runpod merged 1 commit into
mainfrom
fix/toolcache-rm-not-permitted
Oct 7, 2026
Merged

velaraptor-runpod merged 1 commit into
mainfrom
fix/toolcache-rm-not-permitted

Conversation

@velaraptor-runpod

Copy link
Copy Markdown
Contributor

The v2.29.0 release run (37557374517) failed in the Clear space to remove unused folders step, before the build started:

rm: cannot remove '/opt/hostedtoolcache/Ruby/3.2.11/x64.complete': Operation not permitted
rm: cannot remove '/opt/hostedtoolcache/Ruby/4.0.6/x64.complete': Operation not permitted
...
##[error]Process completed with exit code 1.

Blacksmith runners protect some files under $AGENT_TOOLSDIRECTORY (/opt/hostedtoolcache, e.g. the Ruby x64.complete sentinels), so rm -rf exits 1 and the step — run under bash -e — fails the whole job.

Appending || true keeps reclaiming everything that is deletable without failing the release. Applied to both release.yml and dev.yml, which share the step.

Blacksmith runners protect some files under $AGENT_TOOLSDIRECTORY
(/opt/hostedtoolcache, e.g. Ruby x64.complete sentinels), so rm -rf
exits 1 with 'Operation not permitted' and fails the release job
before the build starts. Allow the cleanup to proceed past it.
@velaraptor-runpod
velaraptor-runpod merged commit ab52ac3 into main Oct 7, 2026
11 checks passed
@velaraptor-runpod
velaraptor-runpod deleted the fix/toolcache-rm-not-permitted branch October 7, 2026 17:06
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