hussein-awala commented on code in PR #31644:
URL: https://github.com/apache/airflow/pull/31644#discussion_r1265950630


##########
airflow/providers/google/cloud/operators/dataproc.py:
##########
@@ -220,6 +246,9 @@ def __init__(
         if self.single_node and self.num_preemptible_workers > 0:
             raise ValueError("Single node cannot have preemptible workers.")
 
+    def _set_preemptibility_type(self, preemptibility: str):
+        return PreemptibilityType(preemptibility.upper())
+

Review Comment:
   ```suggestion
   ```



##########
airflow/providers/google/cloud/operators/dataproc.py:
##########
@@ -177,6 +202,7 @@ def __init__(
         self.num_masters = num_masters
         self.num_workers = num_workers
         self.num_preemptible_workers = num_preemptible_workers
+        self.preemptibility = self._set_preemptibility_type(preemptibility)

Review Comment:
   ```suggestion
           self.preemptibility = PreemptibilityType(preemptibility.upper())
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to