You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/14 07:20:50 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #22976: Make sure jobs triggered by airflow web are not identified as orphaned.

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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org