-
Notifications
You must be signed in to change notification settings - Fork 218
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
Remove save-always
usage
#934
Conversation
Separate out `save-always: true` and `bypass-cache: never` (for `setup-renv`) completely, the logic is simpler that way.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I modified it a bit, so the two code paths are completely independent now. I think it is easier to understand and implement it this way.
Ran into some errors running a test but maybe these are unrelated: On windows R-4.1
If we have concurrent jobs on the same OS, only the first one finishing saves the cache, the other ones error, but perhaps that is okay. It does not fail the job.
|
What am I supposed to look at there? I am fairly sure that it works, see the links in #934 (comment)
What can we do with that? |
Sorry I think the |
I don't think it is |
Thanks! |
You are right, I was considering if we should add the job-id to the caching key but this unavailable during the run anyway. And it works fine the way it does now, the first one of the concurrent jobs to finish gets to save the cache and the other ones silently skip saving. Should I open a separate issue for the above zstd issue on Windows ? |
Then you'd never get a cache hit, no? You'd also get a lot of (useless) caches, if every job saves its own cache.
Seems to be coming from the cache action, so maybe there? But isn't that just because of the concurrency? |
It happens earlier and only for R < 4.2. Maybe an issue with zstd in rtools40 I don't know. |
That's possible, but they should really set the PATH properly instead of picking up whatever binary they find. Anyway, I can take a look and adjust the PATH I guess. |
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this pull request. |
Closes #928
I don't think this is quite right yet but it may be as far as i can take it
When the GitHub team deprecated save-always, they provided some guidance on how to update:
https://github.com/actions/cache/tree/main/save#always-save-cache
The gist is that we have to split our usage into separate explicit save/restore steps.
I am quite uncertain of how to use the magic
always()
if conditional, what we want is:inputs.cache = 'always' || inputs.cache = 'true'
and the workflow hasn't failed so farinputs.cache = 'always'
, regardless of whether or not the workflow has failedI tried encoding this using
always()
but it feels fishy. I'm not sure ifalways()
needs to be at the very beginning of theif:
or not. Here are the docs on it:https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#always