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/08/18 21:46:52 UTC

[GitHub] [airflow] ashb commented on a change in pull request #17700: Add error check for config_file parameter in GKEStartPodOperator

ashb commented on a change in pull request #17700:
URL: https://github.com/apache/airflow/pull/17700#discussion_r691626819



##########
File path: airflow/providers/google/cloud/operators/kubernetes_engine.py
##########
@@ -303,6 +303,12 @@ def execute(self, context) -> Optional[str]:
                 "keyword project_id parameter or as project_id extra "
                 "in Google Cloud connection definition. Both are not set!"
             )
+        # There is no need to manage the kube_config file, as it will be generated automatically.
+        # All Kubernetes parameters (except config_file) are also valid for the GKEStartPodOperator.
+        if self.config_file:
+            raise AirflowException(
+                "config_file is not an allowed parameter for the GKEStartPodOperator."
+            )

Review comment:
       Could you move this to in `__init__` please? -- that way it would show up as a "DAG parse" error, rather than making the task fail at run time.




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