Skip to content
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

Cache restore failure #16

Closed
develop7 opened this issue Oct 31, 2023 · 5 comments
Closed

Cache restore failure #16

develop7 opened this issue Oct 31, 2023 · 5 comments

Comments

@develop7
Copy link

Repro:

Invoke cache-nix-action following the example from it's manual:

    - name: Restore and cache Nix store
      uses: nix-community/cache-nix-action@v4
      with:
        key: cache-${{ runner.os }}-${{ hashFiles('nix/**/*.nix') }}
        restore-keys: |
          cache-${{ runner.os }}-
        gc-linux: true
        gc-max-store-size-linux: 1000000000
        gc-macos: true
        gc-max-store-size-macos: 1000000000
        purge: true
        purge-keys: cache-${{ runner.os }}-
        purge-created: true
        purge-created-max-age: 42

https://github.com/develop7/postgrest/blob/abfeda7512395ee5cf091378fc75f6d223e6833a/.github/actions/setup-nix/action.yaml#L17-L30

Expected: cache is unpacking successfully

Instead: the action output log is polluted with the messages like ones below indicating (partial?) failure to unpack the cache

/usr/bin/tar: ../../../../../nix/store/br1p5pan2pgmgrm81kj43qawd9b9nns1-libunistring-1.1/lib/libunistring.so.5.0.0: Cannot open: File exists

Link: https://github.com/PostgREST/postgrest/actions/runs/6709349886/job/18232202233?pr=2992#step:3:76

@deemp
Copy link
Collaborator

deemp commented Nov 9, 2023

Hi! See the Limitations section.
image

@develop7
Copy link
Author

Ohhh, I see, it fails to untar nix and deps only. Got it, thanks.

@develop7 develop7 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2023
@develop7
Copy link
Author

Hey @deemp, could you hide the lines in question behind a lines' group at least? Seems really straightforward to implement. They should collapse automatically after the end group marker being printed, and do not expand in the log viewer, so that should decrease log pollution.

@develop7 develop7 reopened this Nov 20, 2023
@deemp
Copy link
Collaborator

deemp commented Nov 20, 2023

Hi, @develop7! Nice idea. Implemented in 17d19d3

@develop7
Copy link
Author

Works like a charm, thanks!

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

No branches or pull requests

2 participants