VladaZakharova commented on code in PR #69855:
URL: https://github.com/apache/airflow/pull/69855#discussion_r4026486807
##########
providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:
##########
@@ -2536,13 +2545,15 @@ def execute(self, context: Context):
region=self.region,
project_id=self.project_id,
batch=self.batch,
- batch_id=self.batch_id,
+ batch_id=requested_batch_id,
request_id=self.request_id,
retry=self.retry,
timeout=self.timeout,
metadata=self.metadata,
)
except AlreadyExists:
+ if not batch_id:
+ raise ValueError("Dataproc reported an existing batch without
a requested batch_id.")
Review Comment:
i am not sure i understand this error message. can you pleas explain?
##########
providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:
##########
@@ -2416,9 +2417,12 @@ class
DataprocCreateBatchOperator(GoogleCloudBaseOperator):
:param project_id: Optional. The ID of the Google Cloud project that the
cluster belongs to. (templated)
:param region: Required. The Cloud Dataproc region in which to handle the
request. (templated)
:param batch: Required. The batch to create. (templated)
- :param batch_id: Required. The ID to use for the batch, which will become
the final component
+ :param batch_id: Optional. The ID to use for the batch, which will become
the final component
Review Comment:
As i can see from it's definition batch_id was always an optional param,
right?
--
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]