Skip to content

Commit

Permalink
Tell remote execution to not use remote cache internally (#17198)
Browse files Browse the repository at this point in the history
Closes #17142.

We rely on the RemoteCache command runner for caching with remote execution. We always disable remote servers from doing caching themselves not only to avoid wasted work, but more importantly because they do not have our same caching semantics, e.g. `ProcessCacheScope.SUCCESSFUL` vs `ProcessCacheScope.ALWAYS`.
  • Loading branch information
Eric-Arellano authored Oct 14, 2022
1 parent 39d4e8d commit 8a22a45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rust/engine/process_execution/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,11 @@ pub fn make_execute_request(
let execute_request = remexec::ExecuteRequest {
action_digest: Some((&digest(&action)?).into()),
instance_name: instance_name.unwrap_or_else(|| "".to_owned()),
// We rely on the RemoteCache command runner for caching with remote execution. We always
// disable remote servers from doing caching themselves not only to avoid wasted work, but
// more importantly because they do not have our same caching semantics, e.g.
// `ProcessCacheScope.SUCCESSFUL` vs `ProcessCacheScope.ALWAYS`.
skip_cache_lookup: true,
..remexec::ExecuteRequest::default()
};

Expand Down
7 changes: 7 additions & 0 deletions src/rust/engine/process_execution/src/remote_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ async fn make_execute_request() {
))
.into(),
),
skip_cache_lookup: true,
..Default::default()
};

Expand Down Expand Up @@ -225,6 +226,7 @@ async fn make_execute_request_with_instance_name() {
))
.into(),
),
skip_cache_lookup: true,
..Default::default()
};

Expand Down Expand Up @@ -311,6 +313,7 @@ async fn make_execute_request_with_cache_key_gen_version() {
))
.into(),
),
skip_cache_lookup: true,
..Default::default()
};

Expand Down Expand Up @@ -370,6 +373,7 @@ async fn make_execute_request_with_jdk() {
))
.into(),
),
skip_cache_lookup: true,
..Default::default()
};

Expand Down Expand Up @@ -453,6 +457,7 @@ async fn make_execute_request_with_jdk_and_extra_platform_properties() {
))
.into(),
),
skip_cache_lookup: true,
..Default::default()
};

Expand Down Expand Up @@ -533,6 +538,7 @@ async fn make_execute_request_with_timeout() {
))
.into(),
),
skip_cache_lookup: true,
..Default::default()
};

Expand Down Expand Up @@ -639,6 +645,7 @@ async fn make_execute_request_using_immutable_inputs() {
))
.into(),
),
skip_cache_lookup: true,
..Default::default()
};

Expand Down

0 comments on commit 8a22a45

Please sign in to comment.