google-cloud-python
google-cloud-python copied to clipboard
When updating a Job with same config, ERROR: Could not convert Any to Job
Steps to reproduce
- Get an existing Job
- Update the job without any changes
Reproduction Code
$ python - << EOT
from google.cloud.run_v2 import *
jobs_client = JobsClient()
full_job_name= jobs_client.job_path('__my_project__', '__my_location__', '__job_name__')
get_job_request = GetJobRequest(name=full_job_name)
job_to_update = jobs_client.get_job(request=get_job_request)
update_job_request = UpdateJobRequest(job=job_to_update)
operation = jobs_client.update_job(request=update_job_request)
EOT
Traceback (most recent call last):
File "<string>", line 8, in <module>
File "/__redacted__/.venv/lib/python3.10/site-packages/google/cloud/run_v2/services/jobs/client.py", line 1069, in update_job
response = operation.from_gapic(
File "/__redacted__/.venv/lib/python3.10/site-packages/google/api_core/operation.py", line 365, in from_gapic
return Operation(operation, refresh, cancel, result_type, **kwargs)
File "/__redacted__/.venv/lib/python3.10/site-packages/google/api_core/operation.py", line 91, in __init__
self._set_result_from_operation()
File "/__redacted__/.venv/lib/python3.10/site-packages/google/api_core/operation.py", line 134, in _set_result_from_operation
response = protobuf_helpers.from_any_pb(
File "/__redacted__/.venv/lib/python3.10/site-packages/google/api_core/protobuf_helpers.py", line 65, in from_any_pb
raise TypeError(
TypeError: Could not convert Any to Job
Environment
$ python -V
Python 3.10.12
$ uname -a
Linux __readacted__ 6.2.0-1018-gcp #20~22.04.1-Ubuntu SMP Mon Oct 23 12:29:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$ pip freeze
cachetools==5.3.2
certifi==2023.7.22
charset-normalizer==3.3.2
google-api-core==2.13.0
google-auth==2.23.4
google-cloud-run==0.10.0
googleapis-common-protos==1.61.0
grpc-google-iam-v1==0.12.6
grpcio==1.59.2
grpcio-status==1.59.2
idna==3.4
proto-plus==1.22.3
protobuf==4.25.0
pyasn1==0.5.0
pyasn1-modules==0.3.0
requests==2.31.0
rsa==4.9
urllib3==2.0.7
@parthea I have the same issue with #11868. I created a new issue as your guidance, If you need more info, please feel free to tell me. Thanks,
I would like to know how to debug more deeper. I would be happy if you also gave an advice on it.
Same problem with me..
Thanks for filing this issue. We will be investigating this issue and updating you on a resolution.
We have not had a chance to make progress on this yet, but we still intend to get to the bottom of this issue.