Skip to content

Commit 9ed9d8a

Browse files
philwoCopybara-Service
authored and
Copybara-Service
committed
Add flag --incompatible_symlinked_sandbox_expands_tree_artifacts_in_runfiles_tree.
In the future, Bazel will expand tree artifacts in runfiles, too, which causes the sandbox to link each file individually into the sandbox directory, instead of symlinking the entire directory. In bazelbuild#5971 it was shown that this might have user-visible impact, so the flag provides a mechanism to try it out before Bazel turns it on by default and also to temporarily revert to the previous behavior during the migration window. The flag will be removed once migration has been completed. RELNOTES: In the future, Bazel will expand tree artifacts in runfiles, too, which causes the sandbox to link each file individually into the sandbox directory, instead of symlinking the entire directory. In this release, the behavior is not enabled by default yet. Please try it out via --incompatible_symlinked_sandbox_expands_tree_artifacts_in_runfiles_tree and let us know if it causes issues. If everything looks good, this behavior will become the default in a following release. PiperOrigin-RevId: 211354053
1 parent 3eec3fe commit 9ed9d8a

19 files changed

+167
-44
lines changed

src/main/java/com/google/devtools/build/lib/exec/AbstractSpawnStrategy.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public List<SpawnResult> exec(
124124
spawnLogContext.logSpawn(
125125
spawn,
126126
actionExecutionContext.getMetadataProvider(),
127-
context.getInputMapping(),
127+
context.getInputMapping(true),
128128
context.getTimeout(),
129129
spawnResult);
130130
} catch (IOException e) {
@@ -184,10 +184,9 @@ public int getId() {
184184
@Override
185185
public void prefetchInputs() throws IOException {
186186
if (Spawns.shouldPrefetchInputsForLocalExecution(spawn)) {
187-
// TODO(philwo): Benchmark whether using an ExecutionService to do multiple operations in
188-
// parallel speeds up prefetching of inputs.
189-
// TODO(philwo): Do we have to expand middleman artifacts here?
190-
actionExecutionContext.getActionInputPrefetcher().prefetchFiles(getInputMapping().values());
187+
actionExecutionContext
188+
.getActionInputPrefetcher()
189+
.prefetchFiles(getInputMapping(true).values());
191190
}
192191
}
193192

@@ -232,13 +231,15 @@ public FileOutErr getFileOutErr() {
232231
}
233232

234233
@Override
235-
public SortedMap<PathFragment, ActionInput> getInputMapping() throws IOException {
234+
public SortedMap<PathFragment, ActionInput> getInputMapping(
235+
boolean expandTreeArtifactsInRunfiles) throws IOException {
236236
if (lazyInputMapping == null) {
237237
lazyInputMapping =
238238
spawnInputExpander.getInputMapping(
239239
spawn,
240240
actionExecutionContext.getArtifactExpander(),
241-
actionExecutionContext.getMetadataProvider());
241+
actionExecutionContext.getMetadataProvider(),
242+
expandTreeArtifactsInRunfiles);
242243
}
243244
return lazyInputMapping;
244245
}

src/main/java/com/google/devtools/build/lib/exec/SpawnInputExpander.java

+14-6
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ void addRunfilesToInputs(
106106
Map<PathFragment, ActionInput> inputMap,
107107
RunfilesSupplier runfilesSupplier,
108108
MetadataProvider actionFileCache,
109-
ArtifactExpander artifactExpander)
109+
ArtifactExpander artifactExpander,
110+
boolean expandTreeArtifactsInRunfiles)
110111
throws IOException {
111112
Map<PathFragment, Map<PathFragment, Artifact>> rootsAndMappings =
112113
runfilesSupplier.getMappings();
@@ -120,7 +121,7 @@ void addRunfilesToInputs(
120121
Artifact localArtifact = mapping.getValue();
121122
if (localArtifact != null) {
122123
Preconditions.checkState(!localArtifact.isMiddlemanArtifact());
123-
if (localArtifact.isTreeArtifact()) {
124+
if (expandTreeArtifactsInRunfiles && localArtifact.isTreeArtifact()) {
124125
List<ActionInput> expandedInputs =
125126
ActionInputHelper.expandArtifacts(
126127
Collections.singletonList(localArtifact), artifactExpander);
@@ -200,8 +201,8 @@ private void addInputs(
200201

201202
/**
202203
* Convert the inputs and runfiles of the given spawn to a map from exec-root relative paths to
203-
* {@link ActionInput}s. The returned map does not contain tree artifacts as they are expanded
204-
* to file artifacts.
204+
* {@link ActionInput}s. The returned map does not contain tree artifacts as they are expanded to
205+
* file artifacts.
205206
*
206207
* <p>The returned map never contains {@code null} values; it uses {@link #EMPTY_FILE} for empty
207208
* files, which is an instance of {@link
@@ -210,12 +211,19 @@ private void addInputs(
210211
* <p>The returned map contains all runfiles, but not the {@code MANIFEST}.
211212
*/
212213
public SortedMap<PathFragment, ActionInput> getInputMapping(
213-
Spawn spawn, ArtifactExpander artifactExpander, MetadataProvider actionInputFileCache)
214+
Spawn spawn,
215+
ArtifactExpander artifactExpander,
216+
MetadataProvider actionInputFileCache,
217+
boolean expandTreeArtifactsInRunfiles)
214218
throws IOException {
215219
TreeMap<PathFragment, ActionInput> inputMap = new TreeMap<>();
216220
addInputs(inputMap, spawn, artifactExpander);
217221
addRunfilesToInputs(
218-
inputMap, spawn.getRunfilesSupplier(), actionInputFileCache, artifactExpander);
222+
inputMap,
223+
spawn.getRunfilesSupplier(),
224+
actionInputFileCache,
225+
artifactExpander,
226+
expandTreeArtifactsInRunfiles);
219227
addFilesetManifests(spawn.getFilesetMappings(), inputMap);
220228
return inputMap;
221229
}

src/main/java/com/google/devtools/build/lib/exec/SpawnRunner.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ default ArtifactPathResolver getPathResolver() {
193193
/** The files to which to write stdout and stderr. */
194194
FileOutErr getFileOutErr();
195195

196-
SortedMap<PathFragment, ActionInput> getInputMapping() throws IOException;
196+
SortedMap<PathFragment, ActionInput> getInputMapping(boolean expandTreeArtifactsInRunfiles)
197+
throws IOException;
197198

198199
/** Reports a progress update to the Spawn strategy. */
199200
void report(ProgressStatus state, String name);

src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public CacheHandle lookup(Spawn spawn, SpawnExecutionContext context)
9797
// Temporary hack: the TreeNodeRepository should be created and maintained upstream!
9898
TreeNodeRepository repository =
9999
new TreeNodeRepository(execRoot, context.getMetadataProvider(), digestUtil);
100-
SortedMap<PathFragment, ActionInput> inputMap = context.getInputMapping();
100+
SortedMap<PathFragment, ActionInput> inputMap = context.getInputMapping(true);
101101
TreeNode inputRoot = repository.buildFromActionInputs(inputMap);
102102
repository.computeMerkleDigests(inputRoot);
103103
Command command =

src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public SpawnResult exec(Spawn spawn, SpawnExecutionContext context)
143143
// Temporary hack: the TreeNodeRepository should be created and maintained upstream!
144144
MetadataProvider inputFileCache = context.getMetadataProvider();
145145
TreeNodeRepository repository = new TreeNodeRepository(execRoot, inputFileCache, digestUtil);
146-
SortedMap<PathFragment, ActionInput> inputMap = context.getInputMapping();
146+
SortedMap<PathFragment, ActionInput> inputMap = context.getInputMapping(true);
147147
TreeNode inputRoot = repository.buildFromActionInputs(inputMap);
148148
repository.computeMerkleDigests(inputRoot);
149149
maybeWriteParamFilesLocally(spawn);

src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,12 @@ protected SpawnResult actuallyExec(Spawn spawn, SpawnExecutionContext context)
259259
allowNetwork
260260
|| Spawns.requiresNetwork(spawn, getSandboxOptions().defaultSandboxAllowNetwork);
261261

262-
Map<PathFragment, Path> inputs = SandboxHelpers.processInputFiles(spawn, context, execRoot);
262+
Map<PathFragment, Path> inputs =
263+
SandboxHelpers.processInputFiles(
264+
spawn,
265+
context,
266+
execRoot,
267+
getSandboxOptions().symlinkedSandboxExpandsTreeArtifactsInRunfilesTree);
263268

264269
SandboxedSpawn sandbox;
265270
if (sandboxfsProcess != null) {

src/main/java/com/google/devtools/build/lib/sandbox/DockerSandboxedSpawnRunner.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ protected SpawnResult actuallyExec(Spawn spawn, SpawnExecutionContext context)
263263
sandboxExecRoot,
264264
cmdLine.build(),
265265
cmdEnv.getClientEnv(),
266-
SandboxHelpers.processInputFiles(spawn, context, execRoot),
266+
SandboxHelpers.processInputFiles(
267+
spawn,
268+
context,
269+
execRoot,
270+
getSandboxOptions().symlinkedSandboxExpandsTreeArtifactsInRunfilesTree),
267271
outputs,
268272
ImmutableSet.of());
269273

src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ spawn, getSandboxOptions().defaultSandboxAllowNetwork)))
190190
sandboxPath,
191191
commandLineBuilder.build(),
192192
environment,
193-
SandboxHelpers.processInputFiles(spawn, context, execRoot),
193+
SandboxHelpers.processInputFiles(
194+
spawn,
195+
context,
196+
execRoot,
197+
getSandboxOptions().symlinkedSandboxExpandsTreeArtifactsInRunfilesTree),
194198
outputs,
195199
ImmutableSet.of());
196200
} else {
@@ -200,7 +204,11 @@ spawn, getSandboxOptions().defaultSandboxAllowNetwork)))
200204
sandboxExecRoot,
201205
commandLineBuilder.build(),
202206
environment,
203-
SandboxHelpers.processInputFiles(spawn, context, execRoot),
207+
SandboxHelpers.processInputFiles(
208+
spawn,
209+
context,
210+
execRoot,
211+
getSandboxOptions().symlinkedSandboxExpandsTreeArtifactsInRunfilesTree),
204212
outputs,
205213
writableDirs);
206214
}

