Danny
05/21/2020, 7:05 PMexecute_pipeline
and execute_pipeline_iterator
seem to always block, and I tried copying how the CLI does it (https://github.com/dagster-io/dagster/blob/master/python_modules/dagster/dagster/cli/pipeline.py#L405-L413) but both my code and the cli are throwing this:
$ DAGSTER_HOME=tmp/dagster dagster pipeline launch my_pipeline -y pipelines/repository.yaml -e pipelines/my_pipeline_config.yaml
Traceback (most recent call last):
File "/home/danny/.pyenv/versions/project-3.7.7/bin/dagster", line 8, in <module>
sys.exit(main())
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/dagster/cli/__init__.py", line 38, in main
cli(obj={}) # pylint:disable=E1123
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/dagster/core/telemetry.py", line 231, in wrap
result = f(*args, **kwargs)
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/dagster/cli/pipeline.py", line 417, in pipeline_launch_command
return instance.launch_run(pipeline_run.run_id)
File "/home/danny/.pyenv/versions/3.7.7/envs/project-3.7.7/lib/python3.7/site-packages/dagster/core/instance/__init__.py", line 788, in launch_run
return self._run_launcher.launch_run(self, run)
AttributeError: 'NoneType' object has no attribute 'launch_run'
In case it matters: I haven't configured a dagster.yaml file anywhere. If it's a run_launcher
config that I'm missing, what should it be if I'm running my code or the cli on the same machine where dagit is running on localhost?$ dagster --version
dagster, version 0.7.12
alex
05/21/2020, 7:37 PMrun_launcher
is probably the right answer but we likely don’t have one that satisfies your constraints yet (were working on it at the moment).max
05/21/2020, 7:43 PMlaunch_run
this would be straightforwardDanny
05/21/2020, 7:51 PMrun_launcher
config to dagster.yaml will fix the exception? If so, even if it doesn't give me the nonblocking behaviour I want, what should it be for targeting a local dagit instance? This doesn't work:
$ cat dagster.yaml
run_launcher:
module: dagster.core.launcher
class: RunLauncher
RE working on a way to launch via code in a nonblocking way, is there already a github issue where I can track this work?alex
05/21/2020, 7:54 PMwhat should it be for targeting a local dagit instance?Thats a piece we dont really have right now, but are working on. Can you talk more about what exactly you are doing? You may be able to just use
threading
or multiprocessing
libraries in python to move your execute_pipeline
call to make it non-blocking depending on your setup.Danny
05/21/2020, 7:58 PMdagster_graphql.launcher.RemoteDagitRunLauncher
config for the CLI?alex
05/21/2020, 8:04 PMDanny
05/21/2020, 8:08 PMit cant be the same one you initiated the initial launch from@alex just to clarify, you mean if my dagit is executing a solid and that solid is the one that starts a new thread/process to
execute_pipeline()
the sibling pipeline via the localhost graphql endpoint, I'll hit this flask bug?alex
05/21/2020, 8:10 PMLaunch Run
button in dagit if you are pointing at yourself - but keep an eye out for weird timeouts trying to reach dagit serverDanny
05/21/2020, 8:12 PMalex
05/21/2020, 8:13 PMDanny
05/21/2020, 8:29 PMpipeline launch
instead of pipeline execute
)? Why would I need graphql at all if I can just call execute_pipeline()
in my code via threading/multiprocessing and get local nonblocking execution?alex
05/21/2020, 8:32 PMa local cli can execute a pipeline in a local dagit serverThis CLI doesn’t go through
dagit
- the cli command runs execute_pipeline
in processDanny
05/21/2020, 8:32 PMalex
05/21/2020, 8:33 PMdagit
is a webserver - so when you click Start Execution
in the web tool a request is sent to the server and it will create a subprocess and effectively execute execute_pipeline
in thereDanny
05/21/2020, 8:34 PMalex
05/21/2020, 8:34 PMRunLauncher
is used to transfer responsibility of execution to some other process / systemlaunch_run
is who owns the process doing execution and all the related complexity of that processes life cycleDanny
05/21/2020, 8:35 PMalex
05/21/2020, 8:37 PMRemoteDagitRunLauncher
is a way to say “there is dagit running at $WEB_ADDRESS
go tell it to do this pipeline execution”DagsterInstance
across the board https://docs.dagster.io/docs/deploying/instanceDanny
05/21/2020, 8:39 PMwe are actively changing how these systems workChange here means we're tweaking the API, or do you mean you're potentially phasing out graphql and/or planning to make some other major architectural change to everything you've just described above?
alex
05/21/2020, 8:43 PMpipeline_name
used to communicate that we are infact talking about the same pipeline when we do hand-offs so a lot of the changes are introducing structure necessary to improve that situationRemoteDagitRunLauncher
but RunLauncher
is meant to be a user extendable class so you could always implement your own variant. But we are hoping to write better ones - ie a background daemon responsible for processes instead of a web server - so it might just be a replacement situationdagit
and dagster-graphql
are not going anywhereDanny
05/21/2020, 8:48 PMwbonelli
05/21/2020, 11:17 PM