SamWheating commented on code in PR #70586:
URL: https://github.com/apache/airflow/pull/70586#discussion_r3690268042


##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -445,6 +445,20 @@ def cleanup_stale_bundle_versions(self) -> None:
         """Clean up stale DAG bundle version usage records."""
         BundleUsageTrackingManager().remove_stale_bundle_versions()
 
+    @staticmethod
+    def _file_name_from_fileloc(fileloc: str) -> str:
+        """
+        If a python file comes from a zip module, return just the path to the 
zip file.
+
+        file parsing stats are keyed by the top-level filename 
(path/to/archive.zip).
+        in order to correctly link DAGs to their relevant parsing stats, we 
need to normalize
+        fileloc to the archive file location, if applicable.
+        """
+        if ".zip" in fileloc:

Review Comment:
   Oh this is a really good suggestion - will update!
   
   Just thinking about whether or not this will introduce other weird edge 
cases and collisions between archives etc. I think its fine as long as users 
aren't creating zip-files ending in `.py` or anything super weird like that. 



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