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

Configure the rrq offload directory each time a controller is created. #145

Merged
merged 5 commits into from
Nov 12, 2024

Conversation

plietar
Copy link
Member

@plietar plietar commented Oct 18, 2024

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.

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.
@plietar
Copy link
Member Author

plietar commented Oct 18, 2024

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.

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2a40ac2) to head (a88bbc5).
Report is 6 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@@ -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()

Copy link
Member

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

Copy link
Member Author

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.

@plietar plietar merged commit 2b3a77e into main Nov 12, 2024
16 checks passed
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