Support filter on labels for dataproc ListBatchesRequest
Determine this is the right repository
- [x] I determined this is the correct repository in which to report this feature request.
Summary of the feature request
Currently the python client does not support the filter on labels, only batch_id, batch_uuid, state, and create_time.
https://cloud.google.com/python/docs/reference/dataproc/latest/google.cloud.dataproc_v1.types.ListBatchesRequest
Meanwhile the api already supported filter on labels:
https://cloud.google.com/dataproc-serverless/docs/reference/rpc/google.cloud.dataproc.v1
Current behaviour:
Filter on labels does not throw an error like when using unsupported field, but it returns empty result instead.
Desired code experience
request = dataproc_v1.ListBatchesRequest(
parent=parent,
filter=f"labels.goog-dataproc-location = 'us-east4'",
order_by="create_time desc"
)
Expected results
Filter on labels should return the items that matched with the filter on labels.
Use case
This feature would be useful in a scenario where I need to filter on labels of the dataproc batch job.
Hello @vhnguyenae,
Please could you try out a similar request in the Try this method interface on this page and check whether the issue still exists? This helps to confirm if this is a client library issue or a API issue. If this is an issue with the API itself, we'll redirect you to the API specific issue tracking page so you can file a bug and obtain better quality answers. For the Dataproc API , the public issue tracker is located at https://issuetracker.google.com/issues/new?component=187133&template=0.
Hello @parthea , thanks for the feedback. I tried the API with the same labels filter and I can get a non empty list results. So I think the problem is from the client library 😁
Thank you, @vhnguyenae! We'll investigate and provide a fix.
Hi @parthea , I would like to know if you have any update on this? 😁