Skip to content

TriggerDagRunOperator only works with the raw argument. #687

@paul-english

Description

@paul-english

I'm not too sure on the details about this, but trying to trigger a TriggerDagRunOperator usually fails with the following output.

> airflow run test_dag run_other_dag 2015-11-24
Sending to executor.
Traceback (most recent call last):
  File "/Users/penglish/.virtualenvs/athena/bin/airflow", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/penglish/src/github.com/airbnb/airflow/airflow/bin/airflow", line 17, in <module>
    args.func(args)
  File "/Users/penglish/src/github.com/airbnb/airflow/airflow/bin/cli.py", line 145, in run
    raise AirflowException(msg)
airflow.utils.AirflowException: DAG [xxxxxxxxxx] could not be found

I think the issue is that the dagbag in the cli only includes the test_dag in it's list of dags. I noticed that there was a branch that directly runs the task instance if raw is set, and this seems to work.

This doesn't seem like desired behavior since trying to run a task from the web interface doesn't send the raw argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions