https://dagster.io/ logo
#deployment-ecs
Title
# deployment-ecs
t

Tiri Georgiou

05/26/2021, 1:51 PM
Hey can someone help me here. In the dagster.yaml I want to specify the DockerRunLauncher
network
as an environment variable but I'm getting into some issues with it being evaluated as a dict at runtime..
Copy code
run_launcher:
  module: dagster_docker
  class: DockerRunLauncher
  config:
    env_vars:
      - DAGSTER_POSTGRES_USER
      - DAGSTER_POSTGRES_PASSWORD
      - DAGSTER_POSTGRES_DB
    network: 
      env: DAGSTER_NETWORK # <-- Error as this gets evaluated as a dict not a string?
^^ anybody know why?
d

daniel

05/26/2021, 1:52 PM
Hi Tiri - could you post the exact text of the error?
Oh wait, I see the issue. We'll need to make a small change to make this field work as an environment variable. We can get that into the release that's happening tomorrow
👍 1
t

Tiri Georgiou

05/26/2021, 2:08 PM
Let me try recreating the issue and send it again but yes the env variable evaluated as some {"name": "value"} where the "value" was the desired result
Copy code
dagster.core.errors.DagsterInvalidConfigError: Errors whilst loading configuration for {'image': Field(<dagster.config.source.StringSourceType object at 0x7f303310e0d0>, default=@, is_required=False), 'registry': Field(<dagster.config.field_utils.Shape object at 0x7f302d357550>, default=@, is_required=False), 'env_vars': Field(<dagster.config.config_type.Array object at 0x7f302d357640>, default=@, is_required=False), 'network': Field(<dagster.config.config_type.String object at 0x7f3035091970>, default=@, is_required=False), 'container_kwargs': Field(<dagster.config.field_utils.Permissive object at 0x7f3034bd0c70>, default=@, is_required=False)}.
    Error 1: Invalid scalar at path root:network. Value "{'env': 'DAGSTER_NETWORK'}" of type "<class 'dict'>" is not valid for expected type "String".
d

daniel

05/26/2021, 2:09 PM
Yeah, we need to make the "network" key a StringSource rather than a string
👍 1
Confirmed that this will go out in the release tomorrow
👍 1
8 Views