12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
+ // LINT: LEGACY_NAMES
16
+
15
17
syntax = "proto3" ;
16
18
17
19
package build_event_stream ;
18
20
21
+ import "google/protobuf/any.proto" ;
19
22
import "google/protobuf/duration.proto" ;
20
23
import "google/protobuf/timestamp.proto" ;
24
+ import "proto/action_cache.proto" ;
21
25
import "proto/command_line.proto" ;
22
26
import "proto/invocation_policy.proto" ;
23
27
import "proto/failure_details.proto" ;
@@ -200,6 +204,24 @@ message BuildEventId {
200
204
int32 attempt = 4 ;
201
205
}
202
206
207
+ // Identifier of an event reporting progress of an individual test run.
208
+ message TestProgressId {
209
+ // The label of the target for the action.
210
+ string label = 1 ;
211
+ // The configuration under which the action is running.
212
+ ConfigurationId configuration = 2 ;
213
+ // The run number of the test action (e.g. for runs_per_test > 1).
214
+ int32 run = 3 ;
215
+ // For sharded tests, the shard number of the test action.
216
+ int32 shard = 4 ;
217
+ // The execution attempt number which may increase due to retries (e.g. for
218
+ // flaky tests).
219
+ int32 attempt = 5 ;
220
+ // An incrementing count used to differentiate TestProgressIds for the same
221
+ // test attempt.
222
+ int32 opaque_count = 6 ;
223
+ }
224
+
203
225
// Identifier of an event reporting the summary of a test.
204
226
message TestSummaryId {
205
227
string label = 1 ;
@@ -229,6 +251,9 @@ message BuildEventId {
229
251
// Identifier of an event signalling that the coverage actions are finished.
230
252
message CoverageActionsFinishedId {}
231
253
254
+ // Identifier of an event providing the ExecRequest of a run command.
255
+ message ExecRequestId {}
256
+
232
257
// BUILDBUDDY-SPECIFIC EVENTS BELOW
233
258
234
259
// Identifier of an event providing a list of bazel commands that are
@@ -281,6 +306,7 @@ message BuildEventId {
281
306
UnconfiguredLabelId unconfigured_label = 19 ;
282
307
ConfiguredLabelId configured_label = 21 ;
283
308
TestResultId test_result = 8 ;
309
+ TestProgressId test_progress = 29 ;
284
310
TestSummaryId test_summary = 7 ;
285
311
TargetSummaryId target_summary = 26 ;
286
312
BuildFinishedId build_finished = 9 ;
@@ -290,6 +316,7 @@ message BuildEventId {
290
316
BuildMetadataId build_metadata = 24 ;
291
317
ConvenienceSymlinksIdentifiedId convenience_symlinks_identified = 25 ;
292
318
CoverageActionsFinishedId coverage_actions_finished = 27 ;
319
+ ExecRequestId exec_request = 28 ;
293
320
294
321
// BUILDBUDDY EVENTS BELOW
295
322
// Starting at field #1000 to avoid conflicting with potential future
@@ -599,6 +626,15 @@ message ActionExecuted {
599
626
600
627
// Only populated if success = false, and sometimes not even then.
601
628
failure_details.FailureDetail failure_detail = 11 ;
629
+
630
+ // Start of action execution, before any attempted execution begins.
631
+ google.protobuf.Timestamp start_time = 12 ;
632
+
633
+ // End of action execution, after all attempted execution completes.
634
+ google.protobuf.Timestamp end_time = 13 ;
635
+
636
+ // Additional details about action execution supplied by any/all strategies.
637
+ repeated google.protobuf.Any strategy_details = 14 ;
602
638
}
603
639
604
640
// Collection of all output files belonging to that output group.
@@ -768,6 +804,15 @@ message TestResult {
768
804
ExecutionInfo execution_info = 8 ;
769
805
}
770
806
807
+ // Event payload providing information about an active, individual test run.
808
+ message TestProgress {
809
+ // Identifies a resource that may provide information about an active test
810
+ // run. The resource is not necessarily a file and may need to be queried
811
+ // for information. The URI is not guaranteed to be available after the test
812
+ // completes. The string is encoded according to RFC2396.
813
+ string uri = 1 ;
814
+ }
815
+
771
816
// Payload of the event summarizing a test.
772
817
message TestSummary {
773
818
// Wrapper around BlazeTestStatus to support importing that enum to proto3.
@@ -883,6 +928,9 @@ message BuildFinished {
883
928
google.protobuf.Timestamp finish_time = 5 ;
884
929
885
930
AnomalyReport anomaly_report = 4 [deprecated = true ];
931
+
932
+ // Only populated if success = false, and sometimes not even then.
933
+ failure_details.FailureDetail failure_detail = 6 ;
886
934
}
887
935
888
936
message BuildMetrics {
@@ -938,6 +986,8 @@ message BuildMetrics {
938
986
string exec_kind = 3 ;
939
987
}
940
988
repeated RunnerCount runner_count = 6 ;
989
+
990
+ blaze.ActionCacheStatistics action_cache_statistics = 7 ;
941
991
}
942
992
ActionSummary action_summary = 1 ;
943
993
@@ -1010,6 +1060,9 @@ message BuildMetrics {
1010
1060
PackageMetrics package_metrics = 4 ;
1011
1061
1012
1062
message TimingMetrics {
1063
+ // For Skymeld,
1064
+ // analysis_phase_time_in_ms + execution_phase_time_in_ms >= wall_time_in_ms
1065
+ //
1013
1066
// The CPU time in milliseconds consumed during this build.
1014
1067
int64 cpu_time_in_ms = 1 ;
1015
1068
// The elapsed wall time in milliseconds during this build.
@@ -1018,6 +1071,10 @@ message BuildMetrics {
1018
1071
// When analysis and execution phases are interleaved, this measures the
1019
1072
// elapsed time from the first analysis work to the last.
1020
1073
int64 analysis_phase_time_in_ms = 3 ;
1074
+ // The elapsed wall time in milliseconds during the execution phase.
1075
+ // When analysis and execution phases are interleaved, this measures the
1076
+ // elapsed time from the first action execution to the last.
1077
+ int64 execution_phase_time_in_ms = 4 ;
1021
1078
}
1022
1079
TimingMetrics timing_metrics = 5 ;
1023
1080
@@ -1240,6 +1297,22 @@ message ConvenienceSymlink {
1240
1297
string target = 3 ;
1241
1298
}
1242
1299
1300
+ // Event that contains the ExecRequest of a run command announced only after a
1301
+ // successful build and before trying to execute the requested command-line.
1302
+ message ExecRequestConstructed {
1303
+ bytes working_directory = 1 ;
1304
+ repeated bytes argv = 2 ;
1305
+ repeated EnvironmentVariable environment_variable = 3 ;
1306
+ repeated bytes environment_variable_to_clear = 4 ;
1307
+ bool should_exec = 5 ;
1308
+ }
1309
+
1310
+ // An environment variable provided by a run command after a successful build.
1311
+ message EnvironmentVariable {
1312
+ bytes name = 1 ;
1313
+ bytes value = 2 ;
1314
+ }
1315
+
1243
1316
// BUILDBUDDY-SPECIFIC EVENTS BELOW
1244
1317
1245
1318
// Event describing a workflow invocation as well as the bazel commands to be
@@ -1418,6 +1491,7 @@ message BuildEvent {
1418
1491
NamedSetOfFiles named_set_of_files = 15 ;
1419
1492
TargetComplete completed = 8 ;
1420
1493
TestResult test_result = 10 ;
1494
+ TestProgress test_progress = 30 ;
1421
1495
TestSummary test_summary = 9 ;
1422
1496
TargetSummary target_summary = 28 ;
1423
1497
BuildFinished finished = 14 ;
@@ -1426,6 +1500,7 @@ message BuildEvent {
1426
1500
WorkspaceConfig workspace_info = 25 ;
1427
1501
BuildMetadata build_metadata = 26 ;
1428
1502
ConvenienceSymlinksIdentified convenience_symlinks_identified = 27 ;
1503
+ ExecRequestConstructed exec_request = 29 ;
1429
1504
1430
1505
// BUILDBUDDY-SPECIFIC EVENTS BELOW.
1431
1506
// Starting at field #1000 to avoid conflicting with potential future
0 commit comments