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 2020/10/13 23:57:30 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #11516: Improve TestPodTemplateFileRule rule

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



##########
File path: airflow/upgrade/rules/pod_template_file_rule.py
##########
@@ -31,9 +32,15 @@ class PodTemplateFileRule(BaseRule):
 """
 
     def check(self):
+        executor = conf.get('core', 'EXECUTOR')
+        if executor != Executors.KubernetesExecutor:
+            return
+
         pod_template_file = conf.get("kubernetes", "pod_template_file", fallback=None)
-        if not pod_template_file:
-            return (
-                "Please create a pod_template_file by running `airflow generate_pod_template`.\n"
-                "This will generate a pod using your aiflow.cfg settings"
-            )
+        if pod_template_file:
+            return
+
+        return (
+            "Please create a pod_template_file by running `airflow generate_pod_template`.\n"
+            "This will generate a pod using your aiflow.cfg settings"

Review comment:
       ```suggestion
               "Please create a pod_template_file by running `airflow generate_pod_template`.\n"
               "This will generate a pod using your airflow.cfg settings"
   ```




----------------------------------------------------------------
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:
users@infra.apache.org