src/main/java/com/google/devtools/build/lib/sandbox/ProcessWrapperSandboxedSpawnRunner.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ protected SpawnResult actuallyExec(Spawn spawn, SpawnExecutionContext context)
101101
sandboxExecRoot,
102102
commandLineBuilder.build(),
103103
environment,
104-
SandboxHelpers.processInputFiles(spawn, context, execRoot),
104+
SandboxHelpers.processInputFiles(
105+
spawn,
106+
context,
107+
execRoot,
108+
getSandboxOptions().symlinkedSandboxExpandsTreeArtifactsInRunfilesTree),
105109
SandboxHelpers.getOutputFiles(spawn),
106110
getWritableDirs(sandboxExecRoot, environment));
107111

src/main/java/com/google/devtools/build/lib/sandbox/SandboxHelpers.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,16 @@ public final class SandboxHelpers {
4848
* @throws IOException If any files could not be written.
4949
*/
5050
public static Map<PathFragment, Path> processInputFiles(
51-
Spawn spawn, SpawnExecutionContext context, Path execRoot) throws IOException {
51+
Spawn spawn,
52+
SpawnExecutionContext context,
53+
Path execRoot,
54+
boolean expandTreeArtifactsInRunfiles)
55+
throws IOException {
5256
return processInputFiles(
53-
context.getInputMapping(), spawn, context.getArtifactExpander(), execRoot);
57+
context.getInputMapping(expandTreeArtifactsInRunfiles),
58+
spawn,
59+
context.getArtifactExpander(),
60+
execRoot);
5461
}
5562

