Skip to content

Commit 17ad1fa

Browse files
dmitshurgopherbot
authored andcommitted
all: switch to newer, preferred API for BuildBucket API clients
The PRPCClient variant is generated by a custom plugin and predates the raw Client variant, which is preferred in newer code. Switch to it before doing more to understand the previously-mentioned strange intermittent issue of queries sometimes taking an extra 24 hours to successfully complete. For golang/go#65913. Change-Id: Ibb8495a939bb80f445261cddda9d900c82ec7e62 Reviewed-on: https://go-review.googlesource.com/c/build/+/574556 Reviewed-by: Michael Knyszek <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 8c9726c commit 17ad1fa

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

cmd/coordinator/coordinator.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,11 @@ func main() {
380380
log.Fatalln("luci/auth.NewAuthenticator:", err)
381381
}
382382
}
383-
buildersCl := buildbucketpb.NewBuildersPRPCClient(&prpc.Client{
383+
buildersCl := buildbucketpb.NewBuildersClient(&prpc.Client{
384384
C: luciHTTPClient,
385385
Host: "cr-buildbucket.appspot.com",
386386
})
387-
buildsCl := buildbucketpb.NewBuildsPRPCClient(&prpc.Client{
387+
buildsCl := buildbucketpb.NewBuildsClient(&prpc.Client{
388388
C: luciHTTPClient,
389389
Host: "cr-buildbucket.appspot.com",
390390
})

cmd/relui/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ func main() {
181181
if err != nil {
182182
log.Fatal(err)
183183
}
184-
buildsClient := pb.NewBuildsPRPCClient(&prpc.Client{
184+
buildsClient := pb.NewBuildsClient(&prpc.Client{
185185
C: luciHTTPClient,
186186
Host: "cr-buildbucket.appspot.com",
187187
})
188-
buildersClient := pb.NewBuildersPRPCClient(&prpc.Client{
188+
buildersClient := pb.NewBuildersClient(&prpc.Client{
189189
C: luciHTTPClient,
190190
Host: "cr-buildbucket.appspot.com",
191191
})

cmd/watchflakes/luci.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ func NewLUCIClient() *LUCIClient {
4747
if err != nil {
4848
log.Fatal(err)
4949
}
50-
buildsClient := bbpb.NewBuildsPRPCClient(&prpc.Client{
50+
buildsClient := bbpb.NewBuildsClient(&prpc.Client{
5151
C: c,
5252
Host: crBuildBucketHost,
5353
})
54-
buildersClient := bbpb.NewBuildersPRPCClient(&prpc.Client{
54+
buildersClient := bbpb.NewBuildersClient(&prpc.Client{
5555
C: c,
5656
Host: crBuildBucketHost,
5757
})
58-
resultDBClient := rdbpb.NewResultDBPRPCClient(&prpc.Client{
58+
resultDBClient := rdbpb.NewResultDBClient(&prpc.Client{
5959
C: c,
6060
Host: resultDBHost,
6161
})

internal/relui/workflows_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func TestReadRelevantBuildersLive(t *testing.T) {
198198
if err != nil {
199199
t.Fatal("auth.NewAuthenticator:", err)
200200
}
201-
buildersClient := buildbucketpb.NewBuildersPRPCClient(&prpc.Client{
201+
buildersClient := buildbucketpb.NewBuildersClient(&prpc.Client{
202202
C: luciHTTPClient,
203203
Host: "cr-buildbucket.appspot.com",
204204
})

internal/task/tagx_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ func TestFindMissingBuildersLive(t *testing.T) {
155155
if err != nil {
156156
t.Fatal("auth.NewAuthenticator:", err)
157157
}
158-
buildsClient := buildbucketpb.NewBuildsPRPCClient(&prpc.Client{
158+
buildsClient := buildbucketpb.NewBuildsClient(&prpc.Client{
159159
C: luciHTTPClient,
160160
Host: "cr-buildbucket.appspot.com",
161161
})
162-
buildersClient := buildbucketpb.NewBuildersPRPCClient(&prpc.Client{
162+
buildersClient := buildbucketpb.NewBuildersClient(&prpc.Client{
163163
C: luciHTTPClient,
164164
Host: "cr-buildbucket.appspot.com",
165165
})

0 commit comments

Comments
 (0)