You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/21 21:58:00 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #17759: Show all import_errors from zip files

uranusjr commented on a change in pull request #17759:
URL: https://github.com/apache/airflow/pull/17759#discussion_r693405991



##########
File path: airflow/dag_processing/processor.py
##########
@@ -513,7 +513,12 @@ def update_import_errors(session: Session, dagbag: DagBag) -> None:
         """
         # Clear the errors of the processed files
         for dagbag_file in dagbag.file_last_changed:
-            session.query(errors.ImportError).filter(errors.ImportError.filename == dagbag_file).delete()
+            if dagbag_file.endswith(".zip"):

Review comment:
       IIRC the DAG parsing code (`correct_if_zipped`?) uses `zipfile.is_zipfile` and accepts zip files without the `.zip` suffix, so this probably should do the same.
   
   Actually, I wonder if it’s worthwhile to separate the file’s display (which includes the part inside a zip) and the actual path to avoid this check altogether.




-- 
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-unsubscribe@airflow.apache.org

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