googleapis / googleapis/google-cloud-java
CloudRun - Support listing jobs with a label
- Ngôn ngữ chính
- Java
- Star
- 2.1k
- Fork
- 1.2k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 157
Mô tả
**Describe the solution you'd like**
We would like to be able to list CloudRun job using a filter.
Something like the following code snippet (which didn't work yet as there is no `setFilter()` method).
```java
var jobsClient = JobsClient.create();
var existingJob = jobsClient.listJobs(ListJobsRequest.newBuilder()
.setParent(String.format("projects/%s/locations/%s", projectId, region))
.setFilter("labels.key=value")
.build();
```
**Describe alternatives you've considered**
The alternative is to list all jobs and filter later.
However, this didn't scale if there were a lot of jobs.
**Additional context**
It is already possible via gcloud: `gcloud run jobs list --filter "labels.key=value"`.
Hướng dẫn đóng góp
Hướng nghiên cứu
Start with the Java JobsClient.listJobs entry point and its ListJobsRequest builder, comparing the requested label-filter behavior with the gcloud run jobs list --filter command. Done means callers can list Cloud Run jobs using a label filter instead of fetching every job first, with the relevant client behavior covered by tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- google-cloud, java
- Lĩnh vực
- api, cloud
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100