aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildeventstream
Commit message (Collapse)AuthorAge
* Makes leaf level AutoCodec marshallers into runtime codecs.Gravatar shahan2018-03-15
| | | | | | Next change will convert containers. PiperOrigin-RevId: 189261293
* ActionOwner references only BuildEvent instead of full BuildConfigurationGravatar shahan2018-03-10
| | | | | | This reduces the size of its serialized representation. PiperOrigin-RevId: 188597127
* Refactoring FileTransport to use the AsynchronousFileOutputStream.Gravatar olaola2018-03-07
| | | | | | | | Very thin wrapper, nothing except swallow+log all errors. TESTED=presubmit RELNOTES: None PiperOrigin-RevId: 188177872
* BEP: Add a --build_event_publish_all_actions flag to allow all actions to be ↵Gravatar ruperts2018-03-02
| | | | | | | published via the BEP, instead of only publishing failed actions and extra actions. RELNOTES: Add a --build_event_publish_all_actions flag to allow all actions to be published via the BEP. PiperOrigin-RevId: 187683799
* Replace path implementation.Gravatar tomlu2018-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Path and PathFragment have been replaced with String-based implementations. They are pretty similar, but each method is dissimilar enough that I did not feel sharing code was appropriate. A summary of changes: PATH ==== * Subsumes LocalPath (deleted, its tests repurposed) * Use a simple string to back Path * Path instances are no longer interned; Reference equality will no longer work * Always normalized (same as before) * Some operations will now be slower, like instance compares (which were previously just a reference check) * Multiple identical paths will now consume more memory since they are not interned PATH FRAGMENT ============= * Use a simple string to back PathFragment * No more segment arrays with interned strings * Always normalized * Remove isNormalized * Replace some isNormalizied uses with containsUpLevelReferences() to check if path fragments try to escape their scope * To check if user input is normalized, supply static methods on PathFragment to validate the string before constructing a PathFragment * Because PathFragments are always normalized, we have to replace checks for literal "." from PathFragment#getPathString to PathFragment#getSafePathString. The latter returns "." for the empty string. * The previous implementation supported efficient segment semantics (segment count, iterating over segments). This is now expensive since we do longer have a segment array. ARTIFACT ======== * Remove Path instance. It is instead dynamically constructed on request. This is necessary to avoid this CL becoming a memory regression. RELNOTES: None PiperOrigin-RevId: 185062932
* BEP: report analysis failure eventsGravatar Klaus Aehlig2018-01-26
| | | | | | | | | | | | | | ...as completion of the respective top-level targets. In this way, a failure is associated to its root cause, even if the cause is at analysis phase; in particular, visibility errors are correctly associated. For the time beeing, we associate visibility root causes only with labels; it is planned to change that to the more accurate configured labels in a follow-up change. Change-Id: I04121a7cd2099fc65171eae0719fd77b98aef09b PiperOrigin-RevId: 183359798
* BEP: add a separate id for visibility errorsGravatar Klaus Aehlig2018-01-10
| | | | | | | | | | A build might fail because of a visibility violation that does not happen at a top-level target. To avoid confusion, add a separate namespace for configured targets that are just mentioned to report the details of an error. Change-Id: I86587f7489500f1d888bae6ce3d6f4bd79ea1609 PiperOrigin-RevId: 181448003
* BEP: In the TestResult meta data, allow reporting remote cache hitsGravatar aehlig2017-12-06
| | | | | | | | | Extend the optional meta data that TestResults may report by a flag indicating that the test was taken from a remote cache. Also, allow reporting the precise exit code of the test action. PiperOrigin-RevId: 178075896
* BEP: Extend TestResult to optionally contain meta dataGravatar aehlig2017-11-29
| | | | | | | | Extend the protocol to support also showing meta data about an action execution, if the underlying test action is able to report it. PiperOrigin-RevId: 177294531
* BuildToolLogs: clean up interfaceGravatar aehlig2017-11-14
| | | | | | | | For build log files that are inlined, we eventually have to report ByteStrings, so avoid the detour through strings, potentially causing encoding issues. PiperOrigin-RevId: 175647576
* BEP: add commandline for reported actionsGravatar Klaus Aehlig2017-11-10
| | | | | | | | | | The build event protocol reports certain actions that are particularly important to the user, in particular failed ones. Also report the precise command line of those actions, if available. This is useful for IDEs wanting to report errors in a more precise way. Change-Id: I04224185ea46c608ad0dfcdb2e772071ca0736b3 PiperOrigin-RevId: 175203502
* BEP: also report the mnemonic of reported actionsGravatar Klaus Aehlig2017-11-09
| | | | | | | | | Knowing the kind of action that was reported (and hence likely failed) helps users quickly understand what possibly went wrong. So report this information. Change-Id: Ie4869234df895f404ac5d2ff6f05026e4e82ef7e PiperOrigin-RevId: 175043006
* BEP: Add an additional event with tool statisticsGravatar aehlig2017-10-27
| | | | | | | | | | After the completion of the build, also report useful logs/statistics. Do so in a separate event, so that the protocol allows reporting build completion early and purely staticial information later, maybe event after some computations. Change-Id: Ibd221546de76fcffcda7819c300187eac45ebd68 PiperOrigin-RevId: 173548733
* BuildEventStreamer: allow final messagesGravatar aehlig2017-10-26
| | | | | | | | | | After receiving a BuildCompletingEvent, allow some final late messages, but only those not yet seen and announced by that BuildCompletingEvent. This mechanism will be used in a follow-up change to add a message with tool statistics. Change-Id: I979bec5bd946208068faff9a4ddd5245a769f096 PiperOrigin-RevId: 173514552
* BEP: correctly report unbuilt targets if --nobuild is givenGravatar Klaus Aehlig2017-10-25
| | | | | | | | | If bazel is asked to only analyze a target, but not do any builds, correctly report this as the cause why the obtained configured targets were never completed. Change-Id: I6308f8c222861dc0205a63664d5ea9861dd38b6a PiperOrigin-RevId: 173364084
* BEP: correctly report the cause of unbuilt targets if --noanalyze is givenGravatar Klaus Aehlig2017-10-20
| | | | | | | | | If bazel is asked to only load target, but not perform an analysis phase, correctly report this as the cause why the obtained targets wer never configured. Change-Id: Ib630a6dc1b955b810a6cc40254c0ae746e2eca1e PiperOrigin-RevId: 172787777
* BuildEventStreamer: clear a pending BuildStarted event firstGravatar Klaus Aehlig2017-10-16
| | | | | | | | | | | | | | | | | | | | If we receive an event indicating that the build is over, we first post that event and then clear up all pending event by stating that their prerequisite event was aborted (which we can safely assert, as we know we will not process any further events). Now, if a build is aborted (e.g., user interruption) before the build starting event is generated, the streamer can receive a build-finished event while still having an event (e.g., the raw command line) blocked on the build-starting event. So the canonical order of clearing the stream would send a build-finished event before the build-starting event, which can be confusing to consumers of the stream. Therefore, if have to generate an artificial aborted build-starting event, do so first (including clearing the events blocked on the build-starting event) and only afterwards post the build-finished event in the stream. Change-Id: Ib33f16f74b7bee7a963df94bbcad7a56db9f07e3 PiperOrigin-RevId: 172305114
* BEP: explicitly report failures associated with a label as suchGravatar Klaus Aehlig2017-10-16
| | | | | | | | | | There is a conceptual difference between the (maybe unsuccessful) completion of a top-level target and a label as the root cause for a failure (i.e., a missing source file). Indicate that difference as such, by having a separate message for failures associated with an unconfigured label. Change-Id: I3f2e20d4dc85782eb11b104a7baf089e66d972e7 PiperOrigin-RevId: 172299938
* Report the structured Bazel command line via the BEP.Gravatar ccalvarin2017-10-10
| | | | | | | | | This is part of the effort outlined in https://bazel.build/designs/2017/07/13/improved-command-line-reporting.html. The refactoring of the options parser is not yet complete, so we still do not have complete & correct information about the canonical command line. Where the information is blatantly incorrect, a best approximation was made, with comments and tests documenting the deficiencies. Change the names of the initial CommandLine fields in the BEP to be explicitly identified as unstructured. RELNOTES: None. PiperOrigin-RevId: 171625377
* BEP: also report baseline coverageGravatar Klaus Aehlig2017-09-27
| | | | | | | ...as part of the TargetComplete message. Change-Id: I8aa321a2810c3926db943f32cb1811a169e34dd7 PiperOrigin-RevId: 170171458
* BEP: Add coverage data to test_resultGravatar Klaus Aehlig2017-09-26
| | | | | | | | Include the coverage data file into the list of files repeorted in the test_result event in the BEP. Change-Id: Ia7b653addd5589268ce919b3e0349371dbc18bf2 PiperOrigin-RevId: 169956864
* Unify buildevnts indicating build completionGravatar Klaus Aehlig2017-09-19
| | | | | | | ...by factoring out the common code parts. Change-Id: I2ead39ea218dd535af9684a81a7bbe29b558aa27 PiperOrigin-RevId: 169106854
* bep: Properly URI encode file pathsGravatar buchgr2017-09-14
| | | | | | RELNOTES: The Build Event Protocol's File.uri field is now properly encoded according to RFC2396. PiperOrigin-RevId: 168674865
* 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
* Automated rollback of commit f5a0b380aadf3dd976b45fd19b2dd5150ced8f41.Gravatar Googler2017-09-11
| | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks BEP parsing in IntelliJ (b/65521927). *** Original change description *** bep: encode file paths in URI format We need to ensure that special characters are encoded according to the URI specification RFC2396. Change-Id: Ie93cbe11a70f448d2e7bacd0bba5699ec20cac25 PiperOrigin-RevId: 168195227
* 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
* Fix assorted ErrorProne warnings.Gravatar lberki2017-09-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 167574104
* Rename all logger instances to "logger" (instead "LOG" or "log").Gravatar lberki2017-09-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 167505493
* 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
* bep: encode file paths in URI formatGravatar Jakob Buchgraber2017-09-04
| | | | | | | | We need to ensure that special characters are encoded according to the URI specification RFC2396. Change-Id: Ie93cbe11a70f448d2e7bacd0bba5699ec20cac25 PiperOrigin-RevId: 167301074
* BEP: Add TargetConfigured events also for aspectsGravatar Klaus Aehlig2017-09-01
| | | | | | | | | Adding an event about which completed aspects to expect allows for earlier feedback of what the aspect is doing. It also allows consumers of the build event stream to prepare for the TargetCompleted events of the aspect. Change-Id: I29ef15472867a7169222e0394c7fe061fd1d2994 PiperOrigin-RevId: 167248206
* BEP: Rename enum entryGravatar aehlig2017-09-01
| | | | | | ...to not mention a wrong product name. PiperOrigin-RevId: 167242739
* Publish TARGET_SKIPPED status to Goops and Master Log for targets with ↵Gravatar Googler2017-09-01
| | | | | | incompatible CPU constraints. PiperOrigin-RevId: 167189106
* devtools/build/lib/buildeventstream/proto: fix spelling in commentGravatar matloob2017-08-30
| | | | | | This change changes the misspelling "conents" to "contents". PiperOrigin-RevId: 166887321
* BEP: add tool_tag explicitlyGravatar Klaus Aehlig2017-08-30
| | | | | | | | | Add the tool tag explicitly in the OptionsParsed event. In this way, consumers of the stream can more easily associate an invocation with a tool. Change-Id: I6040e91f657082782bf8010a6576001118672e2d PiperOrigin-RevId: 166862895
* BEP: Make tags available in TargetConfigured eventGravatar Klaus Aehlig2017-08-14
| | | | | | | | | | | | The tags associated with a rule is information that is useful as information about the target, independent of the configuration. At the moment, tags cannot be configuration-dependent anyway, but even if the extend bazel it that way, the union of all possible tags is still useful information. Change-Id: Iabca0c28b0da4b13b8a62b2638a881c53cc70ccc PiperOrigin-RevId: 164996472
* BEP: move configuration-independent information to TargetConfigured eventGravatar Klaus Aehlig2017-08-11
| | | | | | | | | | Some information about a target is configuration independent and therefore can already be provided at a target level (i.e., in the TargetConfigured event). Do so, to have that information available earlier and, once the deprecation period is over, avoid redundant information in the stream. Change-Id: I8021ce3dd2a8168d409ea513190c4e3a349dbc2f PiperOrigin-RevId: 164967059
* BEP: expose the number of cached test action in the summaryGravatar Klaus Aehlig2017-08-02
| | | | | | | | In the TestSummary, also indicate the total number of cached actions. Fixes #3435. Change-Id: I5fb3f54f54a852b7cbeb58b03b50b042e5d26455 PiperOrigin-RevId: 163871517
* Add configuration and target label to ActionCompletedId.Gravatar Eduardo Colaco2017-07-27
| | | | | | | | This is a first step on moving the configuration checksum and target label from the ActionExecuted payload and into ActionCompletedId. Change-Id: I989c9b708cd2a4172f6483d97bc7842d9841e3a8 PiperOrigin-RevId: 163233097
* BEP: add events about fetches to the streamGravatar Klaus Aehlig2017-07-26
| | | | | | | | | Fetching is an important action, if it happens, as external resources are accessed. Therefore, report this activity in the build event stream. Change-Id: Ia443fe01e6478016993231377d8f65c5d4634e00 PiperOrigin-RevId: 163184329
* BEP: Report AbortedEvent with SKIPPED status for targets with incompatible ↵Gravatar Googler2017-07-26
| | | | | | CPU constraints. PiperOrigin-RevId: 163100038
* BEP: Merge all failures into the Aborted eventGravatar Klaus Aehlig2017-07-24
| | | | | | | | | In this way, for each event there can only be two event payloads for every event identifier: the expected one, and the Aborted event. The type of failure will be reported in the AbortReason enum value. Change-Id: Icce225ec156d1fc20c8facd18df13343712f775c PiperOrigin-RevId: 162911732
* 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
* BuildEventWithConfiguration: represent configurations as BuildEventGravatar Klaus Aehlig2017-07-11
| | | | | | | | | | | From a BEP point of view, the only interface of a configuration we care about is its BuildEvent structure. Represent it as such, so that we can move this class to the rest of the buildeventstream module. This is a prerequisite for ActionOwners refering to configurations in the BEP. Change-Id: I6d1c1bf2951aac91607e83cad664553cd6620df8 PiperOrigin-RevId: 161510049
* BEP: Report test warningsGravatar aehlig2017-07-10
| | | | | | | | Also report test warnings, if any, for completed test actions in the build event protocol. RELNOTES: None PiperOrigin-RevId: 161384061
* BEP: Positively identify the last messageGravatar Klaus Aehlig2017-07-10
| | | | | | | | | | | Set an additional flag in the last BEP message to indicate the end of the proto sequence. While the last event is implicit from the child-relation (the sequence of protos is finished, if at least one event is seen and all announced events have occurred in the stream), an explicit marking of the last event simplifies processing. Change-Id: I6554476f975dc9e52fdb27fb3221bd27f6097ed9 PiperOrigin-RevId: 161377092
* Also provide the configuration id of executed actionsGravatar Klaus Aehlig2017-07-05
| | | | | | | | | | In some cases, when the configuration is known anyway, it might help debug why an action failed. For the time being, we only report of id of the configuration without guaranteeing that details about the configuration are shown in the sream. Change-Id: I23bcad2f6407e03c7defcdd795629dfca2b1ea92 PiperOrigin-RevId: 160874546
* BEP JSON file: omit unnecessary white spaceGravatar Klaus Aehlig2017-07-05
| | | | | | | | | To keep the build-event JSON file more compact, do not generate unnecessary white space. This also simplifies navigation through the file as now we have precisely one JSON object per line. Change-Id: I385f3f86d32f70c935e406a22234745f1d6e6515 PiperOrigin-RevId: 160832955
* Writing build events to a file is no longer experimentalGravatar aehlig2017-06-28
| | | | | | | | Reflect this by renaming the options appropriately. While there, also add categories to those options. RELNOTES: writing build events to a file is no longer experimental PiperOrigin-RevId: 160400332
* 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