Nolan Nichols
06/02/2022, 10:24 PMdagster
and user-code
deployments. When I launch a job from dagit using the launchpad, the job fails when trying to call an executable (e.g the aws cli) using subprocess. As I was debugging this, I noticed that the Args
listed in the dagster-run
description seem to be generated dynamically. Can you help me understand how the Args
list is constructed?Nolan Nichols
06/02/2022, 10:26 PMDockerfile
that sources a virtualenv and then runs the dagster api, but what I see in the pod description is
Args:
/opt/maze-env/bin/python
-m
dagster
api
execute_run
{"__class__": "..."}
Nolan Nichols
06/02/2022, 10:27 PMsys.executable
rex
06/02/2022, 10:27 PMNolan Nichols
06/02/2022, 10:34 PMop
using subprocess
, so the environment is not being activated when the job pod is run.
We hacked around this issue in the user-code
deployment by wrapping the dagster command with the following
#!/bin/bash
# need to activate environment and then use dagster, see Dockerfile CMD
source /opt/maze-env/bin/activate
exec /opt/maze-env/bin/dagster "$@"
Nolan Nichols
06/02/2022, 10:36 PMrex
06/02/2022, 10:38 PMrex
06/02/2022, 10:38 PMrex
06/02/2022, 10:40 PMJuan Arrivillaga
06/02/2022, 10:41 PMJuan Arrivillaga
06/02/2022, 10:42 PMJuan Arrivillaga
06/02/2022, 10:43 PMcommand = ["dagster", "api", "execute_run", input_json]
And that would have actually worked for us.
The replacement of:
command = args.get_command_args()
Juan Arrivillaga
06/02/2022, 10:44 PMsys.executable
with -m
and dagster
is probably the correct way to go about this for the launcherdaniel
06/02/2022, 10:47 PMJuan Arrivillaga
06/02/2022, 10:47 PMJuan Arrivillaga
06/02/2022, 10:48 PMdaniel
06/02/2022, 10:49 PMJuan Arrivillaga
06/02/2022, 10:50 PMJuan Arrivillaga
06/02/2022, 10:51 PMdaniel
06/02/2022, 10:52 PMJuan Arrivillaga
06/02/2022, 10:52 PM--use-python-environment-entry-point
induces.daniel
06/02/2022, 10:52 PMJuan Arrivillaga
06/02/2022, 10:52 PMJuan Arrivillaga
06/02/2022, 10:52 PMdaniel
06/02/2022, 10:53 PMdaniel
06/02/2022, 10:53 PM/opt/maze-env/bin/python
-m
dagster
Juan Arrivillaga
06/02/2022, 10:54 PMdaniel
06/02/2022, 10:55 PMJuan Arrivillaga
06/02/2022, 10:55 PMdaniel
06/02/2022, 10:55 PMdaniel
06/02/2022, 10:55 PMdaniel
06/02/2022, 10:56 PMNolan Nichols
06/02/2022, 10:58 PM(maze-env) root@user-code-dagster-user-deployments-maze-etl-747c8fb8fd-mnldq:/app# dagster --version
dagster, version 0.14.16
daniel
06/02/2022, 11:00 PMJuan Arrivillaga
06/02/2022, 11:00 PMdaniel
06/02/2022, 11:01 PMdaniel
06/02/2022, 11:01 PMJuan Arrivillaga
06/02/2022, 11:01 PMJuan Arrivillaga
06/02/2022, 11:04 PMdaniel
06/02/2022, 11:04 PMJuan Arrivillaga
06/02/2022, 11:04 PMJuan Arrivillaga
06/02/2022, 11:05 PMJuan Arrivillaga
06/02/2022, 11:07 PMdaniel
06/02/2022, 11:08 PMJuan Arrivillaga
06/02/2022, 11:09 PMJuan Arrivillaga
06/02/2022, 11:10 PMNolan Nichols
06/02/2022, 11:33 PMError: No arguments given and workspace.yaml not found.
rex
06/02/2022, 11:34 PMrex
06/02/2022, 11:35 PMrex
06/02/2022, 11:35 PMNolan Nichols
06/02/2022, 11:38 PM~
to 0.14.6
in the helm chart and did an upgraderex
06/02/2022, 11:41 PMrex
06/02/2022, 11:42 PMNolan Nichols
06/02/2022, 11:43 PMdaniel
06/02/2022, 11:49 PMNolan Nichols
06/03/2022, 2:44 PM--version
as described in the docs
helm upgrade --install dagster -n dagster dagster/dagster -f dagster-values.yaml --version 0.14.17
Error: failed to download "dagster/dagster" at version "0.14.17"
daniel
06/03/2022, 3:50 PMhelm repo update
first?Nolan Nichols
06/03/2022, 3:51 PMhelm repo update
and now everything is working as expected 🎉Nolan Nichols
06/03/2022, 3:51 PMJeremy Fisher
07/01/2022, 12:11 AMhelm repo update
fixed it 🥳