sunank200 commented on code in PR #55292:
URL: https://github.com/apache/airflow/pull/55292#discussion_r2330960650
##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -1319,8 +1328,18 @@ def _run_task(*, ti, task, run_triggerer=False):
Bypasses a lot of extra steps used in `task.run` to keep our local running
as fast as
possible. This function is only meant for the `dag.test` function as a
helper function.
"""
+ from airflow.sdk import TaskInstanceState
from airflow.sdk.module_loading import import_string
- from airflow.utils.state import State
+
+ FINISHED_STATES = frozenset(
+ [
+ TaskInstanceState.SUCCESS,
+ TaskInstanceState.FAILED,
+ TaskInstanceState.SKIPPED,
+ TaskInstanceState.UPSTREAM_FAILED,
+ TaskInstanceState.REMOVED,
+ ]
+ )
Review Comment:
Yes defined it at the top now.
--
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]