You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/07/17 22:13:17 UTC
[GitHub] [airflow] hussein-awala commented on a diff in pull request #31644: Update Dataproc Operators to be able to use Spot Instances
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org