mik-laj commented on a change in pull request #16860:
URL: https://github.com/apache/airflow/pull/16860#discussion_r665735699
##########
File path: airflow/models/dag.py
##########
@@ -734,15 +759,22 @@ def task_group(self) -> "TaskGroup":
@property
def filepath(self) -> str:
- """File location of where the dag object is instantiated"""
- fn = self.full_filepath.replace(settings.DAGS_FOLDER + '/', '')
- fn = fn.replace(os.path.dirname(__file__) + '/', '')
+ """:meta private:"""
+ warnings.warn(
+ "filepath is deprecated, use relative_fileloc instead",
DeprecationWarning, stacklevel=2
+ )
+ return self.relative_fileloc
+
+ @property
+ def relative_fileloc(self) -> str:
+ """File location of the importable dag 'file' relative to the
configured DAGs folder."""
Review comment:
How will this field behave for example DAGs?
--
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]