Closed MarcARoberge closed 2 months ago
How are you setting the ACTIONS_CACHE_URL
and did you modify the runner binary so it actually uses the custom ACTIONS_CACHE_URL
?
This is the step:
- name: Set up secret file
env:
ACTIONS_CACHE_URL: ${{ secrets.ACTIONS_CACHE_URL }}
run: |
echo ${{env.ACTIONS_CACHE_URL}} | sed 's/./& /g'
I did try it, but since I am on Mac it looks like I needed some changes, if not I would get a illegal byte sequence
error. Here's the command I did:
LC_ALL=C sed -i '' 's/\x41\x00\x43\x00\x54\x00\x49\x00\x4F\x00\x4E\x00\x53\x00\x5F\x00\x43\x00\x41\x00\x43\x00\x48\x00\x45\x00\x5F\x00\x55\x00\x52\x00\x4C\x00/\x41\x00\x43\x00\x54\x00\x49\x00\x4F\x00\x4E\x00\x53\x00\x5F\x00\x43\x00\x41\x00\x43\x00\x48\x00\x45\x00\x5F\x00\x4F\x00\x52\x00\x4C\x00/g' ./actions-runner-6/bin/Runner.Worker.dll
Can you try running the action with debug logs enabled. It should print out the url it is downloading cache from.
Have you tried setting the ACTIONS_CACHE_URL
env var when running the actions runner, not inside the workflow file:
ACTIONS_CACHE_URL=<url> ./run.sh
From what I can see from debug is that it is evaluating the secrets.ACTIONS_CACHE_URL
but looks like it is still the Github's one. I'll try to find something else with the sed
command that might caused that.
Update: using gsed
on Mac OS seems to give a better result.
UPDATE 2: I was missing a /
. Trying with gsed
Ok really good progress done. Looks like everything is setup, but I am receiving a error 500 since it looks like the cache is too big (around 5gb).
cache-server-1 | [nitro] [request error] [unhandled] The value of "size" is out of range. It must be >= 0 && <= 4294967296. Received 6_144_972_628
cache-server-1 | at Function.alloc (node:buffer:389:3)
cache-server-1 | at Object.reserveCache (./server/chunks/runtime.mjs:5636:47)
cache-server-1 | at handler (./server/chunks/routes/_token/_apis/artifactcache/index.post.mjs:40:43)
cache-server-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
cache-server-1 | at async _callHandler (./server/chunks/runtime.mjs:2726:16)
cache-server-1 | at async Object.handler (./server/chunks/runtime.mjs:2846:19)
cache-server-1 | at async Server.toNodeHandle (./server/chunks/runtime.mjs:3112:7)
From what I understand, Buffer.alloc
has a size limit. What can we do from here? Thinking maybe doing chunks?
Should be fixed in v2.1.0
Hello! I just need some help/support. I am configuring this server on Mac OS and everything looks good except when I run the setup-node actions with the
cache: npm
option, it stills downloads it from an outside source.This is an echo of the![image](https://github.com/falcondev-oss/github-actions-cache-server/assets/12281920/b8c67768-cb3a-489d-a60a-fdb6b1dadd18)
env.ACTIONS_CACHE_URL
for this job (looks good).And here's what it looks like when using the setup-node actions![image](https://github.com/falcondev-oss/github-actions-cache-server/assets/12281920/5b60c909-60f3-4f0f-bf29-b893c085e3f4)
Any idea why it acts like that? Any clue to where to look ?