From 18d490b35417d10455bb4f92d7d8d32fd066001c Mon Sep 17 00:00:00 2001 From: Tom Dyas Date: Wed, 21 Sep 2022 17:35:10 -0400 Subject: [PATCH] add remote cache writes to tail tasks [ci skip-build-wheels] --- src/rust/engine/process_execution/src/remote_cache.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rust/engine/process_execution/src/remote_cache.rs b/src/rust/engine/process_execution/src/remote_cache.rs index 77794719ff30..9f780fcd082a 100644 --- a/src/rust/engine/process_execution/src/remote_cache.rs +++ b/src/rust/engine/process_execution/src/remote_cache.rs @@ -471,7 +471,7 @@ impl crate::CommandRunner for CommandRunner { { let command_runner = self.clone(); let result = result.clone(); - let _write_join = self.executor.spawn(in_workunit!( + let write_fut = self.executor.spawn(in_workunit!( "remote_cache_write", Level::Trace, |workunit| async move { @@ -496,6 +496,8 @@ impl crate::CommandRunner for CommandRunner { // NB: We must box the future to avoid a stack overflow. .boxed() )); + let mut tail_tasks = context.tail_tasks.lock(); + tail_tasks.push(write_fut.boxed()); } Ok(result)