wittfabian opened a new issue #8375: CLI trigger_dag ignores subdir flag
URL: https://github.com/apache/airflow/issues/8375
 
 
   **Apache Airflow version**: 1.10.10
   
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: docker 
(https://github.com/puckel/docker-airflow)
   - **OS** (e.g. from /etc/os-release): Debian GNU/Linux
   - **Kernel** (e.g. `uname -a`): Linux 605ca8c83588 4.19.76-linuxkit #1 SMP 
Thu Oct 17 19:31:58 UTC 2019 x86_64 GNU/Linux
   - **Install tools**: pip
   - **Others**:
     - Postgres DB: 9.6
   
   **What happened**:
   
   running `airflow trigger_dag <dag_id> -sd .` produces error.
   
   ```
   Traceback (most recent call last):
     File "/usr/local/bin/airflow", line 37, in <module>
       args.func(args)
     File "/usr/local/lib/python3.7/site-packages/airflow/utils/cli.py", line 
75, in wrapper
       return f(*args, **kwargs)
     File "/usr/local/lib/python3.7/site-packages/airflow/bin/cli.py", line 
237, in trigger_dag
       execution_date=args.exec_date)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/api/client/local_client.py", 
line 34, in trigger_dag
       execution_date=execution_date)
     File 
"/usr/local/lib/python3.7/site-packages/airflow/api/common/experimental/trigger_dag.py",
 line 124, in trigger_dag
       raise DagNotFound("Dag id {} not found in DagModel".format(dag_id))
   airflow.exceptions.DagNotFound: Dag id <dag_id> not found in DagModel
   ```
   
   running `airflow test <dag_id> <task_id> -e <date> -sd .` works fine.
   
   I think `airflow trigger_dag` ignores the subdir flag
   
   
https://github.com/apache/airflow/blob/master/airflow/api/common/experimental/trigger_dag.py#L121
   
   **What you expected to happen**:
   
   a dag execution to be triggered
   
   **How to reproduce it**:
   
   - get airflow running on docker (https://github.com/puckel/docker-airflow)
   - exec into container with airflow
   - run command `airflow trigger_dag <dag_id> -sd .` with plausible values
   
   
   **Anything else we need to know**:
   
   - Happens every time, never had it work successfully. 
   - I can trigger from the UI.
   - All Dags are affected.
   

----------------------------------------------------------------
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

Reply via email to