exploy commented on a change in pull request #4015: [AIRFLOW-2789] Create 
single node DataProc cluster
URL: https://github.com/apache/incubator-airflow/pull/4015#discussion_r224783788
 
 

 ##########
 File path: airflow/contrib/operators/dataproc_operator.py
 ##########
 @@ -205,10 +206,18 @@ def __init__(self,
         self.idle_delete_ttl = idle_delete_ttl
         self.auto_delete_time = auto_delete_time
         self.auto_delete_ttl = auto_delete_ttl
+        self.single_node = num_workers == 0
 
         assert not (self.custom_image and self.image_version), \
             "custom_image and image_version can't be both set"
 
+        assert (
 
 Review comment:
   I can imagine someone trying to setup cluster which consists only 
preemptible workers (`num_preemptible_workers`) and no regular workers 
(`num_workers`). 
   
   Generally, we could assert on `num_workers` and `num_preemptible_workers` 
and allow only cases: 
   - both values are zeros
   - `num_workers` >= 2
   
   WDYT?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to