Page MenuHomePhabricator

Print help message when we can't get a pipeline to execute

Authored by max on Jul 19 2019, 4:55 PM.


Group Reviewers
Restricted Project
R1:a34b6822fa35: Print help message when we can't get a pipeline to execute
Test Plan

Unit & manual confirmation

Diff Detail

R1 dagster
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

max created this revision.Jul 19 2019, 4:55 PM

can you post screenshot of new, better message?

max added a comment.Jul 19 2019, 5:27 PM

status quo:

10:26 $ dagster pipeline execute
Traceback (most recent call last):
  File "/Users/max/.virtualenvs/dagster/bin/dagster", line 11, in <module>
    load_entry_point('dagster', 'console_scripts', 'dagster')()
  File "/Users/max/dev/dagster/python_modules/dagster/dagster/cli/", line 23, in main
    cli(obj={})  # pylint:disable=E1123
  File "/Users/max/.virtualenvs/dagster/lib/python3.6/site-packages/click/", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/max/.virtualenvs/dagster/lib/python3.6/site-packages/click/", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/max/.virtualenvs/dagster/lib/python3.6/site-packages/click/", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/max/.virtualenvs/dagster/lib/python3.6/site-packages/click/", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/max/.virtualenvs/dagster/lib/python3.6/site-packages/click/", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/max/.virtualenvs/dagster/lib/python3.6/site-packages/click/", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/max/dev/dagster/python_modules/dagster/dagster/cli/", line 296, in pipeline_execute_command
    execute_execute_command(env, raise_on_error, kwargs, mode)
  File "/Users/max/dev/dagster/python_modules/dagster/dagster/cli/", line 300, in execute_execute_command
    pipeline = create_pipeline_from_cli_args(cli_args)
  File "/Users/max/dev/dagster/python_modules/dagster/dagster/cli/", line 130, in create_pipeline_from_cli_args
    return handle_for_pipeline_cli_args(kwargs).build_pipeline_definition()
  File "/Users/max/dev/dagster/python_modules/dagster/dagster/cli/", line 79, in handle_for_pipeline_cli_args
    raise CliUsageError()

after diff:

10:27 $ dagster pipeline execute
Usage: dagster pipeline execute [OPTIONS] [PIPELINE_NAME]...

  Execute a pipeline.

  This commands targets a pipeline. The pipeline can be specified in a
  number of ways:

  1. dagster execute <<pipeline_name>> (works if .repository.yaml exists)

  2. dagster execute <<pipeline_name>> -y path/to/repository.yaml

  3. dagster execute -f /path/to/ -n define_some_pipeline

  4. dagster execute -m a_module.submodule  -n define_some_pipeline

  5. dagster execute -f /path/to/ -n define_some_repo

  6. dagster execute -m a_module.submodule -n define_some_repo

  -n, --fn-name TEXT
  -m, --module-name TEXT
  -f, --python-file TEXT
  -y, --repository-yaml TEXT      Path to config file. Defaults to
                                  ./repository.yaml if --python-file and
                                  --module-name are not specified
  -e, --env TEXT                  Specify one or more environment files. These
                                  can also be file patterns. If more than one
                                  environment file is captured then those
                                  files are merged. Files listed first take
                                  precendence. They will smash the values of
                                  subsequent files at the key-level
                                  granularity. If the file is a pattern then
                                  you must enclose it in double quotes
                                  Example: dagster pipeline execute
                                  pandas_hello_world -e
                                  You can also
                                  specifiy multiple files:
                                  Example: dagster
                                  pipeline execute pandas_hello_world -e
                                  pandas_hello_world/solids.yaml -e
  --raise-on-error / --no-raise-on-error
  -p, --preset TEXT               Specify a preset to use for this pipeline.
                                  Presets are defined on the repo_config on
                                  RepositoryDefinition, typically managed
                                  under the config key in repository.yaml.
  -d, --mode TEXT
  --help                          Show this message and exit.
nate accepted this revision as: nate.Jul 19 2019, 5:41 PM
This revision is now accepted and ready to land.Jul 19 2019, 5:41 PM