Fokko commented on a change in pull request #4322: [AIRFLOW-3518] Performance fixes for topological_sort URL: https://github.com/apache/incubator-airflow/pull/4322#discussion_r241836663
########## File path: airflow/models.py ########## @@ -2662,10 +2662,15 @@ def __init__( } def __eq__(self, other): - return ( - type(self) == type(other) and - all(self.__dict__.get(c, None) == other.__dict__.get(c, None) - for c in self._comps)) + if (type(self) == type(other) and + self.task_id == other.task_id): Review comment: So comparing the `task_id`s is just an optimization. If they differ, the attributes `task_id`, `dag_id`, `owner`, `email`, `email_on_retry`, `retry_delay`, `retry_exponential_backoff`, `max_retry_delay`, `start_date`, `schedule_interval`, `depends_on_past`, `wait_for_downstream`, `adhoc`, `priority_weight`, `sla`, `execution_timeout`, `on_failure_callback`, `on_success_callback` and `on_retry_callback` are compared to determine if the dags are really equal. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services