Skip to content

chore(node_modules): upgrade @actions/cache to v4 and npm update #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

francesco-furlan
Copy link

@francesco-furlan francesco-furlan commented Apr 24, 2025

As mentioned in the @actions/cache npm page

The new service will gradually roll out as of February 1st, 2025. The legacy service will also be sunset on the same date. Changes in this release are fully backward compatible.
All previous versions of this package will be deprecated. We recommend upgrading to version 4.0.0 as soon as possible before February 1st, 2025.

@mrjbq7
Copy link

mrjbq7 commented Apr 29, 2025

@mlugg i'm having problems with my setup-zig and I think the cache issue is the reason, perhaps this upgrade fixes it?

It might be related to #36, but I get

test
+- run test
   +- zig test Debug native 1 errors
error: unable to open directory '/home/runner/.cache/zig/b/584f70b9ec15db6ce94f7a1166652fd5': FileNotFound

@mlugg
Copy link
Owner

mlugg commented May 7, 2025

This is already done now, thanks!

@mrjbq7, that's almost certainly an upstream Zig bug. I'd guess ziglang/zig#23110, which will be solved in the imminent 0.14.1 release.

@mlugg mlugg closed this May 7, 2025
@mrjbq7
Copy link

mrjbq7 commented May 7, 2025

This is already done now, thanks!

@mrjbq7, that's almost certainly an upstream Zig bug. I'd guess ziglang/zig#23110, which will be solved in the imminent 0.14.1 release.

It does look like an upstream issue, but it doesn't look like that patch fixes mine.

>  zig build test
  shell: /usr/bin/bash -e {0}
  env:
    ZIG_LOCAL_CACHE_DIR: /home/runner/.cache/zig
test
+- run test
   +- zig test Debug native 1 errors
error: unable to open directory '/home/runner/.cache/zig/b/805f387c1d642780096f8caf753faf50': FileNotFound
error: the following command failed with 1 compilation errors:

Using the latest nightly build that should include the patch from ziglang/zig#23645:

> Run mlugg/setup-zig@v2
  with:
    version: master
    use-cache: true
    cache-size-limit: 2048
Fetching zig-linux-x86_64-0.15.0-dev.471+369177f0b.tar.xz
Cache hit for: setup-zig-tarball-zig-linux-x86_64-0.15.0-dev.471+369177f0b
Received 50437240 of 50437240 (100.0%), 109.1 MBs/sec
Cache Size: ~48 MB (50437240 B)
/usr/bin/tar -xf /home/runner/work/_temp/7f2f1cfa-1d72-4ec9-93d4-b92dddd02501/cache.tzst -P -C /home/runner/work/trading.zig/trading.zig --use-compress-program unzstd
Cache restored successfully
fetch took 705 ms
Extracting tarball zig-linux-x86_64-0.15.0-dev.471+369177f0b.tar.xz
/usr/bin/tar xJ --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/ec34f5b6-9e45-4fd9-aa46-eb0ce8987844 -f /home/runner/work/_temp/zig-linux-x86_64-0.15.0-dev.471+369177f0b
extract took 3799 ms

Do you have a suggestion how I can investigate this further?

@mrjbq7
Copy link

mrjbq7 commented May 7, 2025

Trying use-cache: false does not appear to help either:

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 31f08b2..b64f099 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -14,4 +14,5 @@ jobs:
       - uses: mlugg/setup-zig@v2
         with:
           version: master
+          use-cache: false
       - run: zig build test

Or that didn't affect anything? I still see this in the logs

Cache restored successfully

@mrjbq7
Copy link

mrjbq7 commented May 7, 2025

Okay!

It appears setting cache-size-limit: 1 causes it to not use the cache, and it runs successfully.

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 31f08b2..8352903 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -14,4 +14,5 @@ jobs:
       - uses: mlugg/setup-zig@v2
         with:
           version: master
+          cache-size-limit: 1
       - run: zig build test

It seems to have cleared it, but when I subsequently reverting that change causes it to fail again. I'm not sure how to keep the cache but have it not fail with FileNotFound...

Cache directory reached 240858634 bytes, exceeding limit of 1048576 bytes; clearing cache

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.

3 participants