jmcarp commented on a change in pull request #4821: [AIRFLOW-3998] Use nested
commands in cli.
URL: https://github.com/apache/airflow/pull/4821#discussion_r276511890
##########
File path: airflow/bin/cli.py
##########
@@ -2186,73 +2140,217 @@ class CLIFactory(object):
'autoscale': Arg(
('-a', '--autoscale'),
help="Minimum and Maximum number of worker to autoscale"),
-
}
subparsers = (
{
- 'func': backfill,
- 'help': "Run subsections of a DAG for a specified date range. "
- "If reset_dag_run option is used,"
- " backfill will first prompt users whether airflow "
- "should clear all the previous dag_run and task_instances "
- "within the backfill date range. "
- "If rerun_failed_tasks is used, backfill "
- "will auto re-run the previous failed task instances"
- " within the backfill date range.",
- 'args': (
- 'dag_id', 'task_regex', 'start_date', 'end_date',
- 'mark_success', 'local', 'donot_pickle',
- 'bf_ignore_dependencies', 'bf_ignore_first_depends_on_past',
- 'subdir', 'pool', 'delay_on_limit', 'dry_run', 'verbose',
'conf',
- 'reset_dag_run', 'rerun_failed_tasks', 'run_backwards'
- )
- }, {
- 'func': list_dag_runs,
- 'help': "List dag runs given a DAG id. If state option is given,
it will only"
- "search for all the dagruns with the given state. "
- "If no_backfill option is given, it will filter out"
- "all backfill dagruns for given dag id.",
- 'args': (
- 'dag_id', 'no_backfill', 'state'
- )
- }, {
- 'func': list_tasks,
- 'help': "List the tasks within a DAG",
- 'args': ('dag_id', 'tree', 'subdir'),
- }, {
- 'func': list_jobs,
- 'help': "List the jobs",
- 'args': ('dag_id_opt', 'state', 'limit'),
- }, {
- 'func': clear,
- 'help': "Clear a set of task instance, as if they never ran",
- 'args': (
- 'dag_id', 'task_regex', 'start_date', 'end_date', 'subdir',
- 'upstream', 'downstream', 'no_confirm', 'only_failed',
- 'only_running', 'exclude_subdags', 'exclude_parentdag',
'dag_regex'),
- }, {
- 'func': pause,
- 'help': "Pause a DAG",
- 'args': ('dag_id', 'subdir'),
- }, {
- 'func': unpause,
- 'help': "Resume a paused DAG",
- 'args': ('dag_id', 'subdir'),
- }, {
- 'func': trigger_dag,
- 'help': "Trigger a DAG run",
- 'args': ('dag_id', 'subdir', 'run_id', 'conf', 'exec_date'),
+ 'help': 'DAGs',
Review comment:
Updated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services