ondemand icon indicating copy to clipboard operation
ondemand copied to clipboard

new project manager to support environment variables.

Open johrstrom opened this issue 2 years ago • 2 comments

Since the new project manager isn't going to allow a submit.yml.erb (or any similar ERB processing on files) it will require another mechanism to pass variables to the shell scripts that are being submitted. Environment variables suites this need just fine.

Off the top - for the project manager to support this we'll need an auto_environment_variable (or similarly named) smart attribute.

This feature should also allow for multiple auto_environment_variable(s) in the form so one could specify any number of environment variables to set. To get them all to merge correctly in auto_environment_variable#submit may or may not be difficult - I'm not entirely sure.

johrstrom avatar Sep 27 '23 19:09 johrstrom

I may (will more than likely) have more questions on this, but for now - the intention here is to set an attribute that's a list of variables (so I'm assuming key/value pairs?) on the scripts#new form?

HazelGrant avatar Dec 05 '23 14:12 HazelGrant

I may (will more than likely) have more questions on this, but for now - the intention here is to set an attribute that's a list of variables (so I'm assuming key/value pairs?) on the scripts#new form?

Yea questions are expected lol. I suspect this is rather difficult, but I gave you this to get familiar with the project manager and probably even ood_core.

This is more about scripts#edit and scripts#submit. The big thing about the project manager is we're doing basically the same thing batch connect apps do - using a form to generate an HTML form that submits a job.

The major difference is is that it's all defined in the UI (i.e., the user doesn't have to write the form.yml OR the submit.yml).

From ood_core you can set environment variables on the job script (submit.yml.erb) like so (I'm recalling this from memory so could be slightly wrong).

script:
  job_enviornment:
    PATH: '/some/path:/other/path'
    FOO: 'bar'

So it's essentially a question of how do we provide this submit.yml.erb functionality in the UI which is half being able to generate and serialize the things in scripts#edit and then the other half them being able to submit themselves (in scripts#submit).

Happy to meet and give an overview of how this is done with other auto_* smart attributes.

johrstrom avatar Dec 05 '23 14:12 johrstrom