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

Failed to save: Unable to reserve cache with key ... another job may be creating this cache. More details: Cache already exists. #28

Open
adjsky opened this issue Dec 22, 2023 · 2 comments
Assignees

Comments

@adjsky
Copy link

adjsky commented Dec 22, 2023

The install action reads and writes the nix store to different keys for some reason.

Example repository: https://github.com/adjsky/devbox-action-cache

https://github.com/adjsky/devbox-action-cache/actions/runs/7302430758/job/19901021653#step:3:346
https://github.com/adjsky/devbox-action-cache/actions/runs/7302430758/job/19901021653#step:3:694

When reading the key is Linux-devbox-nix-store-3a2654425ec8f477c946ced19122871a8ba12acf7aa422229029e8399cfb464e, but when saving the key is Linux-devbox-nix-store-496d8beac83195b1e6331c2845b230b457389e8192ef75d1f89b84e8dcc45753.

Since this job has been run before and successfully saved the cache, subsequent jobs display a warning.

@LucilleH LucilleH self-assigned this Jan 2, 2024
@LucilleH
Copy link
Contributor

LucilleH commented Jan 2, 2024

@adjsky ah it is probably because the devbox.lock file changed during installation in Linux. Maybe we can print a more useful warning 👍

@adjsky
Copy link
Author

adjsky commented Jan 2, 2024

@LucilleH yeah, i synchronized devbox.lock with devbox.json and now everything works great.

Showing a warning would be nice, but it seems to me that if devbox.lock and devbox.json are not synchronized, the action should fail, like PNPM does when installing dependencies (https://pnpm.io/cli/install#--frozen-lockfile), this behavior seems more logical and correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants