aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildeventstream
Commit message (Collapse)AuthorAge
* BEP: Use TestStatus enum to report the status of a TestResultGravatar Jakob Buchgraber2017-03-23
| | | | | | | | -- Change-Id: I07c15f7d232a3e9363ebedfb9b5523999630c401 Reviewed-on: https://cr.bazel.build/9450 PiperOrigin-RevId: 150887776 MOS_MIGRATED_REVID=150887776
* Add a BuildEvent capable of storing the original command line Gravatar Klaus Aehlig2017-03-21
| | | | | | | | | | | | ...so we can report it in the build event protocol no matter what changes the various option parsers and modules do to the command line. -- Change-Id: I497d6dbbf1fc2849580271833797755cb0c9d13c Reviewed-on: https://cr.bazel.build/9452 PiperOrigin-RevId: 150737198 MOS_MIGRATED_REVID=150737198
* BEP: Indicate caching status in TestResult Gravatar Klaus Aehlig2017-03-20
| | | | | | | | | | | | | | For a test result indicate if it was cached locally by the tool. Note that this bit will not be set for tests cached by the remote execution. Also clarify the meaning of the timing; it need not be set for locally cached test results, but it may (and in this case reporting the timing of the initial invocation of the cached test). -- Change-Id: Ic83c4a58c1a85f6f4da82138999eaa545d8f60a6 Reviewed-on: https://cr.bazel.build/9376 PiperOrigin-RevId: 150442579 MOS_MIGRATED_REVID=150442579
* Make AspectCompleteEvent an instance of BuildEvent Gravatar Klaus Aehlig2017-03-16
| | | | | | | | | | | | | | | In this way, we can also report the artifacts generated by aspects in the build event protocol. For the time being, those events are reported unsolicitly (i.e., as children of progress events), but they may be linked to pattern expansion later. -- Change-Id: I7fb83088d7fdb5424f77bfb78700e8371231b13c Reviewed-on: https://cr.bazel.build/9370 PiperOrigin-RevId: 150181433 MOS_MIGRATED_REVID=150181433
* BEP: provide timing information for tests Gravatar Klaus Aehlig2017-03-09
| | | | | | | | | | For tests, also provide information on the time the test took. -- Change-Id: I8e71391e4dd97627d6293159a0cbb0d922683af7 Reviewed-on: https://cr.bazel.build/9214 PiperOrigin-RevId: 149547633 MOS_MIGRATED_REVID=149547633
* BEP: Make TestSummary provide the overall status Gravatar Klaus Aehlig2017-03-06
| | | | | | | | | | | | | | | | | Bazel does an involved computation of the overall outcome of a test, taking into considerations multiple attempts to detect flaky tests. To allow a consumer of the BEP to have the same view of the outcome of the test as bazel does, report the overall status of a test in the TestSummary event. Note: as proto-to-proto dependencies are not yet available, we have to provide the status by duplicating the status enum. -- Change-Id: I413ce7b72c54ff3cbfe0733219ba0881ad5d064e Reviewed-on: https://cr.bazel.build/9129 PiperOrigin-RevId: 149268441 MOS_MIGRATED_REVID=149268441
* BEP: Report pattern expansion failures Gravatar Klaus Aehlig2017-03-01
| | | | | | | | | | | If expanding a pattern fails, report this on the build event protocol; also include details of what happened. -- Change-Id: I2bc9caf7c085911b80551d7892cc34f5e9961c7b Reviewed-on: https://cr.bazel.build/8795 PiperOrigin-RevId: 148894326 MOS_MIGRATED_REVID=148894326
* BEP: Add BuildFinished event. Gravatar Jakob Buchgraber2017-02-28
| | | | | | | | | | | | The build event protocol now emits a BuildFinished event at the end of a build. The event is a child of the BuildStarted event. The code changes were larger than expected, due to some refactoring in BuildEventStreamer. This was necessary as the BuildCompleteEvent now implements the BuildEvent interface and Guava's EventBus always invokes the most specialized subscriber method. Thus, the buildEvent(BuildEvent) and buildCompleted(BuildCompletedEvent) methods had to be merged. -- Change-Id: Id0c2bd7220dc8ce03128b7126587e212ee8ce836 Reviewed-on: https://cr.bazel.build/9053 PiperOrigin-RevId: 148788582 MOS_MIGRATED_REVID=148788582
* BEP: Add tags and output files to TargetComplete event Gravatar Jakob Buchgraber2017-02-28
| | | | | | | | | | | | | | | A target's tags and output files are reported as part of the TargetComplete event of the build event protocol (BEP). The output files are grouped by their corresponding output group. If an output file belongs to more than one output group it appears once in each output group. -- Change-Id: Ia37db68709850d8550e478dcc30064dc7366bd1b Reviewed-on: https://cr.bazel.build/8955 PiperOrigin-RevId: 148667599 MOS_MIGRATED_REVID=148667599
* Declare all BuildEvents as Postable Gravatar Klaus Aehlig2017-02-21
| | | | | | | | | | | | ...through the ExtendedEventHandler. The main use case of the extended event handler is to allow posting of BuildEvents. So it is implicit that they are all good to be posted. Declare this. -- Change-Id: I9fcb2f33e57e05c3a05509b1121e44396f28c168 Reviewed-on: https://cr.bazel.build/9011 PiperOrigin-RevId: 148090465 MOS_MIGRATED_REVID=148090465
* Fix spelling of millisGravatar Klaus Aehlig2017-02-21
| | | | | | | | -- Change-Id: I9e1483b9e99751b03d332110db023d99c045cb52 Reviewed-on: https://cr.bazel.build/9012 PiperOrigin-RevId: 148069886 MOS_MIGRATED_REVID=148069886
* BEP: Provide more useful data in TestResult events Gravatar Klaus Aehlig2017-02-10
| | | | | | | | | | | | | | | | | | | | | For individual test actions, more useful data can be provided than just the success status. Do so. Also, to keep each log reported only once, send a new TestAttempt event for the final test attempt, but don't have the TestResult (which contains to union of all test files) an instance of the BuildEvent. As we now report test results in a separate object, drop the test data and directly pass in the files created. In this way, we also get all the moved files reported correctly in the individual attempts. -- Change-Id: Ic04b7bad4f92a381bd4d1b4ec91f743b89f81f84 Reviewed-on: https://cr.bazel.build/8694 PiperOrigin-RevId: 147149025 MOS_MIGRATED_REVID=147149025
* Use //third_party/protobuf:protobuf_java instead of ↵Gravatar Carmi Grushko2017-02-09
| | | | | | | | | | //third_party/protobuf:protobuf to refer to the Java proto runtime. This is the name in the upstream protobuf repo. -- PiperOrigin-RevId: 146949832 MOS_MIGRATED_REVID=146949832
* Also report about individual attempts in a test Gravatar Klaus Aehlig2017-02-03
| | | | | | | | | | | For tests known to be flaky, additional attempts are run. Also report about those in the build-event protocol. -- Change-Id: I287b0b78478949abe5e14a9fafb1fd463aba8287 Reviewed-on: https://cr.bazel.build/8570 PiperOrigin-RevId: 146454273 MOS_MIGRATED_REVID=146454273
* Also report individual test results via BEP Gravatar Klaus Aehlig2017-02-02
| | | | | | | | | | | | Only having a test summary for each test target is not enough for timely error reporting. Also individual test actions and attempts are of interest. Report those by making TestResult an instance of BuildEvent. -- Change-Id: Iee1c988b6d467ebda8230b9edacbe3b66600c30e Reviewed-on: https://cr.bazel.build/8532 PiperOrigin-RevId: 146342845 MOS_MIGRATED_REVID=146342845
* Support mapping of Paths to URIsGravatar Klaus Aehlig2017-01-18
| | | | | | | | | | | Bazel-created files (like log files of test runs) are internally reported as Paths. However, this is not always the most useful representation of the location of that artifact for a consumer of build events. Therefore, support a mapping of paths to more useful URIs. -- PiperOrigin-RevId: 144843525 MOS_MIGRATED_REVID=144843525
* Support ordering constraints on build eventsGravatar Klaus Aehlig2016-11-21
| | | | | | | | | | | | | | In the build event protocol, we promise to respect certain ordering constraints that come naturally by causality anyway (e.g., the root cause of a failure has to come before the failure). However, in the way the call structure is organized, events might occur on the event bus in wrong order. So allow events to specify that order and make the streamer honor it. -- Change-Id: I1fbe9b93681f0ddfa35d9d00d5d1b02103da38a5 Reviewed-on: https://bazel-review.googlesource.com/#/c/7370 MOS_MIGRATED_REVID=139774946
* Writes a machine readable representation of BuildEvents to a file (varint ↵Gravatar Eduardo Colaco2016-11-03
| | | | | | | | | | | | | | | | | | | delimited). Adds --experimental_build_event_binary_file option that enables varint delimited proto loggging to the specified file path Adds varint delimited BuildEventStreamTransport and BuildEventStreamerModule Adds BuildEventStreamerModule for configuring and setting up BuildEventStreamer and its associated BuildEventTransports. Adds BuildEventTransportFactory which creates a Set of transports from command options. Moves BuildEventStreamer configuration from BlazeCommandDispatcher and BuildEventStreamerModule -- Change-Id: If71f2b58654879c2509206da47e6d1a846bf397f Reviewed-on: https://bazel-review.googlesource.com/#/c/7010/ MOS_MIGRATED_REVID=138073726
* Also provide test summaries in the build-event streamGravatar Klaus Aehlig2016-11-02
| | | | | | | | | | | For each test target, also have a test summary as children to this event. As test summaries are posted on the event bus anyway, it is enough to make then an instance of BuildEvent. -- Change-Id: Id53e5f1760548a1fa621b1667fdb4470f51a52e8 Reviewed-on: https://bazel-review.googlesource.com/#/c/6931 MOS_MIGRATED_REVID=137961100
* Report completion of a target together with failed actionsGravatar Klaus Aehlig2016-10-27
| | | | | | | | | | | | | | | | Report the completion of all targets together with the root causes on the build event stream. To do so, have TargetCompleteEvent and ActionExecutedEvent be instances of BuildEvent; however, ignore an ActionExecutedEvent in the BuildEventStreamer if the execution was successful. By this change we get, for the first time, a build event stream that is naturally closed, i.e., without Aborted events closing up lose ends. Add a test asserting this property. -- Change-Id: Ie90dd52ee80deb0fdabdce1da551935522880a1a Reviewed-on: https://bazel-review.googlesource.com/#/c/6279 MOS_MIGRATED_REVID=137273002
* Create a distribution artifactGravatar Klaus Aehlig2016-10-24
| | | | | | | | | | | ...containing, besides the original sources, all generated machine-independent files needed for creating a bootstrap bazel without the need of having a protoc installed. -- Change-Id: Ib90e7896615b4067175a23fe2c942dbac4b71e4a Reviewed-on: https://bazel-review.googlesource.com/#/c/6730 MOS_MIGRATED_REVID=136910561
* Post the expansion of a target pattern on the event streamGravatar Klaus Aehlig2016-10-10
| | | | | | | | | | | ...by making TargetParsingCompleteEvent an instance of BuildEvent. The main value of this event on the event stream is that it is now know which actual targets to expect. -- Change-Id: I50b16f825d742d28e719692489de701d16195efa Reviewed-on: https://bazel-review.googlesource.com/#/c/6278 MOS_MIGRATED_REVID=135661452
* Show the starting of the build in the build event streamGravatar Klaus Aehlig2016-10-07
| | | | | | | | | | | | | Make the BuildStartingEvent visible in the event stream by making it an instance of the BuildEvent interface. It is the initial event of the build event stream hence it also announces that progress updates will follow. Its regular decedents are the expansion of the target patterns provided at the request. -- Change-Id: I237d8559b71ac82b10fdc492492b8435d6d1483f Reviewed-on: https://bazel-review.googlesource.com/#/c/6277 MOS_MIGRATED_REVID=135475422
* Add type annotation for the benefit of java 7Gravatar Klaus Aehlig2016-09-30
| | | | | | | Fixes #1863 -- MOS_MIGRATED_REVID=134767527
* Add infrastructural build eventsGravatar Klaus Aehlig2016-09-30
| | | | | | | | | | | | | | | | | To organize a clean build event stream, certain infrastructural events are necessary. - If the build is aborted prematurely, certain expected events will not happen; hence we have to close those leafs with an event indicating that the actual event did not happen, as the build was aborted. - Occasionally, we update on progress of the build, using special events; those are also used to chain failure events that come before the build events for which they are root cause are reported. Add those. -- Change-Id: Ibf86a313eb678822754b5e1f1e9d7f1a2cbeaaef Reviewed-on: https://bazel-review.googlesource.com/#/c/6274 MOS_MIGRATED_REVID=134667915
* Add a BuildEventTransport writing text-format protosGravatar Klaus Aehlig2016-09-29
| | | | | | | | | | This will allow a precise, but still human-readable, transcript of the build-event protocol buffers generated. -- Change-Id: I6284521f652b04ab6bf54e5eeed7b92f2d7e2245 Reviewed-on: https://bazel-review.googlesource.com/#/c/6273 MOS_MIGRATED_REVID=134637366
* Add interfaces for the build event protocolGravatar Klaus Aehlig2016-09-28
| | | | | | | | | | | Bazel in the will provide a machine-readable stream of important build events. These interfaces set up the framework and expectations about the produced events and the entities distributing those events. -- Change-Id: If2c3b2e11c31b0136b57eadeef2d2f8f8fe5e2e7 Reviewed-on: https://bazel-review.googlesource.com/#/c/6272 MOS_MIGRATED_REVID=134522369
* Fix visibility of proto srcsGravatar Klaus Aehlig2016-09-27
| | | | | | | | | | Of course, the sources of the buildevent protos should be visible by the including srcs targets. -- Change-Id: I76f5155990dd767d5eb46ad7150980589050217e Reviewed-on: https://bazel-review.googlesource.com/#/c/6290 MOS_MIGRATED_REVID=134414797
* Add basic protocol buffer for the build event protocolGravatar Klaus Aehlig2016-09-27
Add the basic protocol buffers needed for an event stream. This will eventually become a public interface, but is not complete yet. In particular, users should expect it to be extended over time and handle the following kind of changes should gracefully. - New fields can be added to any protocol buffer, and - new choices of event protocol buffers can be added to the payload. -- Change-Id: Ie4d1fdaa4f1aec6c5002ad94da4ef14112f8303f Reviewed-on: https://bazel-review.googlesource.com/#/c/6271 MOS_MIGRATED_REVID=134405277