dstandish commented on code in PR #26509:
URL: https://github.com/apache/airflow/pull/26509#discussion_r980261032


##########
airflow/models/dag.py:
##########
@@ -1189,11 +1195,25 @@ def relative_fileloc(self) -> pathlib.Path:
         """File location of the importable dag 'file' relative to the 
configured DAGs folder."""
         path = pathlib.Path(self.fileloc)
         try:
-            return path.relative_to(settings.DAGS_FOLDER)
+            rel_path = path.relative_to(self.dag_processor_dags_folder or 
settings.DAGS_FOLDER)
+            if rel_path == pathlib.Path('.'):
+                return path
+            else:
+                return rel_path
         except ValueError:
             # Not relative to DAGS_FOLDER.
             return path
 
+    @property
+    def dag_processor_dags_folder(self):

Review Comment:
   @potiuk 
   
   > I believe (please correct me if I misundderstood it @dstandish) that this 
PR here was very similar to what the 
https://github.com/apache/airflow/pull/16860 change for @ashb was. But while 
Ashb wanted to resurrect the relative approach working for the main DAGS 
folder, but this one was to bring it to the standalone DAG processor.
   
   Not quite.... the "change" here is not really a change, it's fixing the 
regression in 2.4 of that same exact feature.  It's not specific to dag 
processor.  This issue appears even just using scheduler with virtualenv and 
k8s exec --- no dags processor process required.  



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