diff options
author | Klaus Aehlig <aehlig@google.com> | 2017-07-04 05:12:33 -0400 |
---|---|---|
committer | John Cater <jcater@google.com> | 2017-07-05 10:57:43 -0400 |
commit | bf4ff7a126337cd1c34dff614355668d73661a19 (patch) | |
tree | 0615892cdaf1d6166bf009534ceb726745b58488 /src/main/java/com/google/devtools/build | |
parent | 5096e73cc4d49302f85c9840e69cbe36e93f1042 (diff) |
Also provide the configuration id of executed actions
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
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/ActionExecutedEvent.java | 8 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ActionExecutedEvent.java b/src/main/java/com/google/devtools/build/lib/actions/ActionExecutedEvent.java index 69e7c79bbb..e00555edb0 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/ActionExecutedEvent.java +++ b/src/main/java/com/google/devtools/build/lib/actions/ActionExecutedEvent.java @@ -108,6 +108,14 @@ public class ActionExecutedEvent implements BuildEvent { if (action.getOwner() != null && action.getOwner().getLabel() != null) { actionBuilder.setLabel(action.getOwner().getLabel().toString()); } + // TODO(aehlig): ensure the configuration is shown in the stream, even if it is not + // one of the configurations of a top-level configured target. + if (action.getOwner() != null) { + actionBuilder.setConfiguration( + BuildEventStreamProtos.BuildEventId.ConfigurationId.newBuilder() + .setId(action.getOwner().getConfigurationChecksum()) + .build()); + } if (exception == null) { actionBuilder.setPrimaryOutput( BuildEventStreamProtos.File.newBuilder() diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto index 2dd862b837..ee27e6bd42 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto @@ -339,6 +339,9 @@ message ActionExecuted { // Optionally, the label of the owner of the action, for reference. string label = 5; + // Optinally, the id of the configuration of the action owner. + BuildEventId.ConfigurationId configuration = 7; + // Primary output; only provided for successful actions. File primary_output = 6; } |