Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Airflow DAG task not found after updating adding a task

Tags:

airflow

I'm having trouble updating a dag file. Dag still have an old version of my dag file. I added a task but it seems not updated when I check the log and UI (DAG->Code).

I have very simple tasks. I of course checked the dag directory path in airflow.cfg and restarted airflow webserver/scheduler. I have no issue running it (but with the old dag file).

like image 482
user3368526 Avatar asked Jul 13 '17 09:07

user3368526


1 Answers

Looks like a bug of airflow. A temp solution is to delete the task instances from airflow db by

delete from task_instance where dag_id=<dag_name> and task_id=<deleted_task_name>';

This should be simpler and less impactful than the resetdb route which would delete everything including variables and connections set before.

like image 197
Lily Avatar answered Sep 29 '22 22:09

Lily