Airflow DAG task not found after updating adding a task

Viewed 16958

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

6 Answers

Use terminal and run the below command soon after changing the dag file.

airflow initdb

This worked for me.

In DAG page of Airflow webserver, delete the DAG. It will delete the record in the database. After a while the DAG will appear again in the page, but the old task_id is removed.

Related