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 2021/11/08 23:45:32 UTC

[GitHub] [airflow] dstandish commented on a change in pull request #19484: KubernetesExecutor should default to template image if used

dstandish commented on a change in pull request #19484:
URL: https://github.com/apache/airflow/pull/19484#discussion_r745178143



##########
File path: airflow/kubernetes/kube_config.py
##########
@@ -45,7 +45,10 @@ def __init__(self):
 
         self.worker_container_repository = conf.get(self.kubernetes_section, 'worker_container_repository')
         self.worker_container_tag = conf.get(self.kubernetes_section, 'worker_container_tag')
-        self.kube_image = f'{self.worker_container_repository}:{self.worker_container_tag}'
+        if self.worker_container_repository and self.worker_container_tag:

Review comment:
       we could probably loosen this to allow user to specify image only (and not tag) but this is the current behavior.  currently if either is not specified it won't work unless specified in executor_config

##########
File path: tests/kubernetes/test_pod_generator.py
##########
@@ -38,8 +38,8 @@
 from airflow.kubernetes.secret import Secret
 
 
-class TestPodGenerator(unittest.TestCase):
-    def setUp(self):

Review comment:
       converting to pytest is required when combining pytest params and unittest.mock




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