ffinfo commented on a change in pull request #4880: [AIRFLOW-3735] Separate dag 
parsing from checking
URL: https://github.com/apache/airflow/pull/4880#discussion_r263991173
 
 

 ##########
 File path: airflow/models/__init__.py
 ##########
 @@ -359,6 +356,9 @@ def process_file(self, filepath, only_if_updated=True, 
safe_mode=True):
         if filepath is None or not os.path.isfile(filepath):
             return found_dags
 
+        if filepath.endswith(".pyc"):
+            filepath = filepath.rstrip("c")
 
 Review comment:
   I do agree but in testing I sometimes do see this happening. I think this is 
happening because there are some inline DAG's inside the tests that are only 
part of a method and not a separated file. This pyc file will when end up in 
DagModel.fileloc.
   
   I can try to raise an exception to make a list of tests where this is 
happening if you want?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to