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

job_environment doesn't handle values with spaces #137

Closed
ericfranz opened this issue Mar 15, 2019 · 1 comment · Fixed by #202
Closed

job_environment doesn't handle values with spaces #137

ericfranz opened this issue Mar 15, 2019 · 1 comment · Fixed by #202
Assignees
Labels
Milestone

Comments

@ericfranz
Copy link
Contributor

The adapters turn the hashes into key value pairs in the command line arguments.

As a result I couldn't do something like this in the submit.yml.erb config in an interactive app:

script:
  job_environment:
    idea: This is a good idea

Instead I would need to do this:

script:
  job_environment:
    idea: "'This is a good idea'"

Then it would at least work in Torque.

@ericfranz ericfranz added the bug label Mar 15, 2019
@ericfranz ericfranz added this to the OOD1.7 milestone Dec 20, 2019
@ericfranz ericfranz removed this from the OOD1.7 milestone Feb 26, 2020
@ericfranz ericfranz added this to the OOD1.8 milestone May 4, 2020
@matthu017
Copy link
Contributor

matthu017 commented Jun 11, 2020

This line shouldn't need to use the to_s method. Whatever is calling it should have already parsed the yaml into a string. https://github.com/OSC/ood_core/blob/master/lib/ood_core/job/script.rb#L151

Edit: It is passed down as a correct hash but gets messed up in these lines:
https://github.com/OSC/ood_core/blob/master/lib/ood_core/job/adapters/torque.rb#L92-L172
https://github.com/OSC/ood_core/blob/master/lib/ood_core/job/adapters/torque/batch.rb#L335

@matthu017 matthu017 self-assigned this Jun 15, 2020
@matthu017 matthu017 linked a pull request Jun 15, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants