siso: fix siso proxy for two phase caching Bug: b/506882659 Change-Id: I0da92c0ca5cd3b64d91315fbb4af6068bd973ae4 Reviewed-on: https://chromium-review.googlesource.com/c/build/+/8068359 Reviewed-by: Philipp Wollermann <philwo@google.com> Commit-Queue: Fumitoshi Ukai <ukai@google.com> Auto-Submit: Fumitoshi Ukai <ukai@google.com>
diff --git a/siso/reapi/proxy.go b/siso/reapi/proxy.go index 326f861..ce4c543 100644 --- a/siso/reapi/proxy.go +++ b/siso/reapi/proxy.go
@@ -151,6 +151,14 @@ return ap.client.UpdateActionResult(ctx, req) } +func (ap *actionCacheProxy) AddActionLookup(ctx context.Context, req *rpb.AddActionLookupRequest) (*rpb.AddActionLookupResponse, error) { + return ap.client.AddActionLookup(ctx, req) +} + +func (ap *actionCacheProxy) ListActions(ctx context.Context, req *rpb.ListActionsRequest) (*rpb.ListActionsResponse, error) { + return ap.client.ListActions(ctx, req) +} + type contentAddressableStorageProxy struct { rpb.UnimplementedContentAddressableStorageServer client rpb.ContentAddressableStorageClient @@ -204,6 +212,27 @@ return cp.client.BatchReadBlobs(ctx, req) } +func (cp *contentAddressableStorageProxy) GetTree(req *rpb.GetTreeRequest, serv rpb.ContentAddressableStorage_GetTreeServer) error { + gtc, err := cp.client.GetTree(serv.Context(), req) + if err != nil { + return err + } + for { + resp, err := gtc.Recv() + if err != nil { + return err + } + err = serv.Send(resp) + if err != nil { + return err + } + if resp.GetNextPageToken() != "" { + continue + } + return nil + } +} + type executionProxy struct { rpb.UnimplementedExecutionServer client rpb.ExecutionClient