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/09/14 19:13:04 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #18243: Fix deleting of zipped Dags in Serialized Dag Table

ephraimbuddy commented on a change in pull request #18243:
URL: https://github.com/apache/airflow/pull/18243#discussion_r708558352



##########
File path: airflow/models/dag.py
##########
@@ -2814,10 +2815,24 @@ def deactivate_deleted_dags(cls, alive_dag_filelocs: List[str], session=None):
         """
         log.debug("Deactivating DAGs (for which DAG files are deleted) from %s table ", cls.__tablename__)
 
+        dag_filelocs = []
+        for fileloc in alive_dag_filelocs:
+            if zipfile.is_zipfile(fileloc):
+                with zipfile.ZipFile(fileloc) as z:
+                    dag_filelocs.extend(

Review comment:
       Mistake adding it here, it's the `DagCode.remove_deleted_dags` that needed it too. Will move the logic to `_refresh_dag_dir`. Thanks




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