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

Do not cache full environments, only lockfiles #31

Merged
merged 4 commits into from
Aug 6, 2024

Conversation

brynpickering
Copy link
Collaborator

I've gone back and forth on this a bit, but the issue of unpacking cached environments on windows (#30) is difficult to solve. I've opted for a much simpler caching approach, whereby only a "lockfile"/explicit list of dependencies is cached. This reduces the environment creation time by removing the need for conda to resolve dependencies (since they are all explicitly linked).

It slows things down slightly on linux/MacOS runners, compared to using a fully stored cache, but seems to improve things on Windows. SInce Windows CI runs are our rate limiter, it seems to be an OK compromise.

The other reason to switch to this approach is that it keeps our caches small (~2kb). Caching full environments is more like 200-500mb and that can quickly lead to us reaching our cache limit on repos (10GB) since we get different caches per branch, per OS, per python version, etc.

@brynpickering brynpickering requested a review from mfitz August 5, 2024 13:24
Copy link
Contributor

@mfitz mfitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@brynpickering brynpickering merged commit f3e1a58 into main Aug 6, 2024
1 check passed
@brynpickering brynpickering deleted the no-custom-cache-dir branch August 6, 2024 12:14
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.

2 participants