-
Notifications
You must be signed in to change notification settings - Fork 154
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
Running renv::restore() in parallel will fail #1571
Comments
I believe #1598 will help resolve the issue you're seeing. Could you try testing with:
and test if things appear better on your side? |
I tried and reproduced the error running this in parallel in two terminals:
I then tried to use the fixed version (clearing the cache beforehand
The fixed version did not throw an error. I do wonder, however, what happens if the process dies for whatever reason while the lock is there: would it keep the installation locked until someone manually removes the lock? |
Thank you for confirming!
renv will also refresh any active locks at opportune times, just to ensure that the 60 seconds threshold above isn't hit. |
If a docker container dies, the watchdog won't work, but the other mechanism should fix that.
So in case of a package with a long compilation time it would refresh the lock while compiling? |
Right -- to be more specific, the watchdog process is responsible for refreshing the locks, and it'll be able to do so even if the monitored R process is busy. |
I have some Airflow tasks where I launch a Kubernetes Pod and in that Pod I use
renv
to install and run code from a package.Since the task is, essentially, "copy data from A to B for date X", there can be multiple instance of this task running in parallel for different days.
If the packages are not in the cache,
renv
will attempt to install the missing packages in all the parallel jobs. Unfortunately, only the first job to finish installing will actually be sucessful and the other jobs will fail with an error:Does this really need to be an error condition?
Ideally it would acknowledge that the desired package has been installed in the cache in the meantime and move on.
The text was updated successfully, but these errors were encountered: