SamWheating commented on a change in pull request #18197:
URL: https://github.com/apache/airflow/pull/18197#discussion_r711840591



##########
File path: airflow/providers/google/cloud/operators/dataproc.py
##########
@@ -663,6 +765,16 @@ def execute(self, context) -> dict:
         self.log.info('Creating cluster: %s', self.cluster_name)
         hook = DataprocHook(gcp_conn_id=self.gcp_conn_id, 
impersonation_chain=self.impersonation_chain)
         # Save data required to display extra link no matter what the cluster 
status will be
+
+        if isinstance(self.cluster_config, str):
+            if urlparse(self.cluster_config).scheme == "gs":
+                self.cluster_config = 
self._build_cluster_config(self.cluster_config)
+            else:
+                self.log.info(

Review comment:
       Is it worth raising an exception here? If the user provides a non-GCS 
string then the call to `create_cluster` then I think that the call to 
`create_cluster` is going to fail, right?
   
   In this case it might be preferable to raise here so that the DAG fails 
parsing rather than fails during execution.




-- 
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-unsubscr...@airflow.apache.org

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


Reply via email to