https://dagster.io/ logo
Title
m

MarvinK

09/23/2022, 9:47 AM
Hi, found a weird thing about env variables. If it matters, I am using the DockerRunLauncher. Following a simplified setup:
@op()
def set_environment(context):
    os.environ['DATA'] = "someValue"
    <http://context.log.info|context.log.info>(os.environ['DATA'])


@op(ins={"start": In(Nothing)})
def do_something(context):
    <http://context.log.info|context.log.info>(os.environ['DATA'])     <-- Env-Variable is not present anymore


@job()
def do_it_all_with_simplified_config():
    do_something(start=set_environment())
Why is the env variable in do_something not present? I set it in set_environment and can log it. greetings
1
:dagster-bot-responded-by-community: 1
Using the in_process_executor solves this problem. So job looks like:
@job(executor_def=in_process_executor)
def do_it_all_with_simplified_config():
    do_something(start=set_environment())
👍 1
:condagster: 1