airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "raman (JIRA)" <>
Subject [jira] [Created] (AIRFLOW-1934) Unable to Launch Example DAG if ~/AIRFLOW_HOME/dags folder is empty
Date Sun, 17 Dec 2017 07:59:00 GMT
raman created AIRFLOW-1934:

             Summary: Unable to Launch Example DAG if ~/AIRFLOW_HOME/dags folder is empty
                 Key: AIRFLOW-1934
             Project: Apache Airflow
          Issue Type: Bug
          Components: DAG
    Affects Versions: Airflow 1.8
         Environment: RHEL
            Reporter: raman

Steps to reproduce
1. Install airflow
2. Keep the ~/{airflow_home}/dags folder empty
3. airflow initdb
4. airflow webserver and scheduler
2. Enable a DAG and trigger it manually from web UI.

Result: DAG run gets created in the dag_run table. task_instance table also get relevant enteries
but scheduler does not pick the DAG.

Workaround: Create one sample dag in the ~/{airflow_home}/dags folder and scheduler picks
it up.
The following code in seems to be doing the trick but this code is only triggered
if there is a dag inside ~/{airflow_home}/dags folder
Function: _find_executable_task_instances
ti_query = (
               and_(DR.dag_id == TI.dag_id,
                    DR.execution_date == TI.execution_date))
           .filter(or_(DR.run_id == None,
                   not_( + '%'))))
           .outerjoin(DM, DM.dag_id==TI.dag_id)
           .filter(or_(DM.dag_id == None,


This message was sent by Atlassian JIRA

View raw message