-
Notifications
You must be signed in to change notification settings - Fork 26
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
[BUG] Rogue string expansion #201
Comments
I think we need to remove the expanduser and expandvars references by Merlin outside of the workers merlin/merlin/spec/expansion.py Line 83 in 54166e0
merlin/merlin/spec/expansion.py Line 141 in 54166e0
I propose we leave user and environment variables alone and let the workers take care of them as they would at run time |
@lucpeterson okay, so even symbols like |
we should check whether having "~" in a spec file would work or not |
i bring this up to address Timo's desire to use environment variables in spec descriptions for extra flexibility as it stands now, environment variables are expanded when "merlin run" is executed and filled out in the spec, and therefore hard-coded into the step. this prevents using things like ${SYS_TYPE} within steps |
I see, good point. It's an easy fix, I'll run some tests to make sure what we think is happening is happening. |
Ohhhh I see the problem. Has nothing to do with |
To be clear, you should be able to use env variables in all sections except the steps. These are definitely used in the batch section. I mean they should all be replaced at run , except for the steps. |
Do we have to explicitly replace them or can they be replaced by the native shell? Can we center around an example? |
Well the point is to replace them immediately, like paths to flux in the batch section. There are not part of a step so they won't be replaced by the env when they are run. Also in variables in the env section, those should be replaced at run, if a user wants the variable to remain unchanged , it should be in a step. |
I think this is semantics, by replaced I mean made available at run with the run env variables. So yes, as long as they are in the shell when run it is fine. |
Ah ok, I think leaving them alone (and exposed) at run time will actually fix another (related) bug/feature. I was having issues using ${SYS_TYPE} in the batch section for flux w/ run-workers and was having a hard time tracking it down. Not sure yet if it's related, but there was some odd behavior |
Fixed with #247 |
🐛 Bug Report
Describe the bug
The string "$_" expands to a path in the venv.
To Reproduce
Steps to reproduce the behavior:
merlin run <spec.yaml>
Expected behavior
The string "$_" should not change.
EDIT: According to this, "$_" is a special shell variable.
The text was updated successfully, but these errors were encountered: