Skip to content

Commit

Permalink
Simplify the decision on whether to do remote include extraction. If …
Browse files Browse the repository at this point in the history
…we are

using an output service and am dealing with an output file, then the file will
likely be remote.

RELNOTES: None.
PiperOrigin-RevId: 353832834
  • Loading branch information
djasper authored and copybara-github committed Jan 26, 2021
1 parent 9df6bad commit ff64da8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ public boolean shouldParseRemotely(Artifact file, ActionExecutionContext ctx) th
// Files written remotely that are not locally available should be scanned remotely to avoid the
// bandwidth and disk space penalty of bringing them across. Also, enable include scanning
// remotely when explicitly directed to via a flag.
if (remoteExtractionThreshold == 0
|| (outputService != null && outputService.isRemoteFile(file))) {
if (remoteExtractionThreshold == 0 || (outputService != null && !file.isSourceArtifact())) {
return true;
}
FileStatus status = syscallCache.get().statIfFound(file.getPath(), Symlinks.FOLLOW);
Expand Down

0 comments on commit ff64da8

Please sign in to comment.