OSC / bc_osc_rstudio_server

Batch Connect - OSC RStudio Server
https://osc.github.io/Open-OnDemand/
MIT License
10 stars 18 forks source link

fixes #28 to allow users to specify modules #29

Closed johrstrom closed 4 years ago

ericfranz commented 4 years ago

Do you see any problem with using the output of module -t spider as a way to validate in the submit.yml.erb? The output could be added to the cluster configs (without the slashes).

For example

module -t spider 2>&1 | sed 's,/$,,g' | sed 's,^, - ,g'

produces output like

 - R
 - R/3.3.1
 - R/3.3.2
 - R/3.4.0
 - R/3.4.2
 - R/3.5.0

which could be added to the custom section in the cluster config like

custom:
  valid_lmod_entries:
    - R
    - R/3.3.1
    - R/3.3.2

And then in the submit.yml.erb you can just do a split on whitespace on the input value of the custom modules and verify that the modules specified fit in that array.

johrstrom commented 4 years ago

No that should be fine.

johrstrom commented 4 years ago

Closing this PR as we're coming up with a stronger strategy around viewing module output and determining dependencies. Please use #28 for any discussion on the feature design if there's no open PR.