forked from buildfarm/buildfarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildfarm.proto
202 lines (153 loc) · 5.87 KB
/
buildfarm.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
syntax = "proto3";
package build.buildfarm.v1test;
import "google/api/annotations.proto";
import "google/devtools/remoteexecution/v1test/remote_execution.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/duration.proto";
import "google/rpc/status.proto";
option java_package = "build.buildfarm.v1test";
option java_multiple_files = true;
option java_outer_classname = "OperationQueueProto";
// The OperationQueue API is used internally to communicate with Workers
service OperationQueue {
rpc Take(TakeOperationRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { get: "/v1test/{instance_name=**}/operation:take" };
}
rpc Put(google.longrunning.Operation) returns (google.rpc.Status) {
option (google.api.http) = { post: "/v1test/{instance_name=**}/operation:put" body: "*" };
}
rpc Poll(PollOperationRequest) returns (google.rpc.Status) {
option (google.api.http) = { get: "/v1test/{instance_name=**}/operation:poll" };
}
}
message TakeOperationRequest {
// The instance of the execution system to operate against. A server may
// support multiple instances of the execution system (with their own workers,
// storage, caches, etc.). The server MAY require use of this field to select
// between them in an implementation-defined fashion, otherwise it can be
// omitted.
string instance_name = 1;
// The platform features available for the execution environment. The server MAY
// choose to execute the action on any worker satisfying the requirements, so
// the client SHOULD ensure that running the action on any such worker will
// have the same result.
google.devtools.remoteexecution.v1test.Platform platform = 5;
}
message PollOperationRequest {
// The operation name in question
string operation_name = 2;
// The current state of the worker
google.devtools.remoteexecution.v1test.ExecuteOperationMetadata.Stage stage = 3;
}
message BuildFarmServerConfig {
repeated InstanceConfig instances = 1;
string default_instance_name = 3; // must be present in instances list or empty
int32 port = 2;
}
message MemoryInstanceConfig {
// the limits of the listOperations request
int32 list_operations_default_page_size = 1;
int32 list_operations_max_page_size = 2;
// the limits of the getTree request
int32 tree_default_page_size = 3;
int32 tree_max_page_size = 4;
// timeout after dispatch before which executing,
// complete or an operation poll must be received, or
// the operation is considered lost on a worker and is
// requeued
google.protobuf.Duration operation_poll_timeout = 5;
// delay after timeout when executing before which
// completed must be received, or the operation is
// considered lost on a worker and is requeued
google.protobuf.Duration operation_completed_delay = 6;
// limit for CAS total content size
int64 cas_max_size_bytes = 7;
// default timeout for actions
// if a timeout is unspecified for an action, this value
// is imposed on it, after which the operation will be
// cancelled
google.protobuf.Duration default_action_timeout = 8;
// maximum selectable timeout
// a maximum threshold for an action's specified timeout,
// beyond which an action will be rejected for execution
google.protobuf.Duration maximum_action_timeout = 9;
}
message InstanceConfig {
string name = 1;
enum HashFunction {
UNKNOWN = 0;
MD5 = 1;
SHA1 = 2;
SHA256 = 3;
}
HashFunction hash_function = 2;
oneof type {
MemoryInstanceConfig memory_instance_config = 3;
}
}
enum CASInsertionPolicy {
UNKNOWN = 0;
ALWAYS_INSERT = 1;
INSERT_ABOVE_LIMIT = 2;
};
message WorkerConfig {
// the instance this requests work from
string instance_name = 1;
// the hash function used for digests
InstanceConfig.HashFunction hash_function = 2;
// server address for all buildfarm requests
// like actioncache or execution in bazel, this
// server is expected to provide all buildfarm
// service endpoints
string operation_queue = 3;
// base directory for all work being performed
string root = 4;
// path to cached files from CAS
// if relative, is made relative to root
string cas_cache_directory = 5;
// limit for contents of files retained
// from CAS in the cache
int64 cas_cache_max_size_bytes = 6;
// total size of the inline content for
// action results
int32 inline_content_limit = 7;
// whether to stream stdout from processes
bool stream_stdout = 8;
// policy for process stdout
CASInsertionPolicy stdout_cas_policy = 9;
// whether to stream stderr from processes
bool stream_stderr = 10;
// policy for process stdout
CASInsertionPolicy stderr_cas_policy = 11;
// policy for process output files
CASInsertionPolicy file_cas_policy = 12;
// whether the worker should attempt to requeue
// an operation when an unexpected failure
// occurs during an execution
bool requeue_on_failure = 13;
// page size for getTree request
uint32 tree_page_size = 14;
// period of poll requests during execution
google.protobuf.Duration operation_poll_period = 15;
// initial platform used to match operations
google.devtools.remoteexecution.v1test.Platform platform = 16;
// execute width
int32 execute_stage_width = 17;
// symlink cas input-only directories
bool link_input_directories = 18;
// default timeout for actions
// if a timeout is unspecified for an action, this value
// is imposed on it, after which the operation will
// be killed
google.protobuf.Duration default_action_timeout = 19;
// maximum selectable timeout
// a maximum threshold for an action's specified timeout,
// beyond which an action will be rejected for execution
google.protobuf.Duration maximum_action_timeout = 20;
}
message TreeIteratorToken {
repeated google.devtools.remoteexecution.v1test.Digest directories = 1;
}
message OperationIteratorToken {
string operation_name = 1;
}