kaxil commented on a change in pull request #15373:
URL: https://github.com/apache/airflow/pull/15373#discussion_r613481041



##########
File path: airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
##########
@@ -415,8 +415,11 @@ def _try_numbers_match(context, pod) -> bool:
         return pod.metadata.labels['try_number'] == context['ti'].try_number
 
     def _set_name(self, name):
-        if name is None:
+        if name is None and (self.pod_template_file or self.full_pod_spec):
             return None
+        if name is None:
+            raise AirflowException("`name` is required unless 
`pod_template_file` or `full_pod_spec` is set")

Review comment:
       (just a nit)




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

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


Reply via email to