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


##########
airflow/executors/kubernetes_executor.py:
##########
@@ -696,8 +701,7 @@ def try_adopt_task_instances(self, tis: List[TaskInstance]) 
-> List[TaskInstance
             for pod in pod_list.items:
                 self.adopt_launched_task(kube_client, pod, pod_ids)
         self._adopt_completed_pods(kube_client)
-        tis_to_flush.extend(pod_ids.values())
-        return tis_to_flush
+        return list(pod_ids.values())

Review Comment:
   I took a look at the call sites of this, it seems that non of the actual 
usages strictly rely on this being a list; we should change the annotation to 
`Sequence[TaskInstance]` and return `pod_ids.values()` instead.
   
   This would need to change a bunch more files so it’s OK to do this in a 
separate PR.



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