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 2019/09/25 16:01:06 UTC

[GitHub] [airflow] XD-DENG commented on a change in pull request #6178: [AIRFLOW-5546] Fix DataprocClusterCreateOperator

XD-DENG commented on a change in pull request #6178: [AIRFLOW-5546] Fix DataprocClusterCreateOperator
URL: https://github.com/apache/airflow/pull/6178#discussion_r328208312
 
 

 ##########
 File path: airflow/gcp/operators/dataproc.py
 ##########
 @@ -485,7 +485,20 @@ def _usable_existing_cluster_present(self, service):
 
             if existing_status == 'RUNNING':
                 self.log.info('Cluster exists and is already running. Using it.')
-                return True
+                return existing_cluster
 
 Review comment:
   I have never looked into this operator previously, but one point that I would like to point out:
   Earlier this method is return `True`/`False`, and after your change it will return mixed things (`False`/result from DataProcHook.find_cluster(), which can be an actual value or `None`). I do not find this a good practice.

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


With regards,
Apache Git Services