googleapis / googleapis/google-cloud-java

CloudRun - Support listing jobs with a label

未关闭
#10,721 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
priority: p2 type: feature request
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
139

描述

**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"`.

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
google-cloud, java
领域
api, cloud
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。