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

Pre-existing caches are not updated #124

Closed
richvdh opened this issue Mar 1, 2023 · 2 comments
Closed

Pre-existing caches are not updated #124

richvdh opened this issue Mar 1, 2023 · 2 comments

Comments

@richvdh
Copy link

richvdh commented Mar 1, 2023

Currently, if the cache exists at the start of the job, it is not updated with any changes to the target directory that happen during the job.

We have a moderately complicated workspace with a bunch of different crates, which get built and tested via a matrix job. The crates have plenty of shared dependencies - so it would be nice for them to benefit from a shared cache - but also some that are not shared. What we find is that the first job to run creates the cache with the dependencies for that job, but subsequent jobs do not update the cache, so their dependencies are never cached.

@Swatinem
Copy link
Owner

Swatinem commented Mar 1, 2023

Updating caches is fundamentally not possible with how github caching works. Its been a long-running issue here: actions/toolkit#505

I would recommend to just give each job its own cache. It sure takes up more size, but should also be more predictable.

@Swatinem Swatinem closed this as completed Mar 1, 2023
@richvdh
Copy link
Author

richvdh commented Mar 1, 2023

ah right. 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