Skip to content

Commit

Permalink
Set cached_result=true when there is a cache hit in the execution ser… (
Browse files Browse the repository at this point in the history
#7967)

…vice

Without this, these cache hits look like executions to bazel. I don't
think it matters to functionality, but it does underreport the cache hit
ratio.
  • Loading branch information
vanja-p authored Nov 26, 2024
1 parent 59d8351 commit b67be1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enterprise/server/remote_execution/operation/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ func PublishOperationDone(stream StreamLike, taskID string, adInstanceDigest *di
// ExecuteResponseWithCachedResult returns an ExecuteResponse for an action
// result served from cache.
func ExecuteResponseWithCachedResult(ar *repb.ActionResult) *repb.ExecuteResponse {
return ExecuteResponseWithResult(ar, nil /*=err*/)
r := ExecuteResponseWithResult(ar, nil /*=err*/)
r.CachedResult = true
return r
}

// ExecuteResponseWithResult returns an ExecuteResponse for an action result
Expand Down

0 comments on commit b67be1a

Please sign in to comment.