Giter Club home page Giter Club logo

Comments (13)

ben-bay avatar ben-bay commented on June 16, 2024 1

I see, good point. It's an easy fix, I'll run some tests to make sure what we think is happening is happening.

from merlin.

koning avatar koning commented on June 16, 2024 1

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.

from merlin.

koning avatar koning commented on June 16, 2024 1

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.

from merlin.

lucpeterson avatar lucpeterson commented on June 16, 2024 1

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

from merlin.

lucpeterson avatar lucpeterson commented on June 16, 2024

I think we need to remove the expanduser and expandvars references by Merlin outside of the workers

line = expandvars(expanduser(line))

new_val = expandvars(new_val)

I propose we leave user and environment variables alone and let the workers take care of them as they would at run time

from merlin.

ben-bay avatar ben-bay commented on June 16, 2024

@lucpeterson okay, so even symbols like ~ won't work then

from merlin.

lucpeterson avatar lucpeterson commented on June 16, 2024

we should check whether having "~" in a spec file would work or not

from merlin.

lucpeterson avatar lucpeterson commented on June 16, 2024

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

from merlin.

ben-bay avatar ben-bay commented on June 16, 2024

Ohhhh I see the problem. Has nothing to do with ~. We should leave env vars alone, to instead be interpreted by each step's shell and not meddled with by merlin.

from merlin.

ben-bay avatar ben-bay commented on June 16, 2024

#247

from merlin.

lucpeterson avatar lucpeterson commented on June 16, 2024

Do we have to explicitly replace them or can they be replaced by the native shell? Can we center around an example?

from merlin.

koning avatar koning commented on June 16, 2024

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.

from merlin.

ben-bay avatar ben-bay commented on June 16, 2024

Fixed with #247

from merlin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.