Hi folks! I have a StepDecorator where I want to ...
# ask-metaflow
s
Hi folks! I have a StepDecorator where I want to add some stuff to the environment wherever the task is run (which will usually be using
@kubernetes
in my case). I cribbed from what the
@environment
decorator does, and did something like this:
Copy code
def runtime_step_cli(self, cli_args, *_args):
        if self.attributes["some_attribute"]:
            cli_args.env.update({"SOME_ENV_VAR": "SOME_VALUE"})
Then I have a
task_pre_step
that uses that env var. However, I'm not seeing
SOME_ENV_VAR
set in
os.environ
within the task_pre_step when running in a kubernetes pod. I have confirmed that it is present during
step_init
while the task is being started up on the local machine, and the values I'm setting using the
environment
decorator are making it to the pod, but not the ones from my extension. Any ideas what I'm missing here?