From 115eea56f7b28c1437dffc1dc8e70da975a034a5 Mon Sep 17 00:00:00 2001 From: Ramy Medhat Date: Mon, 13 May 2024 10:40:24 -0400 Subject: [PATCH] Followup: decouple SkipCache and DoNotCache in rexec package. --- go/pkg/rexec/rexec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/pkg/rexec/rexec.go b/go/pkg/rexec/rexec.go index 18ecf6dcf..2fdb80c45 100644 --- a/go/pkg/rexec/rexec.go +++ b/go/pkg/rexec/rexec.go @@ -272,7 +272,7 @@ func (ec *Context) GetCachedResult() { ec.Result = command.NewLocalErrorResult(err) return } - if ec.opt.AcceptCached && !ec.opt.DoNotCache { + if ec.opt.AcceptCached { ec.Metadata.EventTimes[command.EventCheckActionCache] = &command.TimeInterval{From: time.Now()} resPb, err := ec.client.GrpcClient.CheckActionCache(ec.ctx, ec.Metadata.ActionDigest.ToProto()) ec.Metadata.EventTimes[command.EventCheckActionCache].To = time.Now() @@ -393,7 +393,7 @@ func (ec *Context) ExecuteRemotely() { var nOutStreamed, nErrStreamed int64 op, err := ec.client.GrpcClient.ExecuteAndWaitProgress(ec.ctx, &repb.ExecuteRequest{ InstanceName: ec.client.GrpcClient.InstanceName, - SkipCacheLookup: !ec.opt.AcceptCached || ec.opt.DoNotCache, + SkipCacheLookup: !ec.opt.AcceptCached, ActionDigest: ec.Metadata.ActionDigest.ToProto(), }, func(md *repb.ExecuteOperationMetadata) { if !ec.opt.StreamOutErr {