5663
/**

src/main/java/com/google/devtools/build/lib/sandbox/SandboxOptions.java

+15
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.google.devtools.common.options.Option;
2525
import com.google.devtools.common.options.OptionDocumentationCategory;
2626
import com.google.devtools.common.options.OptionEffectTag;
27+
import com.google.devtools.common.options.OptionMetadataTag;
2728
import com.google.devtools.common.options.OptionsBase;
2829
import com.google.devtools.common.options.OptionsParsingException;
2930
import java.io.IOException;
@@ -281,4 +282,18 @@ public ImmutableSet<Path> getInaccessiblePaths(FileSystem fs) {
281282
effectTags = {OptionEffectTag.UNKNOWN},
282283
help = "Allow network access by default for actions.")
283284
public boolean defaultSandboxAllowNetwork;
285+
286+
@Option(
287+
name = "incompatible_symlinked_sandbox_expands_tree_artifacts_in_runfiles_tree",
288+
defaultValue = "false",
289+
documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY,
290+
effectTags = {OptionEffectTag.EXECUTION},
291+
metadataTags = {
292+
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES,
293+
OptionMetadataTag.INCOMPATIBLE_CHANGE
294+
},
295+
help =
296+
"If enabled, the sandbox will expand tree artifacts in runfiles, thus the files that "
297+
+ "are contained in the tree artifact will be symlinked as individual files.")
298+
public boolean symlinkedSandboxExpandsTreeArtifactsInRunfilesTree;
284299
}

src/main/java/com/google/devtools/build/lib/worker/WorkerModule.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import com.google.devtools.build.lib.runtime.Command;
3838
import com.google.devtools.build.lib.runtime.CommandEnvironment;
3939
import com.google.devtools.build.lib.runtime.commands.CleanCommand.CleanStartingEvent;
40+
import com.google.devtools.build.lib.sandbox.SandboxOptions;
4041
import com.google.devtools.build.lib.util.OS;
4142
import com.google.devtools.build.lib.vfs.Path;
4243
import com.google.devtools.common.options.OptionsBase;
@@ -145,7 +146,10 @@ public void executorInit(CommandEnvironment env, BuildRequest request, ExecutorB
145146
workerPool,
146147
extraFlags,
147148
env.getReporter(),
148-
createFallbackRunner(env));
149+
createFallbackRunner(env),
150+
env.getOptions()
151+
.getOptions(SandboxOptions.class)
152+
.symlinkedSandboxExpandsTreeArtifactsInRunfilesTree);
149153
builder.addActionContext(new WorkerSpawnStrategy(env.getExecRoot(), spawnRunner));
150154

151155
builder.addStrategyByContext(SpawnActionContext.class, "standalone");

src/main/java/com/google/devtools/build/lib/worker/WorkerSpawnRunner.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,21 @@ final class WorkerSpawnRunner implements SpawnRunner {
7676
private final Multimap<String, String> extraFlags;
7777
private final EventHandler reporter;
7878
private final SpawnRunner fallbackRunner;
79+
private final boolean sandboxUsesExpandedTreeArtifactsInRunfiles;
7980

8081
public WorkerSpawnRunner(
8182
Path execRoot,
8283
WorkerPool workers,
8384
Multimap<String, String> extraFlags,
8485
EventHandler reporter,
85-
SpawnRunner fallbackRunner) {
86+
SpawnRunner fallbackRunner,
87+
boolean sandboxUsesExpandedTreeArtifactsInRunfiles) {
8688
this.execRoot = execRoot;
8789
this.workers = Preconditions.checkNotNull(workers);
8890
this.extraFlags = extraFlags;
8991
this.reporter = reporter;
9092
this.fallbackRunner = fallbackRunner;
93+
this.sandboxUsesExpandedTreeArtifactsInRunfiles = sandboxUsesExpandedTreeArtifactsInRunfiles;
9194
}
9295

9396
@Override
@@ -135,7 +138,9 @@ private SpawnResult actuallyExec(Spawn spawn, SpawnExecutionContext context)
135138

136139
HashCode workerFilesCombinedHash = WorkerFilesHash.getCombinedHash(workerFiles);
137140

138-
Map<PathFragment, Path> inputFiles = SandboxHelpers.processInputFiles(spawn, context, execRoot);
141+
Map<PathFragment, Path> inputFiles =
142+
SandboxHelpers.processInputFiles(
143+
spawn, context, execRoot, sandboxUsesExpandedTreeArtifactsInRunfiles);
139144
Set<PathFragment> outputFiles = SandboxHelpers.getOutputFiles(spawn);
140145

141146
WorkerKey key =

src/test/java/com/google/devtools/build/lib/exec/SpawnInputExpanderTest.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private void scratchFile(String file, String... lines) throws Exception {
8888
public void testEmptyRunfiles() throws Exception {
8989
RunfilesSupplier supplier = EmptyRunfilesSupplier.INSTANCE;
9090
FakeActionInputFileCache mockCache = new FakeActionInputFileCache();
91-
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER);
91+
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER, true);
9292
assertThat(inputMappings).isEmpty();
9393
}
9494

@@ -103,7 +103,7 @@ public void testRunfilesSingleFile() throws Exception {
103103
FakeActionInputFileCache mockCache = new FakeActionInputFileCache();
104104
mockCache.put(artifact, FileArtifactValue.createNormalFile(FAKE_DIGEST, 0));
105105

106-
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER);
106+
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER, true);
107107
assertThat(inputMappings).hasSize(1);
108108
assertThat(inputMappings)
109109
.containsEntry(PathFragment.create("runfiles/workspace/dir/file"), artifact);
@@ -121,7 +121,7 @@ public void testRunfilesDirectoryStrict() {
121121
mockCache.put(artifact, FileArtifactValue.createDirectory(-1));
122122

123123
try {
124-
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER);
124+
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER, true);
125125
fail();
126126
} catch (IOException expected) {
127127
assertThat(expected).hasMessageThat().isEqualTo("Not a file: dir/file");
@@ -140,7 +140,7 @@ public void testRunfilesDirectoryNonStrict() throws Exception {
140140
mockCache.put(artifact, FileArtifactValue.createDirectory(-1));
141141

142142
expander = new SpawnInputExpander(execRoot, /*strict=*/ false);
143-
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER);
143+
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER, true);
144144
assertThat(inputMappings).hasSize(1);
145145
assertThat(inputMappings)
146146
.containsEntry(PathFragment.create("runfiles/workspace/dir/file"), artifact);
@@ -163,7 +163,7 @@ public void testRunfilesTwoFiles() throws Exception {
163163
mockCache.put(artifact1, FileArtifactValue.createNormalFile(FAKE_DIGEST, 1));
164164
mockCache.put(artifact2, FileArtifactValue.createNormalFile(FAKE_DIGEST, 2));
165165

166-
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER);
166+
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER, true);
167167
assertThat(inputMappings).hasSize(2);
168168
assertThat(inputMappings)
169169
.containsEntry(PathFragment.create("runfiles/workspace/dir/file"), artifact1);
@@ -185,7 +185,7 @@ public void testRunfilesSymlink() throws Exception {
185185
FakeActionInputFileCache mockCache = new FakeActionInputFileCache();
186186
mockCache.put(artifact, FileArtifactValue.createNormalFile(FAKE_DIGEST, 1));
187187

188-
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER);
188+
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER, true);
189189
assertThat(inputMappings).hasSize(1);
190190
assertThat(inputMappings)
191191
.containsEntry(PathFragment.create("runfiles/workspace/symlink"), artifact);
@@ -205,7 +205,7 @@ public void testRunfilesRootSymlink() throws Exception {
205205
FakeActionInputFileCache mockCache = new FakeActionInputFileCache();
206206
mockCache.put(artifact, FileArtifactValue.createNormalFile(FAKE_DIGEST, 1));
207207

208-
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER);
208+
expander.addRunfilesToInputs(inputMappings, supplier, mockCache, NO_ARTIFACT_EXPANDER, true);
209209
assertThat(inputMappings).hasSize(2);
210210
assertThat(inputMappings).containsEntry(PathFragment.create("runfiles/symlink"), artifact);
211211
// If there's no other entry, Runfiles adds an empty file in the workspace to make sure the
@@ -236,7 +236,7 @@ public void testRunfilesWithTreeArtifacts() throws Exception {
236236
fakeCache.put(file1, FileArtifactValue.create(file1));
237237
fakeCache.put(file2, FileArtifactValue.create(file2));
238238

239-
expander.addRunfilesToInputs(inputMappings, supplier, fakeCache, artifactExpander);
239+
expander.addRunfilesToInputs(inputMappings, supplier, fakeCache, artifactExpander, true);
240240
assertThat(inputMappings).hasSize(2);
241241
assertThat(inputMappings)
242242
.containsEntry(PathFragment.create("runfiles/workspace/treeArtifact/file1"), file1);
@@ -268,7 +268,7 @@ public void testRunfilesWithTreeArtifactsInSymlinks() throws Exception {
268268
fakeCache.put(file1, FileArtifactValue.create(file1));
269269
fakeCache.put(file2, FileArtifactValue.create(file2));
270270

271-
expander.addRunfilesToInputs(inputMappings, supplier, fakeCache, artifactExpander);
271+
expander.addRunfilesToInputs(inputMappings, supplier, fakeCache, artifactExpander, true);
272272
assertThat(inputMappings).hasSize(2);
273273
assertThat(inputMappings)
274274
.containsEntry(PathFragment.create("runfiles/workspace/symlink/file1"), file1);
@@ -296,7 +296,7 @@ public void testTreeArtifactsInInputs() throws Exception {
296296
fakeCache.put(file2, FileArtifactValue.create(file2));
297297

298298
Spawn spawn = new SpawnBuilder("/bin/echo", "Hello World").withInput(treeArtifact).build();
299-
inputMappings = expander.getInputMapping(spawn, artifactExpander, fakeCache);
299+
inputMappings = expander.getInputMapping(spawn, artifactExpander, fakeCache, true);
300300
assertThat(inputMappings).hasSize(2);
301301
assertThat(inputMappings).containsEntry(PathFragment.create("treeArtifact/file1"), file1);
302302
assertThat(inputMappings).containsEntry(PathFragment.create("treeArtifact/file2"), file2);

src/test/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunnerTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ public FileOutErr getFileOutErr() {
242242
}
243243

244244
@Override
245-
public SortedMap<PathFragment, ActionInput> getInputMapping() {
245+
public SortedMap<PathFragment, ActionInput> getInputMapping(
246+
boolean expandTreeArtifactsInRunfiles) {
246247
return inputMapping;
247248
}
248249

src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,10 @@ public FileOutErr getFileOutErr() {
181181
}
182182

183183
@Override
184-
public SortedMap<PathFragment, ActionInput> getInputMapping() throws IOException {
184+
public SortedMap<PathFragment, ActionInput> getInputMapping(
185+
boolean expandTreeArtifactsInRunfiles) throws IOException {
185186
return new SpawnInputExpander(execRoot, /*strict*/ false)
186-
.getInputMapping(simpleSpawn, SIMPLE_ARTIFACT_EXPANDER, fakeFileCache);
187+
.getInputMapping(simpleSpawn, SIMPLE_ARTIFACT_EXPANDER, fakeFileCache, true);
187188
}
188189

189190
@Override

0 commit comments

Comments
 (0)