aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildeventservice
Commit message (Collapse)AuthorAge
* Remove some unnecessary depsGravatar Ulf Adams2018-01-15
| | | | | | | | | Change-Id: Ib8dd9265b18fa0915f52427567845105fcdfa295 Closes #4447. Change-Id: Ib8dd9265b18fa0915f52427567845105fcdfa295 PiperOrigin-RevId: 181943004
* BEP: make stdout/stderr buffering configurableGravatar Klaus Aehlig2018-01-11
| | | | | | | | | | For different applications, different size of buffered stdout/stderr might be acceptable; essentially it is a trade off between latency and number of messages generated. Put this trade off into the control of the user by adding an appropriate flag. Change-Id: I8fb4d19a336205fa28d01340f2f0b2be9b4a24f3 PiperOrigin-RevId: 181570242
* remote: Add support for Google Cloud Storage.Gravatar Jakob Buchgraber2017-12-18
| | | | | | | | | | | | | | | | | | | | | | Add support for Google Cloud Storage (GCS) as a HTTP caching backend. This commit mainly adds the infrastructure necessary to authenticate to GCS. Using GCS as a caching backend works as follows: 1) Create a new GCS bucket. 2) Create a service account that can read and write to the GCS bucket and generate a JSON credentials file for it. 3) Invoke Bazel as follows: bazel build --remote_rest_cache=https://storage.googleapis.com/<bucket> --auth_enabled --auth_scope=https://www.googleapis.com/auth/devstorage.read_write --auth_credentials=</path/to/creds.json> I'll add simplification's and docs in a subsequent commit. Change-Id: Ie827d7946a2193b97ea7d9aa72eb15f09de2164d PiperOrigin-RevId: 179406380
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Prefix all --bes_keywords with "user_keyword=<keyword>" before publishing to ↵Gravatar Googler2017-11-07
| | | | | | | | | | BES. - Add a prefix to user provided keywords, so it can be distinguished from keywords provided directly by Bazel. - Keywords are also stored in a Set to avoid duplicates. PiperOrigin-RevId: 174872442
* Make BuildEventServiceTransport sender thread verify the streaming RPC is ↵Gravatar Googler2017-10-31
| | | | | | | | | | active, restarting the RPC if required. - BuildEventServiceTransport sender thread checks the RPC is still active every 1s, failing the RPC if it was ended before we reached the end of the BEP stream. - "fail_fast" is the default behavior on gRPC (it needs to be disabled using .withWaitForReady). PiperOrigin-RevId: 173921837
* Fix flakiness of BuildEventServiceTestsGravatar ulfjack2017-09-29
| | | | | | | | | | The flakiness was caused by waiting for the server to receive the second life-cycle event, but not waiting for the ack to get to the client. In that case, the interruption would happen before the life-cycle call returned, in which case it threw the InterruptedException, and then the stream doesn't exist yet, and so there's no mechanism to send anything to the server. PiperOrigin-RevId: 170472383
* Adds option bes_keywords BEP publishing.Gravatar Googler2017-09-27
| | | | PiperOrigin-RevId: 170121049
* Improve BES retries.Gravatar buchgr2017-09-26
| | | | | | | | | | | - The upload of build events is retried infinitely often as long as between two failures progress was made, that is ACKs were received. - Set the initial backoff after a failure to 0, and every further backoff to 1s. This aligns relatively well with the backoff times gRPC connections are retried [1]. PiperOrigin-RevId: 170022707
* Passing Bazel metadata in gRPC headers.Gravatar olaola2017-09-21
| | | | | | TESTED=unit tests RELNOTES: none PiperOrigin-RevId: 169395919
* bes: cancel stream on bazel shutdownGravatar buchgr2017-09-12
| | | | | | | | | | | | | | | | | Introduce a new method BuildEventTransport#closeNow() which forcefully closes the BES upload even if there are still events to upload. This is executed if the bazel server is being shutdown. The implementation in the BuildEventServiceTransport works by shutting down the ExecutorService handling the upload, which in turn will interrupt the upload thread, which in turn will cancel the streaming RPC. The BuildEventServiceTransport will wait up to 100ms for that cancellation to happen. Also fix a bug where the BES transport would not wait for ACKS. PiperOrigin-RevId: 168359947
* More BUILD file refactorings.Gravatar philwo2017-09-06
| | | | | | | | | Split collect, concurrent, vfs, windows into package-level BUILD files. Move clock classes out of "util", into their own Java package. Move CompactHashSet into its own Java package to break a dependency cycle. Give nestedset and inmemoryfs their own package-level BUILD files. PiperOrigin-RevId: 167702127
* Rewrite all code to use the new Java 8 java.time classes.Gravatar Philipp Wollermann2017-09-05
| | | | | | | This removes our dependency on third_party/joda_time, which can be removed in the next commit. Change-Id: Ibda131d34d0abdc2d675db4bfbd2e99480c055ee PiperOrigin-RevId: 167515260
* Extract authandtls, buildeventservice, buildeventstream into package-level ↵Gravatar philwo2017-09-04
| | | | | | | | BUILD files. Replace all ":relative" labels with "//absolute:path" labels for easier search & replace. PiperOrigin-RevId: 167500985
* Abort stream if BuildEventServiceTransport does not wait for all ACKs.Gravatar Googler2017-08-25
| | | | | | | This change handling for when BuildEventServiceTransport would timesout waiting for pendingAcks. RELNOTES: None. PiperOrigin-RevId: 166375844
* Add keywords to BES PublishBuildToolEventStreamRequest.Gravatar Googler2017-08-07
| | | | | | | | | | | | | Notification keywords published BES include:command_name and protocol_name. These keywords can be used by subscribers to filter BES streams of interest. This change also cleans up use of deprecated fields in in PublishBuildToolEventStreamRequest. RELEASE_NOTES: None. Change-Id: I331fc9a818728ad6986230ebdea7d4019e8e49fc PiperOrigin-RevId: 164285745
* grpc: Consolidate gRPC code from BES and Remote Execution. Fixes #3460, #3486Gravatar buchgr2017-08-04
| | | | | | | | | | | BES and Remote Execution have separate implementations of gRPC channel creation, authentication and TLS. We should merge them, to avoid duplication and bugs. One such bug is #3640, where the BES code had a different implementation for Google Application Default Credentials. RELNOTES: The Build Event Service (BES) client now properly supports Google Applicaton Default Credentials. PiperOrigin-RevId: 164253879
* The first step to allow non-lifecycle build stream to specify notification ↵Gravatar Kai Xu2017-07-24
| | | | | | | keywords. Change-Id: I8421e9d2d8a5e6720d7b8d6de4417bee71c0fa68 PiperOrigin-RevId: 162966141
* Update install-os-x.mdGravatar Oleg Tsarev2017-07-24
| | | | | | | | Incorrect instruction for OSX (apt-get instead of brew) Closes #3437. PiperOrigin-RevId: 162923095
* bes: Update RPC PublishBuildToolEventStream.Gravatar Kai Xu2017-07-24
| | | | | | Change the return type for RPC PublishBuildToolEventStream from OrderedBuildEvent to PublishBuildToolEventStreamRequest. Change-Id: I8421e9d2d8a5e6720d7b8d6de4417bee71c0fa68
* Move the DurationConverter to the common.options packageGravatar ulfjack2017-07-24
| | | | | | | Also change it to java.time.Duration, rather than Jodatime. Now that we're on Java 8, we no longer need Jodatime. PiperOrigin-RevId: 162917526
* Make the @Option annotation depend on the java version of the tagging enums.Gravatar ccalvarin2017-07-18
| | | | | | | The option filters proto dependency can be removed from the OptionsParser. This is in response to option parser users that want to avoid the bazel-internal proto file in their dependencies. RELNOTES: None. PiperOrigin-RevId: 162249778
* Merge handleOptions into beforeCommandGravatar ulfjack2017-07-17
| | | | | | | Now that we have the options before calling beforeCommand, there's no need for a separate handleOptions method in the BlazeModule API. Remove it. PiperOrigin-RevId: 162002300
* Fix documentation: no best effort guarantees to waitGravatar aehlig2017-07-14
| | | | PiperOrigin-RevId: 161930826
* Also generate a build stream for fetchGravatar Klaus Aehlig2017-07-14
| | | | | | | | | | | Bazel's fetch command is also related to building. So generate a build-event stream for this as well. As a first step, generate a minimal stream with only the console output by white listing the command, setting the separateFinishedEvent flag on the NoBuildEvent, and generating a NoBuildRequestFinishedEvent. Change-Id: Iee0c4e84ee5a060565ac86692a2b1917691a84ab PiperOrigin-RevId: 161782448
* Restrict writing build events to a white-listed set of commandsGravatar Klaus Aehlig2017-07-07
| | | | | | | | | It is not desirable to have a build-event stream for all invocations of blaze; so restrict the BuildEventServiceModule to be only active if the executed command is in a white list of commands for which having build events is desirable. Change-Id: Id4acf9468f67b1af7fc8ea703785df5229c69258 PiperOrigin-RevId: 161207563
* Automated conversion to Java 8Gravatar laurentlb2017-06-30
| | | | | | | With a few manual fixes for readability. RELNOTES: None. PiperOrigin-RevId: 160582556
* Add categories to BES-related optionsGravatar aehlig2017-06-29
| | | | | | | | | | The build event stream reports about events during the build, so it is logging (in a broad sense). The idividual options affect where we (remotely) log to, how eager we do it, etc. So they affect where the output (of the logging) goes to. RELNOTES: None PiperOrigin-RevId: 160409925
* Add the default category and tag to all options.Gravatar ccalvarin2017-06-28
| | | | | | | | Move the default from the annotation to every mention. This makes the incompleteness explicit. Will add the defaults to test targets in a separate change. Once all dependencies are cleaned up, the Option annotation will no longer allow options without the documentationCategory or effectTag, to prevent new options being added without categories while we migrate to the new option categorization. PiperOrigin-RevId: 160281252
* BES: Consolidate BuildEventServiceModule and BuildEventStreamerModule.Gravatar buchgr2017-06-14
| | | | | | | | | | | | | | After having open sourced the Build Event Service code, there is no more need to have two separate bazel modules that both create a BuildEventStreamer. This change merges the BuildEventStreamerModule logic into the BuildEventServiceModule. DELTA=677 (330 added, 316 deleted, 31 changed) DELTA_BY_EXTENSION=java=293,oss=32 RELNOTES: None. PiperOrigin-RevId: 158960687
* Simplify BlazeModule.beforeCommandGravatar ulfjack2017-06-14
| | | | | | | | | | | Don't pass the Command annotation explicitly, but add it to CommandEnvironment instead; most modules don't need it in the first place, so it was a lot of boilerplate for not much. Also change it so that the command is passed to the constructor. Add some documentation to the beforeCommand method. PiperOrigin-RevId: 158847128
* BES: Open Source the build event service gRPC client implementation.Gravatar buchgr2017-06-09
This change moves the BES code from blaze to bazel. RELNOTES: None. PiperOrigin-RevId: 158445754