jedcunningham commented on code in PR #29147: URL: https://github.com/apache/airflow/pull/29147#discussion_r1086193863
########## airflow/executors/kubernetes_executor.py: ########## @@ -353,12 +353,12 @@ def run_next(self, next_job: KubernetesJobType) -> None: self.run_pod_async(pod, **self.kube_config.kube_client_request_args) self.log.debug("Kubernetes Job created!") - def delete_pod(self, pod_id: str, namespace: str) -> None: - """Deletes POD.""" + def delete_pod(self, pod_name: str, namespace: str) -> None: Review Comment: I guess arguably this is part of the public api? ########## airflow/executors/kubernetes_executor.py: ########## @@ -792,28 +793,31 @@ def try_adopt_task_instances(self, tis: Sequence[TaskInstance]) -> Sequence[Task } pod_list = self._list_pods(query_kwargs) for pod in pod_list: - self.adopt_launched_task(kube_client, pod, pod_ids) + self.adopt_launched_task(kube_client, pod, tis_to_flush_by_key) self._adopt_completed_pods(kube_client) - tis_to_flush.extend(pod_ids.values()) + tis_to_flush.extend(tis_to_flush_by_key.values()) return tis_to_flush def adopt_launched_task( - self, kube_client: client.CoreV1Api, pod: k8s.V1Pod, pod_ids: dict[TaskInstanceKey, k8s.V1Pod] + self, + kube_client: client.CoreV1Api, + pod: k8s.V1Pod, + tis_to_flush_by_key: dict[TaskInstanceKey, k8s.V1Pod], Review Comment: Maybe this one too? Ugh, this is the worst offended, because these are really TI keys. ########## airflow/executors/kubernetes_executor.py: ########## @@ -368,17 +368,17 @@ def delete_pod(self, pod_id: str, namespace: str) -> None: if e.status != 404: raise - def patch_pod_executor_done(self, *, pod_id: str, namespace: str): + def patch_pod_executor_done(self, *, pod_name: str, namespace: str): Review Comment: This one isn't in a release yet, so it's fair game. -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org