ffinfo commented on a change in pull request #4396: [AIRFLOW-3585] - Add edges
to database
URL: https://github.com/apache/airflow/pull/4396#discussion_r257134031
##########
File path: airflow/models/__init__.py
##########
@@ -4050,8 +4164,14 @@ def sync_to_db(self, owner=None, sync_time=None,
session=None):
if not orm_dag:
orm_dag = DagModel(dag_id=self.dag_id)
self.log.info("Creating ORM DAG for %s", self.dag_id)
- orm_dag.fileloc = self.fileloc
- orm_dag.is_subdag = self.is_subdag
+ if self.is_subdag:
+ orm_dag.parent_dag = self.parent_dag.dag_id
+ orm_dag.is_subdag = True
+ elif self.fileloc is not None:
+ if self.fileloc.endswith(".pyc"):
Review comment:
It should not happen but I do see it happen sometimes
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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