-
Notifications
You must be signed in to change notification settings - Fork 1
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
Configure the rrq offload directory each time a controller is created. #145
Conversation
We previously setup the rrq offload directory once when creating the queue, storing the absolute path to it in the redis database. Using a single global value breaks down when that directory is mounted on multiple machines but at differing paths. The most spectacular failure case happens when configuring the queue from a linux machine and using it to run on a Windows cluster. When this happens, the offload path looks something like `/home/<user>/path/to/project/hipercow/rrq/offload`, which when used from a Windows machine obviously does not work. This is solved by configuring each instance of an `rrq_controller` with its own path to the offload directory, relative to the hipercow root. This root is already automatically adjusted based on where we are running.
This requires mrc-ide/rrq#125 to be released first. It will also require a bootstrap library update with the new versions of both rrq and hipercow. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 25 25
Lines 2377 2392 +15
=========================================
+ Hits 2377 2392 +15 ☔ View full report in Codecov by Sentry. |
@@ -33,12 +32,30 @@ hipercow_rrq_controller <- function(..., set_as_default = TRUE, driver = NULL, | |||
queue_id = NULL, root = NULL) { | |||
root <- hipercow_root(root) | |||
call <- rlang::current_env() | |||
|
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.
Perhaps loadNamespace
with versionCheck
here to make sure we have 0.7.20
or later
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.
Used compareVersion
instead for nicer error messages.
We previously setup the rrq offload directory once when creating the queue, storing the absolute path to it in the redis database. Using a single global value breaks down when that directory is mounted on multiple machines but at differing paths.
The most spectacular failure case happens when configuring the queue from a linux machine and using it to run on a Windows cluster. When this happens, the offload path looks something like
/home/<user>/path/to/project/hipercow/rrq/offload
, which when used from a Windows machine obviously does not work.This is solved by configuring each instance of an
rrq_controller
with its own path to the offload directory, relative to the hipercow root. This root is already automatically adjusted based on where we are running.