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

new project manager to support environment variables. #3081

Closed
Tracked by #3394
johrstrom opened this issue Sep 27, 2023 · 2 comments · Fixed by #3432
Closed
Tracked by #3394

new project manager to support environment variables. #3081

johrstrom opened this issue Sep 27, 2023 · 2 comments · Fixed by #3432
Assignees
Milestone

Comments

@johrstrom
Copy link
Contributor

johrstrom commented Sep 27, 2023

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 johrstrom mentioned this issue Sep 27, 2023
45 tasks
@osc-bot osc-bot added this to the Backlog milestone Sep 27, 2023
@HazelGrant HazelGrant self-assigned this Dec 4, 2023
@HazelGrant
Copy link
Contributor

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?

@johrstrom
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment