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


##########
airflow/jobs/backfill_job.py:
##########
@@ -218,6 +218,13 @@ def _update_counters(self, ti_status, session=None):
                 ti_status.running.pop(reduced_key)
                 ti_status.to_run[ti.key] = ti
 
+            elif ti.state == TaskInstanceState.SCHEDULED:
+                # Deferrable task can go from DEFERRED to SCHEDULED,
+                # when that happens, we need to remove it from running
+                # and add it to to_run
+                ti_status.running.pop(ti.key)
+                ti_status.to_run[ti.key] = ti

Review Comment:
   It does not feel right to special case for Kubernetes here though 🤔



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