This repository was archived by the owner on Nov 29, 2023. It is now read-only.
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
Wrong protobuf type in ClusterControllerClient.diagnose_cluster #51
Closed
Description
Environment details
- OS type and version: MacOS 10.15.4
- Python version: 3.6.8
- pip version:
pip --version
google-cloud-dataproc
version: 1.0.0
Steps to reproduce
- Create cluster
- Initialize ClusterControllerClient
- run
diagnose_cluster
on the cluster - use
.result()
to wait for the operation to complete
Code example
client = ClusterControllerClient()
operation = client.diagnose_cluster(
project_id=project_id,
region=region,
cluster_name=cluster_name,
retry=retry,
timeout=timeout,
metadata=metadata,
)
operation.result()
Stack trace
File "~/airflow/airflow/providers/google/cloud/hooks/dataproc.py", line 387, in diagnose_cluster
operation.result()
File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/future/polling.py", line 125, in result
self._blocking_poll(timeout=timeout)
File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/future/polling.py", line 104, in _blocking_poll
retry_(self._done_or_raise)()
File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/retry.py", line 286, in retry_wrapped_func
on_error=on_error,
File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/retry.py", line 184, in retry_target
return target()
File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/future/polling.py", line 83, in _done_or_raise
if not self.done():
File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/operation.py", line 169, in done
self._refresh_and_update(retry)
File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/operation.py", line 158, in _refresh_and_update
self._set_result_from_operation()
File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/operation.py", line 131, in _set_result_from_operation
self._result_type, self._operation.response
File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/protobuf_helpers.py", line 71, in from_any_pb
any_pb.__class__.__name__, pb_type.__name__
TypeError: Could not convert Any to Empty
I tried to debug this code and use google.protobuf.any_pb2.Any
but then I get TypeError: Could not convert Any to Any
.