Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / devtools / build / v1 / build_events.proto
1 // Copyright 2018 Google LLC.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15
16 syntax = "proto3";
17
18 package google.devtools.build.v1;
19
20 import "google/api/annotations.proto";
21 import "google/devtools/build/v1/build_status.proto";
22 import "google/protobuf/any.proto";
23 import "google/protobuf/timestamp.proto";
24
25 option cc_enable_arenas = true;
26 option go_package = "google.golang.org/genproto/googleapis/devtools/build/v1;build";
27 option java_multiple_files = true;
28 option java_outer_classname = "BuildEventProto";
29 option java_package = "com.google.devtools.build.v1";
30
31 // An event representing some state change that occurred in the build. This
32 // message does not include field for uniquely identifying an event.
33 message BuildEvent {
34   // Notification that the build system has attempted to run the build tool.
35   message InvocationAttemptStarted {
36     // The number of the invocation attempt, starting at 1 and increasing by 1
37     // for each new attempt. Can be used to determine if there is a later
38     // invocation attempt replacing the current one a client is processing.
39     int64 attempt_number = 1;
40
41     // Additional details about the invocation.
42     google.protobuf.Any details = 2;
43   }
44
45   // Notification that an invocation attempt has finished.
46   message InvocationAttemptFinished {
47     // Final status of the invocation.
48     BuildStatus invocation_status = 3;
49   }
50
51   // Notification that the build request is enqueued.
52   message BuildEnqueued {
53     // Additional details about the Build.
54     google.protobuf.Any details = 1;
55   }
56
57   // Notification that the build request has finished, and no further
58   // invocations will occur.  Note that this applies to the entire Build.
59   // Individual invocations trigger InvocationFinished when they finish.
60   message BuildFinished {
61     // Final status of the build.
62     BuildStatus status = 1;
63   }
64
65   // Textual output written to standard output or standard error.
66   message ConsoleOutput {
67     // The output stream type.
68     ConsoleOutputStream type = 1;
69
70     // The output stream content.
71     oneof output {
72       // Regular UTF-8 output; normal text.
73       string text_output = 2;
74
75       // Used if the output is not UTF-8 text (for example, a binary proto).
76       bytes binary_output = 3;
77     }
78   }
79
80   // Notification of the end of a build event stream published by a build
81   // component other than CONTROLLER (See StreamId.BuildComponents).
82   message BuildComponentStreamFinished {
83     // How did the event stream finish.
84     enum FinishType {
85       // Unknown or unspecified; callers should never set this value.
86       FINISH_TYPE_UNSPECIFIED = 0;
87
88       // Set by the event publisher to indicate a build event stream is
89       // finished.
90       FINISHED = 1;
91
92       // Set by the WatchBuild RPC server when the publisher of a build event
93       // stream stops publishing events without publishing a
94       // BuildComponentStreamFinished event whose type equals FINISHED.
95       EXPIRED = 2;
96     }
97
98     // How the event stream finished.
99     FinishType type = 1;
100   }
101
102   // The timestamp of this event.
103   google.protobuf.Timestamp event_time = 1;
104
105   // //////////////////////////////////////////////////////////////////////////
106   // Events that indicate a state change of a build request in the build
107   // queue.
108   oneof event {
109     // An invocation attempt has started.
110     InvocationAttemptStarted invocation_attempt_started = 51;
111
112     // An invocation attempt has finished.
113     InvocationAttemptFinished invocation_attempt_finished = 52;
114
115     // The build is enqueued (just inserted to the build queue or put back
116     // into the build queue due to a previous build failure).
117     BuildEnqueued build_enqueued = 53;
118
119     // The build has finished. Set when the build is terminated.
120     BuildFinished build_finished = 55;
121
122     // An event containing printed text.
123     ConsoleOutput console_output = 56;
124
125     // Indicates the end of a build event stream (with the same StreamId) from
126     // a build component executing the requested build task.
127     // *** This field does not indicate the WatchBuild RPC is finished. ***
128     BuildComponentStreamFinished component_stream_finished = 59;
129
130     // Structured build event generated by Bazel about its execution progress.
131     google.protobuf.Any bazel_event = 60;
132
133     // An event that contains supplemental tool-specific information about
134     // build execution.
135     google.protobuf.Any build_execution_event = 61;
136
137     // An event that contains supplemental tool-specific information about
138     // source fetching.
139     google.protobuf.Any source_fetch_event = 62;
140   }
141 }
142
143 // Unique identifier for a build event stream.
144 message StreamId {
145   // Which build component generates this event stream. Each build component
146   // may generate one event stream.
147   enum BuildComponent {
148     // Unknown or unspecified; callers should never set this value.
149     UNKNOWN_COMPONENT = 0;
150
151     // A component that coordinates builds.
152     CONTROLLER = 1;
153
154     // A component that runs executables needed to complete a build.
155     WORKER = 2;
156
157     // A component that builds something.
158     TOOL = 3;
159   }
160
161   // The id of a Build message.
162   string build_id = 1;
163
164   // The unique invocation ID within this build.
165   // It should be the same as {invocation} (below) during the migration.
166   string invocation_id = 6;
167
168   // The component that emitted this event.
169   BuildComponent component = 3;
170 }
171
172 // The type of console output stream.
173 enum ConsoleOutputStream {
174   // Unspecified or unknown.
175   UNKNOWN = 0;
176
177   // Normal output stream.
178   STDOUT = 1;
179
180   // Error output stream.
181   STDERR = 2;
182 }