dstandish commented on code in PR #34619:
URL: https://github.com/apache/airflow/pull/34619#discussion_r1338082638
##########
airflow/models/dag.py:
##########
@@ -3957,7 +3979,16 @@ def get_current_dag(cls) -> DAG | None:
return None
-def _run_task(ti: TaskInstance, session):
+def _triggerer_is_healthy():
+ from airflow.api.common.airflow_health import get_airflow_health
Review Comment:
> Just to make sure. we do have a plan to integrate triggerer functionality
into test directly right? Because this would only be good as a temporary
measure; if we want to keep this function long term I’d want some refactoring
instead of importing api from models
Plan might be overstating it. It's an idea. But, there's no guarantee it
happens. I'm simply being pragmatic, doing the easy thing to make user's life
nicer, by failing when otherwise they might just wait forever.
> But in either case this really should call
TriggererJobRunner.most_recent_job() directly instead of going through the
additional abstraction in api.
Yeah that sounds good. I wasn't sure exactly what was best.
##########
airflow/models/dag.py:
##########
@@ -3957,7 +3979,16 @@ def get_current_dag(cls) -> DAG | None:
return None
-def _run_task(ti: TaskInstance, session):
+def _triggerer_is_healthy():
+ from airflow.api.common.airflow_health import get_airflow_health
Review Comment:
> Just to make sure. we do have a plan to integrate triggerer functionality
into test directly right? Because this would only be good as a temporary
measure; if we want to keep this function long term I’d want some refactoring
instead of importing api from models
Plan might be overstating it. It's an idea. But, there's no guarantee it
happens. I'm simply being pragmatic, doing the easy thing to make user's life
nicer, by failing when otherwise they might just wait forever.
> But in either case this really should call
TriggererJobRunner.most_recent_job() directly instead of going through the
additional abstraction in api.
Yeah that sounds good. I wasn't sure exactly what was best.
--
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]