Mykola Palamarchuk
03/31/2022, 1:14 PMos.environ
in schedule definition, but I can't do that within Dagit, which will also lead to some approach discrepancy.daniel
03/31/2022, 2:57 PM@op(
config_schema={
"foo": Field(StringSource)
},
)
def my_op(context):
return context.solid_config["foo"]
Then you could launch the run with e.g this config.
ops:
my_op:
env:
MY_ENV_VAR_NAME
Then you need to make sure that MY_ENV_VAR_NAME is present in the environment where the run is launched (e.g. by configuring your run launcher to include it)Mykola Palamarchuk
03/31/2022, 4:52 PMs3_resource
has profile_name
which is Field(str). I think that can overcome that with @configured
on my side though...
• The original problem is a kind of discrepancy between scheduler configuration and dagit one. I can tweak dagit configuration on the fly, e.g. i can add or remove values between runs. Good example is:
resources:
s3:
config:
endpoint_url:
env: MINIO_ENDPOINT_URL
Usually we need this parameter only for local development with minio. We can easily add it for local dagit and avoid it for production dagit (where we don't even have this env variable set). But that becomes a real problem when we are trying to configure @schedule
with the same piece of configuration, as its will be bundled into the code, and the env variable will become a requirement.daniel
03/31/2022, 4:55 PM