aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildeventstream
Commit message (Collapse)AuthorAge
* 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
* BEP: Gracefully handle null configurationsGravatar Klaus Aehlig2017-06-28
| | | | | | | Those may occur, e.g., if the target is simply a source file. Change-Id: Ia64c54e8543dd93712b00428c443922c67e2b6cd PiperOrigin-RevId: 160278149
* Fix typo in JsonFormatFileTransport.javaGravatar Eric Dobson2017-06-28
| | | | | | | | Invlaid -> Invalid Closes #3119. PiperOrigin-RevId: 160270924
* BEP: also report test sizesGravatar Klaus Aehlig2017-06-28
| | | | | | | The size of a test is a relevant property of a test target. Report it. Change-Id: Ia529a11f4a6920bca7d233e3493640d319cca5ae PiperOrigin-RevId: 160268370
* Add InvocationPolicy to BEP message OptionsParsed.Gravatar ccalvarin2017-06-20
| | | | PiperOrigin-RevId: 159437945
* protobuf: Use bazel's native java_proto_library rules.Gravatar Jakob Buchgraber2017-06-06
| | | | | | | | | Additional changes: - Introduce a Skylark macro java_library_srcs that provides the source jars of a java_*_library rule. - Remove bazel's own java_proto_library implementation. Change-Id: I18f2259bc75ca0fb32dcd8a6a857c609bd2c7773 PiperOrigin-RevId: 158146210
* BEP: report visibility errorsGravatar Klaus Aehlig2017-06-01
| | | | | | | | On finding a visibility error, report it directly for that target, instead of relying on the implict "abort" message for targets that have not been built. Change-Id: I5e45722a1117afca3bc8eeebd05179425b995172 PiperOrigin-RevId: 157592518
* BEP: also report make variablesGravatar Klaus Aehlig2017-05-29
| | | | | | | | | An important part of a configuration are the "make variables", containing values such as TARGET_CPU. Report them as part of the description of the configuration. Change-Id: Id918cc340acac87cf95cc66581345f8060cb4877 PiperOrigin-RevId: 157378950
* BEP: report more test-result files and add a constants classGravatar aehlig2017-05-26
| | | | | | | | | | | In a test result, report more standard files, if present. Also, add a class with the constants used to name those files. Note that we have to identify files generated by a test with strings rather than an enum, as we want to support extensions of bazel to add their own files reported by tests. RELNOTES: None. PiperOrigin-RevId: 157204042
* BEP: explicitly mark the important outputs as deprecatedGravatar aehlig2017-05-23
| | | | | | | | While the fact that they are only added temporarily is obvious from the comment, a machine-readable deprecation annotation is more likely to be honored. So add it. PiperOrigin-RevId: 156846712
* Fix typoGravatar kchodorow2017-05-17
| | | | | | Pointed out by @jbduncan (https://github.com/bazelbuild/bazel/commit/1d287fc8582a693fe1b2b673663ab9952417e87c#commitcomment-22131116). PiperOrigin-RevId: 156216265
* BEP: add a JSON transportGravatar Klaus Aehlig2017-05-11
| | | | | | | | | As JSON is a widely supported format, also add a transport writing the build events in JSON format. This will allow more tools to get status reports about builds. Change-Id: I7e5901cc65d927b93c8fc9bcd2d2baa7e707f09e PiperOrigin-RevId: 155750964
* BEP: Also report the configuration in testGravatar Klaus Aehlig2017-05-09
| | | | | | | | In multi-configuration builds, test can be run for different configurations as well. So we have to report the configuration for each test as well. Change-Id: I939cce7464823fbcd3c7161a50b41b94bbed8812 PiperOrigin-RevId: 155493397
* BEP: report configurations for targetsGravatar Klaus Aehlig2017-05-09
| | | | | | | | | | | In multi-architecture builds, a target might be built several times, for the different architectures. Make the target completion events for those distinguishable by indicating the architecture for which the target was built. Also add the needed event for the expansion of a target to target-configuration pairs. Change-Id: I95ef2c81166077163dd686db4671f672160efe1d PiperOrigin-RevId: 155491076
* BEP: Provide infrastructure to report configurationsGravatar Klaus Aehlig2017-05-08
| | | | | | | | | | In preparation to support multi-configuration builds, provide infrastructure allowing build events to reference BuildConfigurations. The streaming mechanism will ensure that build configurations are introduced in the stream before being referenced for the first time. Change-Id: I6b96fbebc76a05eff4f75a07e8a9cfbcd57f9c22 PiperOrigin-RevId: 155368666
* BEP: extend the proto definition to support configurationsGravatar Klaus Aehlig2017-05-05
| | | | | | | | | | | | | Extend the build event protocol to be able to report configurations; in this way, we can distinguish, for which configuration a target completed, a test passed, etc. Note that this change allows for an additional expansion step: patterns can be expanded to unconfigured targets that get configured in a separate expansion step. Change-Id: I31442796f57fe9acebc3cb5044e03087c4e4fd59 PiperOrigin-RevId: 155186365
* BEP: Add WorkspaceStatusGravatar Klaus Aehlig2017-05-03
| | | | | | | | Add an event reporting the workspace status as key-value pairs reported via the workspace_status_command. Change-Id: I5791551798a594bc2465f483eb97f9d4fd4c7cfd PiperOrigin-RevId: 154845224
* BuildEventStreamer: support also providing stdout/stderrGravatar Klaus Aehlig2017-05-02
| | | | | | | | | | | | | Extend the build-event streamer to also report about stdout/stderr, if provided. This information is reported in the progress events. At the moment, we only report stdout/stderr in progress events we send anyway, but the interface is generic enough that we could add time-based reporting later, if needed. Also note, that at the end of the build, we report the final progress event, so that all stdout/stderr generated before the build-complete event get also reported in the build-event protocol. Change-Id: If5dbd59c151edbce02d0a9b2e5938b63c0a5dc58 PiperOrigin-RevId: 154811110
* Assign otherwise ignored Future return values to local variables.Gravatar Googler2017-04-30
| | | | PiperOrigin-RevId: 154553183
* Re-introduce the overall_success field in BEP.Gravatar buchgr2017-04-28
| | | | | | | | Removal of BuildFinished.overall_success broke internal tests and thus we decided to reintroduce the field and deprecate it. RELNOTES: None. PiperOrigin-RevId: 154432961
* BEP: Also show the rule for each targetGravatar Klaus Aehlig2017-04-28
| | | | | | | | | When available, also show the rule in the TargetComplete event. This information might help to better interpret the output groups and the target in general. Change-Id: I36c06b9658fc72605f29e7e34ad7e5c83faa030c PiperOrigin-RevId: 154422414
* BEP: Report exit code in BuildCompleteEventGravatar Jakob Buchgraber2017-04-27
| | | | | | | | | | | | | We decided to use the exit code as opposed to a status enum as bazel reports the build status as an exit code internally and the number of exit codes is dynamic. That is, a bazel module might add additional exit codes and thus we need to support reporting these. The overall_success field is now redundant and has thus been removed. A build was successfull iff ExitCode.code equals zero. Change-Id: I268db972b09d983f6cd07df34e3a384efb607358 PiperOrigin-RevId: 154413356
* Automated g4 rollback of commit d9fea57268ff01c001fbcbdc2bd057c86c362e6f.Gravatar buchgr2017-04-25
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fix for test flakiness. BEP transport closed events are delivered via their own threadpool and thus might not have been sent immediately. BuildEventStreamerTest#testSimpleStream now waits for a bit until the event has been delivered. I ran the test with --runs_per_test=1000 several times and had no further failures. *** Original change description *** Automated g4 rollback of commit 3d596d63f883fff56001ed7b2e5cf51dba45f082. *** Reason for rollback *** Made BuildEventStreamerTest#testSimpleStream 3% flaky based on --runs_per_test=1000. RELNOTES: None PiperOrigin-RevId: 154170833
* Automated g4 rollback of commit 3d596d63f883fff56001ed7b2e5cf51dba45f082.Gravatar ajmichael2017-04-25
| | | | | | | | *** Reason for rollback *** Made BuildEventStreamerTest#testSimpleStream 3% flaky based on --runs_per_test=1000. RELNOTES: None PiperOrigin-RevId: 154090559
* BEP: Show protocol upload in the UIGravatar buchgr2017-04-24
| | | | | | | | | | | | | | | | | | | | | | The BEP (build event protocol) upload may at times take longer than the build itself. This is especially true for cached builds, where there is little build work, but the protocol still needs to be uploaded. In this case the bazel UI will now display that it's waiting for BEP upload, both in the current and the new experimental UI (--experimental_ui). When executing a run command, blaze waits for the BEP upload to finish before it runs the target. Major Modifications: - The BuildEventTransport interface now also has a name() method that returns a string. When waiting for a transport to finish the BEP upload, this string is displayed in the UI. - The BuildEventStreamer now emits two new events AnnounceBuildEventTransportsEvent and BuildEventTransportClosed on the event bus. This is how the experimental UI is informed about BEP upload progress. RELNOTES: None PiperOrigin-RevId: 154052401
* BEP: Temporarily readd default outputs for targetsGravatar Klaus Aehlig2017-04-24
| | | | | | | | | | For the TargetComplete event (not for the completion of aspects) readd the reporting of outputs, but only for the default output group. This will help existing applications to still report the outputs of a target, till they transferred to handling named sets of files. Change-Id: I1b0730b38bdc18f8fb2ccf859a7fee8f1b7f0cac PiperOrigin-RevId: 153828334
* Split out option usage restriction from option category.Gravatar ccalvarin2017-04-18
| | | | | | | | | These are two different concepts. Do not remove category overload compatibility in this CL, to keep this change limited to converting the current uses of category. With some flyby formatting fixes on affected OptionsBases. RELNOTES: None. PiperOrigin-RevId: 153390002
* BEP: report shard and numbers 1-basedGravatar Klaus Aehlig2017-04-14
| | | | | | | | | In this way, all indices are reported with 1 being the smallest possible. Also, the numbers fit better with the file names generated for log files etc. Change-Id: I7671e5a79dd47c3e3afac16108acaeacdf018fc5 PiperOrigin-RevId: 153080339
* BEP: for local transports optionally drop path conversionGravatar Klaus Aehlig2017-04-13
| | | | | | | | | For transports that are purely local (like the ones writing to a local file), it sometimes can be useful to skip path conversion and use the local paths directly. Support this for the text and binary format file transports. Change-Id: I2ac2e187ebb11ff82c4e1ddf4881ea54f9d4205d PiperOrigin-RevId: 153044267