setup-java download jdk binary again every time due to not cache tool folder #70
Labels
No Label
kind
bug
kind
build
kind/compatible
kind
dependencies
kind
docs
kind
enhancement
kind
feature
kind
help wanted
kind
proposal
kind
refactor
related
act
related
environment
related
exec
related
gitea
related
workflow
reviewed
confirmed
reviewed
duplicate
reviewed
invalid
reviewed
needs feedback
reviewed
wontfix
reviewed
workaround
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/act_runner#70
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
And github runner can cache container
toolcache
folderhttps://github.com/actions/setup-java/issues/470#issuecomment-1480814653
The runner mounts the
act-toolcache
volume to/toolcache
directory (SeeIn my test, the files created by a task will remain in the volume even after the task has finished. If I rerun the task, the file will still be there. The workflow is like:
I also test the
setup-java
action. But it is strange that thesetup-java
action doesn't seem to write data to the/toolcache
directory. I'll test other actions to check if they cache files there.At present, the
act-toolcache
volume is mounted to/toolcache
and the data in/toolcache
will be stored persistently. But the problem is that actions don't write data to/toolcache
but to/opt/hostedtoolcache
(specified by theRUNNER_TOOL_CACHE
env, seeMaybe we need to support users to configure the volumes that will be mounted to
RUNNER_TOOL_CACHE
. Now there is a workaround: set theRUNNER_TOOL_CACHE
env manually in the workflow, like this:My test:
First run (no cache):
Second run (get from cache):
act-toolcache
volume:@Zettat123 hi, i found some issues when setup with
cache
it can be run fast about
0s
withoutcache: pnpm
, but it take time when withcache: pnpm
My runner in docker of persistence
Do you know what the problem is?
It looks like the job container cannot access the cache server. What's your act_runner version? Are you using docker-compose to run your act_runner?
@Zettat123
Act_runner run with docker compose, and latest version
It maybe cache probrem
This is mini demo
https://gitea.com/seepine/action-demo
And Compele job also
Yes, this issue is related to the cache handler. There is a workaround in the documentation, and we will improve the cache handler to avoid similar issues.
Thanks, it can be work