summaryrefslogtreecommitdiff
path: root/remoteexec/remoteexec.go
diff options
context:
space:
mode:
author Anas Sulaiman <mrahs@google.com> 2023-11-21 23:00:07 +0000
committer Anas Sulaiman <mrahs@google.com> 2023-11-29 00:42:08 +0000
commit9d7a36d17f35ebf45679a6434a2143fd3d1a24ba (patch)
tree33aba54feccca36f83ea327e4501326a43ccf805 /remoteexec/remoteexec.go
parent4ce715f591baac161b74be1ded4bea9253ebe497 (diff)
allow specifying remote caching opt for rewrapper
This is needed to enable local execution via reproxy for metalava actions for developer builds without causing permissions errors and without disabling it for other actions. Bug: b/308154125 Tested: ran a local build and verified all metalava actions were executed locally without attempting to write to the remote cache. Change-Id: Ia6f616e1ff5d0c71597ebf688765925ac81d19c3
Diffstat (limited to 'remoteexec/remoteexec.go')
-rw-r--r--remoteexec/remoteexec.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/remoteexec/remoteexec.go b/remoteexec/remoteexec.go
index 1e181fb17..8294c3fa3 100644
--- a/remoteexec/remoteexec.go
+++ b/remoteexec/remoteexec.go
@@ -91,6 +91,8 @@ type REParams struct {
NumLocalRuns int
// Number of times the action should be rerun remotely.
NumRemoteRuns int
+ // Boolean indicating whether to update remote cache entry. Rewrapper defaults to true, so the name is negated here.
+ NoRemoteUpdateCache bool
}
func init() {
@@ -146,6 +148,10 @@ func (r *REParams) wrapperArgs() string {
args += fmt.Sprintf(" --compare=true --num_local_reruns=%d --num_remote_reruns=%d", r.NumLocalRuns, r.NumRemoteRuns)
}
+ if r.NoRemoteUpdateCache {
+ args += " --remote_update_cache=false"
+ }
+
if len(r.Inputs) > 0 {
args += " --inputs=" + strings.Join(r.Inputs, ",")
}