This is an automated email from the ASF dual-hosted git repository.

uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 73d4cd63166 Remove unused TIDep.get_failure_reasons() (#57725)
73d4cd63166 is described below

commit 73d4cd63166e88c1f446f8f6c8507265cd63c1bf
Author: Tzu-ping Chung <[email protected]>
AuthorDate: Tue Nov 4 15:18:39 2025 +0800

    Remove unused TIDep.get_failure_reasons() (#57725)
---
 .../src/airflow/ti_deps/deps/base_ti_dep.py        | 24 ++++------------------
 1 file changed, 4 insertions(+), 20 deletions(-)

diff --git a/airflow-core/src/airflow/ti_deps/deps/base_ti_dep.py 
b/airflow-core/src/airflow/ti_deps/deps/base_ti_dep.py
index 4d54783b020..3f201315f0c 100644
--- a/airflow-core/src/airflow/ti_deps/deps/base_ti_dep.py
+++ b/airflow-core/src/airflow/ti_deps/deps/base_ti_dep.py
@@ -120,33 +120,17 @@ class BaseTIDep:
         """
         Return whether a dependency is met for a given task instance.
 
-        A dependency is considered met if all the dependency statuses it 
reports are passing.
+        A dependency is considered met if all the dependency statuses it 
reports
+        are passing. This is only used in tests.
 
         :param ti: the task instance to see if this dependency is met for
         :param session: database session
         :param dep_context: The context this dependency is being checked under 
that stores
             state that can be used by this dependency.
-        """
-        return all(status.passed for status in self.get_dep_statuses(ti, 
session, dep_context))
-
-    @provide_session
-    def get_failure_reasons(
-        self,
-        ti: TaskInstance,
-        session: Session,
-        dep_context: DepContext | None = None,
-    ) -> Iterator[str]:
-        """
-        Return an iterable of strings that explain why this dependency wasn't 
met.
 
-        :param ti: the task instance to see if this dependency is met for
-        :param session: database session
-        :param dep_context: The context this dependency is being checked under 
that stores
-            state that can be used by this dependency.
+        :meta private:
         """
-        for dep_status in self.get_dep_statuses(ti, session, dep_context):
-            if not dep_status.passed:
-                yield dep_status.reason
+        return all(status.passed for status in self.get_dep_statuses(ti, 
session, dep_context))
 
     def _failing_status(self, reason: str = "") -> TIDepStatus:
         return TIDepStatus(self.name, False, reason)

Reply via email to