tirkarthi commented on PR #28256:
URL: https://github.com/apache/airflow/pull/28256#issuecomment-1399175298

   I am not sure if there is a reliable way to extract 
"/home/karthikeyan/airflow/dags/error_dag.zip" from 
"/home/karthikeyan/airflow/dags/error_dag.zip/error_dag.py" through zipfile 
module for migration of existing errors. If it's just clearing based on zip 
file then wouldn't this become a query like below just deleting all zip file 
related errors though the zip files haven't changed? It might become like a 
query like below that already exists in processor.py
   
   ```python
   query = session.query(errors.ImportError)
   if self._file_paths:
       for file_path in self._file_paths:
           query = 
query.filter(errors.ImportError.filename.startswith(file_path))
   query.delete(synchronize_session="fetch")
   session.commit() 
   ```
   
   
https://github.com/apache/airflow/blob/09b3a29972430e5749d772359692fe4a9d528e48/airflow/dag_processing/processor.py#L563-L566


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to