diff options
author | tomlu <tomlu@google.com> | 2018-08-10 11:51:20 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-08-10 11:52:48 -0700 |
commit | 9efbc25845c5ec4e6eece8540079fb33669e39e5 (patch) | |
tree | 572f4aa6f5db382adf18e950f08de7e8b35cc127 /src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventArtifactUploader.java | |
parent | 6a118a6c1ccbe3e436e8a87340a8cc554c9cc0a0 (diff) |
Do not crash when attempting to upload a tree artifact.
These show up as directories. Filter these out and return null from the path converter, which should cause omission of those files from any build events.
RELNOTES: None
PiperOrigin-RevId: 208244910
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventArtifactUploader.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventArtifactUploader.java | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventArtifactUploader.java b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventArtifactUploader.java index 284ce6de67..67a53142dd 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventArtifactUploader.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEventArtifactUploader.java @@ -13,30 +13,14 @@ // limitations under the License. package com.google.devtools.build.lib.buildeventstream; -import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.devtools.build.lib.buildeventstream.BuildEvent.LocalFile; -import com.google.devtools.build.lib.buildeventstream.PathConverter.FileUriPathConverter; import com.google.devtools.build.lib.vfs.Path; import java.util.Map; /** Uploads artifacts referenced by the Build Event Protocol (BEP). */ public interface BuildEventArtifactUploader { - BuildEventArtifactUploader LOCAL_FILES_UPLOADER = - new BuildEventArtifactUploader() { - private final ListenableFuture<PathConverter> completedPathConverter = - Futures.immediateFuture(new FileUriPathConverter()); - - @Override - public ListenableFuture<PathConverter> upload(Map<Path, LocalFile> files) { - return completedPathConverter; - } - - @Override - public void shutdown() { - // Intentionally left empty. - } - }; + BuildEventArtifactUploader LOCAL_FILES_UPLOADER = new LocalFilesArtifactUploader(); /** * Asynchronously uploads a set of files referenced by the protobuf representation of a {@link |