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
diff --git a/remoteexec/remoteexec.go b/remoteexec/remoteexec.go
index 1e181fb..8294c3f 100644
--- a/remoteexec/remoteexec.go
+++ b/remoteexec/remoteexec.go
@@ -91,6 +91,8 @@
 	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 @@
 		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, ",")
 	}