-
Notifications
You must be signed in to change notification settings - Fork 20
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
Don't post to the download cache when environment caching #53
Don't post to the download cache when environment caching #53
Conversation
Thanks for this. Maybe @jonashaag has a minute to check this PR? :) |
Thanks for pinging, I can have a look next week. Any chance you can check if the problem remains in #45? |
Thanks for the reply @wolfv @jonashaag! I tried with #45, but the problem remains (I tested it here: https://github.com/jobovy/galpy/runs/6357270889?check_suite_focus=true). |
Thanks for the fix and test! Looks correct. I wonder if we should introduce something like We should merge #45 first. |
Thanks for the review!
Yes, I agree that this would be better. I've just changed the code in this vein (but only using a single variable, which I think is clear enough). Hopefully now that #45 is merged, this can be merged now. |
@wolfv please approve actions (and maybe give me permissions to do that?) |
Thanks! |
There appears to be a problem when one uses both the download cache and the environment cache. In particular, when the environment cache is hit, the current version still tries to post to the download cache, which fails because it's not set up (and shouldn't be run). The faulty logic appears to be here:
provision-with-micromamba/index.js
Lines 305 to 308 in 5fe88d3
which is inconsistent with where
downloadCacheArgs
is defined here:provision-with-micromamba/index.js
Lines 275 to 281 in 5fe88d3
leading to an error that
downloadCacheArgs
is not iterable.This PR fixes this by making the logic used to decide whether to post to the download cache consistent with the earlier logic on whether or not to use/setup the download cache.
I also added a test. In doing that, I noticed that the way the other cache tests were written, both jobs in the test would use an earlier cache version because the cache already exists for the job that's supposed to setup the cache (when running on the same day, the default cache-key is the same). So I created a custom key that incorporates the
github.ref
and the attempt number, which I think should uniquely determine a workflow run. Now the first job in the sequence always creates a new cache that is then used by the second job.