[ https://issues.apache.org/jira/browse/AIRFLOW-1934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ash Berlin-Taylor resolved AIRFLOW-1934. ---------------------------------------- Resolution: Duplicate > Unable to Launch Example DAG if ~/AIRFLOW_HOME/dags folder is empty > ------------------------------------------------------------------- > > Key: AIRFLOW-1934 > URL: https://issues.apache.org/jira/browse/AIRFLOW-1934 > Project: Apache Airflow > Issue Type: Bug > Components: DAG > Affects Versions: 1.8.0 > Environment: RHEL > Reporter: raman > Priority: Major > > 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 example 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 jobs.py seems to be doing the trick but this code is > only triggered if there is a dag inside ~/{airflow_home}/dags folder > File: jobs.py > Function: _find_executable_task_instances > ti_query = ( > session > .query(TI) > .filter(TI.dag_id.in_(simple_dag_bag.dag_ids)) > .outerjoin(DR, > and_(DR.dag_id == TI.dag_id, > DR.execution_date == TI.execution_date)) > .filter(or_(DR.run_id == None, > not_(DR.run_id.like(BackfillJob.ID_PREFIX + '%')))) > .outerjoin(DM, DM.dag_id==TI.dag_id) > .filter(or_(DM.dag_id == None, > not_(DM.is_paused))) > ) > -- This message was sent by Atlassian JIRA (v7.6.3#76005)