ivica-k commented on issue #45227:
URL: https://github.com/apache/airflow/issues/45227#issuecomment-3210780789

   I've had partial success with using 
   
   ```
   $ airflow dags delete DAG_ID
   This will drop all existing records related to the specified DAG. Proceed? 
(y/n) y
   ```
   I used it to clear the import error for two DAGs. One error was never seen 
again, the other one stayed.
   
   Attempting to list all DAGs with import errors was not successful
   ```
   $ airflow dags list-import-errors
   No data found
   ```
   
   When listing all DAGs, the one that caused the dangling error was shown like 
this, and **`None`** was suspicious to me.
   
   ```
   $ airflow dags list
   dag_id    | fileloc                                  | owners    | is_paused
   
=====================================+==================================+=====
   MY_DAG_ID | /opt/airflow/dags/repo/dags/my_dag_id.py | airflow   | None 
   ```
   
   I have fully solved it by:
   - adding a dummy DAG with the same name and ID, and let the scheduler 
process it.
   - removing the dummy DAG (drop the commit and force-push)
   - running `airflow dags delete DAG_ID` which removed 1 record from the DB


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to