Skip to content

Commit 723d57a

Browse files
Define ListOrganizationPrebuilds (#19316)
* Define `ListOrganizationPrebuilds` * Fix because of name changes * Add unimplemented `listOrganizationPrebuilds` * Crazy stuff right here * Address huiwen's comments * Fix more types * sad™ * Add configuration id and search term filtering
1 parent cd5a7bd commit 723d57a

File tree

10 files changed

+675
-141
lines changed

10 files changed

+675
-141
lines changed

components/dashboard/src/service/json-rpc-prebuild-client.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import {
1818
WatchPrebuildResponse,
1919
CancelPrebuildRequest,
2020
CancelPrebuildResponse,
21+
ListOrganizationPrebuildsRequest,
22+
ListOrganizationPrebuildsResponse,
2123
} from "@gitpod/public-api/lib/gitpod/v1/prebuild_pb";
2224
import { getGitpodService } from "./service";
2325
import { converter } from "./public-api";
@@ -142,4 +144,10 @@ export class JsonRpcPrebuildClient implements PromiseClient<typeof PrebuildServi
142144
}
143145
}
144146
}
147+
148+
async listOrganizationPrebuilds(
149+
request: PartialMessage<ListOrganizationPrebuildsRequest>,
150+
): Promise<ListOrganizationPrebuildsResponse> {
151+
return new ListOrganizationPrebuildsResponse({});
152+
}
145153
}

components/public-api/gitpod/v1/prebuild.proto

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ service PrebuildService {
1515
rpc GetPrebuild(GetPrebuildRequest) returns (GetPrebuildResponse) {}
1616
rpc ListPrebuilds(ListPrebuildsRequest) returns (ListPrebuildsResponse) {}
1717
rpc WatchPrebuild(WatchPrebuildRequest) returns (stream WatchPrebuildResponse) {}
18+
19+
// ListOrganizationPrebuilds lists all prebuilds of an organization
20+
rpc ListOrganizationPrebuilds(ListOrganizationPrebuildsRequest) returns (ListOrganizationPrebuildsResponse) {}
1821
}
1922

2023
message GetPrebuildRequest {
@@ -26,7 +29,8 @@ message GetPrebuildResponse {
2629

2730
message ListPrebuildsRequest {
2831
PaginationRequest pagination = 1;
29-
// it is for backward compatiblity with the current dashboard, use prebuild_id instead
32+
// it is for backward compatiblity with the current dashboard, use prebuild_id
33+
// instead
3034
string workspace_id = 2 [deprecated = true];
3135
string configuration_id = 3;
3236
string git_ref = 4;
@@ -60,6 +64,24 @@ message WatchPrebuildResponse {
6064
Prebuild prebuild = 1;
6165
}
6266

67+
message ListOrganizationPrebuildsRequest {
68+
message Filter {
69+
PrebuildPhase.Phase status = 1;
70+
string configuration_id = 2;
71+
// Filter the search down by searching for configuration names matching the
72+
// query
73+
string search_term = 3;
74+
}
75+
PaginationRequest pagination = 1;
76+
string organization_id = 2;
77+
Filter filter = 3;
78+
}
79+
80+
message ListOrganizationPrebuildsResponse {
81+
PaginationResponse pagination = 1;
82+
repeated Prebuild prebuilds = 2;
83+
}
84+
6385
message Prebuild {
6486
string id = 1;
6587
// it is for backward compatiblity with the current dashboard, use id instead

0 commit comments

Comments
 (0)