uranusjr commented on code in PR #68008:
URL: https://github.com/apache/airflow/pull/68008#discussion_r3489457163


##########
airflow-core/tests/unit/jobs/test_scheduler_job.py:
##########
@@ -8308,6 +8308,38 @@ def 
test_scheduler_passes_context_from_server_on_heartbeat_timeout(self, dag_mak
         assert callback_request.context_from_server.dag_run.logical_date == 
dag_run.logical_date
         assert callback_request.context_from_server.max_tries == ti.max_tries
 
+    def test_heartbeat_timeout_converges_ti_state_before_next_scan(self, 
dag_maker, session):
+        """A heartbeat-timed-out TI should not be found again on the next 
scheduler scan."""
+        with dag_maker(dag_id="test_heartbeat_timeout_dedupe", 
session=session):
+            EmptyOperator(task_id="test_task", on_failure_callback=lambda 
context: None)

Review Comment:
   This defaults to `retries=0` so the ti never enters `up_to_retry`, which 
differs from the expectation in #31212. The original scenario should be ensured 
to work.



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

Reply via email to