jscheffl commented on code in PR #66650:
URL: https://github.com/apache/airflow/pull/66650#discussion_r3215015021


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/pod.py:
##########
@@ -508,6 +508,18 @@ def define_container_state(self, pod: V1Pod) -> 
ContainerState:
                 return ContainerState.TERMINATED if state_obj.exit_code == 0 
else ContainerState.FAILED
         return ContainerState.UNDEFINED
 
+    def define_pod_state(self, pod: V1Pod) -> ContainerState:

Review Comment:
   Can you please rename the fucntion? I was reading the code three times and 
then was checking what the actual bug was to understand what it means. So what 
you actually want to make is to check the Pod and Container state and correlate?
   And the resulting variable is then not the "cotnainer_state" but the 
combined (workload?) state.
   
   We should take a naming (and naming is usually hard) that the code makes 
understandable what is being done.



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