I'm using the latest version of k8s hook alongside the latest Actions Runner Controller (0.27.4).
I was running into an issue where the hook was taking ~2.5 minutes to spin up a Pod for the job. I tracked the bottleneck back to here where it's copying the externals directory (which contains the node runtimes) from the root runner directory to the current job's workspace. A recursive copy was taking a lot of time because of the node_modules included in each runtime directory (using the default summerwind/actions-runner:latest image).
This copy seems to be redundant. That externals directory is copied to the job workspace before the prepare_job hook is triggered. I've forked this hook and removed that copyExternalsToRoot function call, and it works as expected with no delay.
I'm using the default runner working directory (runner/_work). Is that step there to account for using a non-default working directory? If so, can the hook check to see if the externals directory is present before performing the copy and overwriting it all?
Hi,
I'm using the latest version of k8s hook alongside the latest Actions Runner Controller (0.27.4).
I was running into an issue where the hook was taking ~2.5 minutes to spin up a Pod for the job. I tracked the bottleneck back to here where it's copying the
externals
directory (which contains thenode
runtimes) from the root runner directory to the current job's workspace. A recursive copy was taking a lot of time because of thenode_modules
included in each runtime directory (using the defaultsummerwind/actions-runner:latest
image).This copy seems to be redundant. That
externals
directory is copied to the job workspace before theprepare_job
hook is triggered. I've forked this hook and removed thatcopyExternalsToRoot
function call, and it works as expected with no delay.I'm using the default runner working directory (
runner/_work
). Is that step there to account for using a non-default working directory? If so, can the hook check to see if theexternals
directory is present before performing the copy and overwriting it all?