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/10/05 20:01:07 UTC

[GitHub] [airflow] XD-DENG commented on a diff in pull request #25882: Prevent `KubernetesPodOperator` from finding pods with the wrong name

XD-DENG commented on code in PR #25882:
URL: https://github.com/apache/airflow/pull/25882#discussion_r985508556


##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -370,11 +370,11 @@ def find_pod(
             label_selector=label_selector,
         ).items
 
-        pod = None
+        pod: Optional[k8s.V1Pod] = None
         num_pods = len(pod_list)
         if num_pods > 1:

Review Comment:
   Does it also mean: if more than one pod are found here, we can actually use the name to match & find the Pod we desire and then proceed, rather than raising an exception?



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