ffinfo commented on a change in pull request #4396: [AIRFLOW-3585] - Add edges 
to database
URL: https://github.com/apache/airflow/pull/4396#discussion_r257417466
 
 

 ##########
 File path: airflow/models/__init__.py
 ##########
 @@ -4012,17 +4088,55 @@ def create_dagrun(self,
             conf=conf,
             state=state
         )
+
+        dag_model = DagModel.get_dagmodel(self.dag_id)
+
+        tis = self.create_tis(execution_date)
+        edges = self.create_edges(-1)
+
+        last_run = dag_model.get_last_dagrun(include_externally_triggered=True)
+        if last_run is None:
+            same = False
+        else:
+            last_edges = DagEdge.fetch_edges_db(self.dag_id, last_run.graph_id)
+
+            # Compare edges from last run
+            same = True
+            if len(last_edges) != len(edges):
 
 Review comment:
   ye this looks indeed more cleaner, fixed this

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

Reply via email to