mirrored from https://chromium.googlesource.com/infra/luci/luci-go
/
swarming.pb.go
4500 lines (4103 loc) · 179 KB
/
swarming.pb.go
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2018 The LUCI Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
// This proto tries to converge with
// https://github.com/googleapis/googleapis/blob/master/google/devtools/remoteworkers/v1test2/
// as much as it is sensible to (not much). It has several inherent divergences
// as Swarming has a much wider use case and has a different fundamental model
// for bot state. Swarming has the limitation of not supporting children
// devices: as a single bot is a single execution unit, unlike RBE.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.0
// source: go.chromium.org/luci/swarming/proto/api/swarming.proto
package apipb
import prpc "go.chromium.org/luci/grpc/prpc"
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
structpb "google.golang.org/protobuf/types/known/structpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// BotStatusType is one of the states the bot can be in.
//
// A bot status implies being in this status for a certain amount of time, for
// example a hook running for N seconds, contrary to BotEventType which is about
// an event that doesn't have an inherent duration.
//
// Some values are more important than others. For example if a bot is now
// MISSING but used to be QUARANTINED, the value is still MISSING.
type BotStatusType int32
const (
// Invalid bot status, do not use.
BotStatusType_BOT_STATUS_UNSPECIFIED BotStatusType = 0
// The server detected that the bot is not pinging the server anymore. Unlike
// other statuses, this value is set after a timeout.
//
// Bot.status_msg shall not be set.
BotStatusType_MISSING BotStatusType = 1
// Bot was quarantined by the server.
//
// Bot.status_msg shall include the server provided rationale.
BotStatusType_QUARANTINED_BY_SERVER BotStatusType = 2 // Not used yet. https://crbug.com/757931
// Bot self-reported as unhealthy.
//
// What is currently called as 'quarantined' in the old API.
//
// Bot.status_msg shall include the bot provided rationale.
BotStatusType_QUARANTINED_BY_BOT BotStatusType = 3
// Bot self-reported as unable to run tasks due to externally induced
// overhead.
//
// Examples include:
// - The temperature of the DUT (Device Under Test) is too high, and the bot
// is waiting for cool down
// - host is doing self-cleaning work out of the bot's control (puppet is
// running), etc.
//
// Bot.status_msg shall include the bot provided rationale.
BotStatusType_OVERHEAD_MAINTENANCE_EXTERNAL BotStatusType = 4
// Bot self-reported as unable to run tasks due to doing internal overhead.
//
// Examples include:
// - Running hooks
// - Cleaning up or verifying its local cache
// - Bot is starting for a version upgrade
//
// Bot.status_msg shall disambiguate the type of work item done.
BotStatusType_OVERHEAD_BOT_INTERNAL BotStatusType = 5 // Not used yet. https://crbug.com/870723
// Bot is down as its host is rebooting and contact was lost.
//
// If the bot doesn't contact back soon enough, it will be considered MISSING.
//
// Bot.status_msg shall not be set.
BotStatusType_HOST_REBOOTING BotStatusType = 6 // Not used yet. https://crbug.com/870723
// Running a task.
//
// Bot.status_msg shall not be set.
BotStatusType_BUSY BotStatusType = 7
// Bot is 'reserved' for operations outside of normal operations. This can be
// relevant for SUT (System Under Test).
//
// Bot.status_msg shall not be set.
BotStatusType_RESERVED BotStatusType = 8 // Not used yet. https://crbug.com/913978
// Bot is healthy and waiting for tasks.
//
// Bot.status_msg shall not be set.
BotStatusType_IDLE BotStatusType = 9
)
// Enum value maps for BotStatusType.
var (
BotStatusType_name = map[int32]string{
0: "BOT_STATUS_UNSPECIFIED",
1: "MISSING",
2: "QUARANTINED_BY_SERVER",
3: "QUARANTINED_BY_BOT",
4: "OVERHEAD_MAINTENANCE_EXTERNAL",
5: "OVERHEAD_BOT_INTERNAL",
6: "HOST_REBOOTING",
7: "BUSY",
8: "RESERVED",
9: "IDLE",
}
BotStatusType_value = map[string]int32{
"BOT_STATUS_UNSPECIFIED": 0,
"MISSING": 1,
"QUARANTINED_BY_SERVER": 2,
"QUARANTINED_BY_BOT": 3,
"OVERHEAD_MAINTENANCE_EXTERNAL": 4,
"OVERHEAD_BOT_INTERNAL": 5,
"HOST_REBOOTING": 6,
"BUSY": 7,
"RESERVED": 8,
"IDLE": 9,
}
)
func (x BotStatusType) Enum() *BotStatusType {
p := new(BotStatusType)
*p = x
return p
}
func (x BotStatusType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (BotStatusType) Descriptor() protoreflect.EnumDescriptor {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[0].Descriptor()
}
func (BotStatusType) Type() protoreflect.EnumType {
return &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[0]
}
func (x BotStatusType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use BotStatusType.Descriptor instead.
func (BotStatusType) EnumDescriptor() ([]byte, []int) {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_rawDescGZIP(), []int{0}
}
// BotEventType defines the reason why BotEvent was created.
type BotEventType int32
const (
// Invalid bot event type, do not use.
BotEventType_BOT_EVENT_TYPE_UNSPECIFIED BotEventType = 0
// Bot connected and started a new session.
//
// BotEvent.event_msg shall not be set.
BotEventType_BOT_NEW_SESSION BotEventType = 1
// Bot had an internal failure to report to the server outside of a task
// context. This shall send a report to the administrator of the instance and
// service author.
//
// BotEvent.event_msg shall contain the error message.
BotEventType_BOT_INTERNAL_FAILURE BotEventType = 2
// Bot had an hook error to report to the server. This shall send a report to
// the administrator of the instance.
//
// BotEvent.event_msg shall contain the error message.
BotEventType_BOT_HOOK_ERROR BotEventType = 3
// Bot hook logged information. The bot hooks can log locally to the local log
// file, which itself can be streamed out of band. For special notifications
// that are worth notifying the administrator, this event can be used to raise
// these. Due to the cost of doing an RPC just for this, this should be used
// sparingly; vs local logging.
//
// BotEvent.event_msg shall contain the log entry.
BotEventType_BOT_HOOK_LOG BotEventType = 4
// Bot initiated a host reboot. An example is a bot hook requesting to reboot
// the host after a task failure.
//
// BotEvent.event_msg shall contain the reason for rebooting the host, if any.
BotEventType_BOT_REBOOTING_HOST BotEventType = 5
// Bot is shutting down. It may be restarting for an update.
//
// BotEvent.event_msg shall contain the reason.
BotEventType_BOT_SHUTDOWN BotEventType = 6
// Knowledge of the bot by the server was deleted.
//
// In this case, the bot's historical data is still kept in the Swarming
// server's DB for a year, but the bot is not shown anywhere.
BotEventType_BOT_DELETED BotEventType = 7 // Not used yet. https://crbug.com/905087
// Bot is missing. There have been no communication from the bot for longer
// than deadline configured on server side.
BotEventType_BOT_MISSING BotEventType = 8
// The server instructs the bot to stay idle. This is when there is no task
// pending for this bot. Will only be stored when there are other state
// changes.
//
// BotEvent.event_msg shall not be set.
BotEventType_INSTRUCT_IDLE BotEventType = 10
// The server instructs the bot to start a task.
//
// BotEvent.event_msg shall not be set. BotEvent.bot.current_task_id shall
// contain the task ID.
BotEventType_INSTRUCT_START_TASK BotEventType = 11
// The server instructs the bot to restart without self-updating. This is to
// initiate a new bot session.
//
// BotEvent.event_msg can be set to the rationale, if any.
BotEventType_INSTRUCT_RESTART_BOT BotEventType = 12
// The server instructs the bot to self-update.
//
// BotEvent.event_msg shall be set to the version to update to.
// BotEvent.bot.info.version contains the bot's previous version.
BotEventType_INSTRUCT_UPDATE_BOT_CODE BotEventType = 13
// The server instructs the bot to stop its process.
//
// BotEvent.event_msg shall not be set. BotEvent.bot.current_task_id shall
// contain the task ID.
BotEventType_INSTRUCT_TERMINATE_BOT BotEventType = 14
// Bot completed a task.
//
// BotEvent.event_msg shall not be set. BotEvent.bot.current_task_id shall
// contain the task ID.
BotEventType_TASK_COMPLETED BotEventType = 20
// Bot had an internal failure (RAN_INTERNAL_FAILURE) to report to the server
// while processing a task. This shall send a report to the administrator of
// the instance and service author.
//
// This event shall not be filed in case of a MISSING_INPUTS.
//
// BotEvent.event_msg shall contain the error message.
// BotEvent.bot.current_task_id shall contain the task ID.
BotEventType_TASK_INTERNAL_FAILURE BotEventType = 21
// Bot is forcibly killing the task.
//
// This can be induced by a server side request (KILLED, PREEMPTED) or by a
// bot side decision (TIMED_OUT, TIMED_OUT_SILENCE).
//
// BotEvent.event_msg shall not be set. BotEvent.bot.current_task_id shall
// contain the task ID.
BotEventType_TASK_KILLED BotEventType = 22
)
// Enum value maps for BotEventType.
var (
BotEventType_name = map[int32]string{
0: "BOT_EVENT_TYPE_UNSPECIFIED",
1: "BOT_NEW_SESSION",
2: "BOT_INTERNAL_FAILURE",
3: "BOT_HOOK_ERROR",
4: "BOT_HOOK_LOG",
5: "BOT_REBOOTING_HOST",
6: "BOT_SHUTDOWN",
7: "BOT_DELETED",
8: "BOT_MISSING",
10: "INSTRUCT_IDLE",
11: "INSTRUCT_START_TASK",
12: "INSTRUCT_RESTART_BOT",
13: "INSTRUCT_UPDATE_BOT_CODE",
14: "INSTRUCT_TERMINATE_BOT",
20: "TASK_COMPLETED",
21: "TASK_INTERNAL_FAILURE",
22: "TASK_KILLED",
}
BotEventType_value = map[string]int32{
"BOT_EVENT_TYPE_UNSPECIFIED": 0,
"BOT_NEW_SESSION": 1,
"BOT_INTERNAL_FAILURE": 2,
"BOT_HOOK_ERROR": 3,
"BOT_HOOK_LOG": 4,
"BOT_REBOOTING_HOST": 5,
"BOT_SHUTDOWN": 6,
"BOT_DELETED": 7,
"BOT_MISSING": 8,
"INSTRUCT_IDLE": 10,
"INSTRUCT_START_TASK": 11,
"INSTRUCT_RESTART_BOT": 12,
"INSTRUCT_UPDATE_BOT_CODE": 13,
"INSTRUCT_TERMINATE_BOT": 14,
"TASK_COMPLETED": 20,
"TASK_INTERNAL_FAILURE": 21,
"TASK_KILLED": 22,
}
)
func (x BotEventType) Enum() *BotEventType {
p := new(BotEventType)
*p = x
return p
}
func (x BotEventType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (BotEventType) Descriptor() protoreflect.EnumDescriptor {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[1].Descriptor()
}
func (BotEventType) Type() protoreflect.EnumType {
return &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[1]
}
func (x BotEventType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use BotEventType.Descriptor instead.
func (BotEventType) EnumDescriptor() ([]byte, []int) {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_rawDescGZIP(), []int{1}
}
// TaskStateCategory represents the 5 different categories of task state.
//
// For active state categories (RUNNING_MASK and TRANSIENT_DONE_MASK), it is
// possible to go 'back' to PENDING_MASK category; for example, a task has an
// internal error, and the server reenqueues the task for a second try.
type TaskStateCategory int32
const (
// Invalid value.
TaskStateCategory_TASK_STATE_CATEGORY_UNSPECIFIED TaskStateCategory = 0
// Bit mask for the TaskState inside each category.
TaskStateCategory_TASK_STATE_MASK TaskStateCategory = 15
// The task is enqueued and pending bot availability.
TaskStateCategory_CATEGORY_PENDING TaskStateCategory = 16
// The task is running.
TaskStateCategory_CATEGORY_RUNNING TaskStateCategory = 32
// Transient done states are uncertain states; something ran but the result
// was inconclusive.
//
// They can trigger the Swarming internal retry mechanism. In this case, the
// "task try" will have this state, but the task summary will become PENDING.
// In case the task cannot be retried, when idempotent is false, then this
// becomes a final state.
TaskStateCategory_CATEGORY_TRANSIENT_DONE TaskStateCategory = 48
// The task ran, and it is done.
TaskStateCategory_CATEGORY_EXECUTION_DONE TaskStateCategory = 64
// The task did not run, and won't.
TaskStateCategory_CATEGORY_NEVER_RAN_DONE TaskStateCategory = 80
)
// Enum value maps for TaskStateCategory.
var (
TaskStateCategory_name = map[int32]string{
0: "TASK_STATE_CATEGORY_UNSPECIFIED",
15: "TASK_STATE_MASK",
16: "CATEGORY_PENDING",
32: "CATEGORY_RUNNING",
48: "CATEGORY_TRANSIENT_DONE",
64: "CATEGORY_EXECUTION_DONE",
80: "CATEGORY_NEVER_RAN_DONE",
}
TaskStateCategory_value = map[string]int32{
"TASK_STATE_CATEGORY_UNSPECIFIED": 0,
"TASK_STATE_MASK": 15,
"CATEGORY_PENDING": 16,
"CATEGORY_RUNNING": 32,
"CATEGORY_TRANSIENT_DONE": 48,
"CATEGORY_EXECUTION_DONE": 64,
"CATEGORY_NEVER_RAN_DONE": 80,
}
)
func (x TaskStateCategory) Enum() *TaskStateCategory {
p := new(TaskStateCategory)
*p = x
return p
}
func (x TaskStateCategory) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TaskStateCategory) Descriptor() protoreflect.EnumDescriptor {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[2].Descriptor()
}
func (TaskStateCategory) Type() protoreflect.EnumType {
return &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[2]
}
func (x TaskStateCategory) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TaskStateCategory.Descriptor instead.
func (TaskStateCategory) EnumDescriptor() ([]byte, []int) {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_rawDescGZIP(), []int{2}
}
// TaskState represents the different possible states for a Task.
//
// Each state is in one of the bitmask in TaskStateCategory.
type TaskState int32
const (
// Invalid task state.
TaskState_TASK_STATE_INVALID TaskState = 0
// The task is currently pending.
//
// This means that no bot reaped the task yet. It will stay in this state
// until either a bot reaps the task, or the expiration elapsed or all bots
// become MISSING, leading to a NO_RESOURCE. The task pending expiration is
// specified as TaskSlice.expiration, one per task slice.
//
// The task may go through multiple pending TaskSlice as they expire or are
// skipped due to NO_RESOURCE (see definition below). In this situation the
// task state still stays in PENDING state as long as there's a chance for a
// bot to reap the task.
TaskState_PENDING TaskState = 16
// The task is currently pending, but another previously scheduled task was
// identified to be deduped against, but the previously scheduled task hasn't
// completed yet.
//
// In this case, the task may go back into PENDING if the previous identical
// task failed, or immediately into DEDUPED if it succeeded.
TaskState_PENDING_DEDUPING TaskState = 17 // Not used yet, https://crbug.com/915342
// The task is currently running.
//
// For new tasks, this is only the actual tasks runtime. For old tasks, this
// includes RUNNING_OVERHEAD_START and RUNNING_OVERHEAD_END.
TaskState_RUNNING TaskState = 32
// The task is assigned to a bot. The bot is fetching input files and setting
// up the runtime environment.
TaskState_RUNNING_OVERHEAD_SETUP TaskState = 33 // Not used yet, https://crbug.com/796757
// Task completed and result metadata is available. Outputs and other
// associated logs are still being uploaded and the environment is being
// teared down.
//
// A client that only needs the exit code may chose to stop waiting for the
// task, as the task will end with COMPLETED, unless there's a failure during
// outputs upload, which would result in INTERNAL_FAILURE.
TaskState_RUNNING_OVERHEAD_TEARDOWN TaskState = 34 // Not used yet, https://crbug.com/813412
// The task is being forcibly terminated. This can be due to either a kill
// request, preemption or time out.
//
// See
// https://chromium.googlesource.com/infra/luci/luci-py.git/+/master/appengine/swarming/doc/Bot.md#graceful-termination_aka-the-sigterm-and-sigkill-dance
TaskState_TERMINATING TaskState = 35 // Not used yet. https://crbug.com/916560
// Task completed, result metadata and task outputs are available. There's
// still some overhead being finished like attaching relevant bot logs to the
// task.
//
// The client can return right away unless infrastructure issue debugging is
// needed.
TaskState_COMPLETING TaskState = 47 // Not used yet, https://crbug.com/813412
// The task ran but the bot had an internal failure, unrelated to the task
// itself. It can be due to disk or network I/O issues.
TaskState_RAN_INTERNAL_FAILURE TaskState = 48
// The task ran and completed normally, but returned an exit code that was
// provided in the TaskProperties as signaling an hardware failure of the DUT
// (Device Under Test).
//
// As such, the task may need to be retried.
TaskState_DUT_FAILURE TaskState = 49 // Not used yet, https://crbug.com/902807
// The task started but the bot failed to keep the connection to the server
// alive. This can be due to the bot's host crashing, or network connectivity
// issues.
TaskState_BOT_DISAPPEARED TaskState = 50 // Not used yet. https://crbug.com/916553
// The task ran but was killed by the client or an external scheduler in a way
// that it should still be retried as another task try.
//
// This can happen via the external scheduler or an API yet to be defined. The
// rationale is to kill slow running low priority task, without disrupting the
// client and simply postponing the task for later.
TaskState_PREEMPTED TaskState = 51 // Not used yet. https://crbug.com/916559
// The task ran and completed normally. The task process exit code may be 0 or
// another value.
//
// This value is also used when the task is deduped against a previous task.
TaskState_COMPLETED TaskState = 64
// The task ran for longer than the allowed time in
// TaskProperties.execution_timeout.
//
// This means the bot forcefully killed the task process as described in the
// graceful termination dance in the documentation.
TaskState_TIMED_OUT TaskState = 65
// The task timed out due to not sending updates to stdout or stderr within
// the period specified in TaskProperties.io_timeout.
//
// This means the bot forcefully killed the task process as described in the
// graceful termination dance in the documentation.
TaskState_TIMED_OUT_SILENCE TaskState = 66 // Not used yet. https://crbug.com/916556
// The task ran but was manually killed via the 'cancel' API.
//
// This means the bot forcefully killed the task process as described in the
// graceful termination dance in the documentation.
TaskState_KILLED TaskState = 67
// The task had specified invalid inputs. This is found out by the bot while
// RUNNING_OVERHEAD_SETUP.
//
// For example, the cas_inputs or cipd_inputs refers to missing items,
// or the requested containment cannot be achieved.
TaskState_MISSING_INPUTS TaskState = 68 // Not used yet. https://crbug.com/916553
// The task didn't have to run, because a previous task had results. It is
// functionally equivalent to COMPLETED, except that previous results were
// returned as-is.
TaskState_DEDUPED TaskState = 80
// The task is not pending anymore; it never ran due to lack of capacity.
//
// This means that other higher priority tasks ran instead and that not enough
// bots were available to run this task for TaskSlice.expiration.
TaskState_EXPIRED TaskState = 81
// The task never ran, and was manually cancelled via the 'cancel' API before
// it was reaped.
TaskState_CANCELED TaskState = 82
// The task was never set to PENDING and was immediately refused, as the
// server determined that there is no bot capacity to run this task. This
// happens because no bot exposes a superset of the requested task dimensions.
//
// There can be a situation where a task goes from PENDING to NO_RESOURCE if
// capacity (bots) is removed.
//
// Set TaskSlice.wait_for_capacity to True to force the server to keep the
// task slice pending even in this case. Generally speaking, the task will
// eventually switch to EXPIRED, as there's no bot to run it. That said, there
// are situations where it is known that in some not-too-distant future a wild
// bot will appear that will be able to run this task.
TaskState_NO_RESOURCE TaskState = 83
// The task was valid but was denied due to a temporary capacity surcharge.
// The user should try again after a delay, or surface the lack of capacity to
// the user.
TaskState_LOAD_SHED TaskState = 84 // Not used yet. https://crbug.com/916562
// The task is valid but was denied due to insufficient quota.
TaskState_RESOURCE_EXHAUSTED TaskState = 85 // Not used yet. https://crbug.com/916557
// The task never ran, the server had an internal failure, unrelated to the
// task itself. It can be due to a server bug or network I/O issues.
TaskState_SKIPPED_INTERNAL_FAILURE TaskState = 86 // Not used yet. https://crbug.com/916553
)
// Enum value maps for TaskState.
var (
TaskState_name = map[int32]string{
0: "TASK_STATE_INVALID",
16: "PENDING",
17: "PENDING_DEDUPING",
32: "RUNNING",
33: "RUNNING_OVERHEAD_SETUP",
34: "RUNNING_OVERHEAD_TEARDOWN",
35: "TERMINATING",
47: "COMPLETING",
48: "RAN_INTERNAL_FAILURE",
49: "DUT_FAILURE",
50: "BOT_DISAPPEARED",
51: "PREEMPTED",
64: "COMPLETED",
65: "TIMED_OUT",
66: "TIMED_OUT_SILENCE",
67: "KILLED",
68: "MISSING_INPUTS",
80: "DEDUPED",
81: "EXPIRED",
82: "CANCELED",
83: "NO_RESOURCE",
84: "LOAD_SHED",
85: "RESOURCE_EXHAUSTED",
86: "SKIPPED_INTERNAL_FAILURE",
}
TaskState_value = map[string]int32{
"TASK_STATE_INVALID": 0,
"PENDING": 16,
"PENDING_DEDUPING": 17,
"RUNNING": 32,
"RUNNING_OVERHEAD_SETUP": 33,
"RUNNING_OVERHEAD_TEARDOWN": 34,
"TERMINATING": 35,
"COMPLETING": 47,
"RAN_INTERNAL_FAILURE": 48,
"DUT_FAILURE": 49,
"BOT_DISAPPEARED": 50,
"PREEMPTED": 51,
"COMPLETED": 64,
"TIMED_OUT": 65,
"TIMED_OUT_SILENCE": 66,
"KILLED": 67,
"MISSING_INPUTS": 68,
"DEDUPED": 80,
"EXPIRED": 81,
"CANCELED": 82,
"NO_RESOURCE": 83,
"LOAD_SHED": 84,
"RESOURCE_EXHAUSTED": 85,
"SKIPPED_INTERNAL_FAILURE": 86,
}
)
func (x TaskState) Enum() *TaskState {
p := new(TaskState)
*p = x
return p
}
func (x TaskState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TaskState) Descriptor() protoreflect.EnumDescriptor {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[3].Descriptor()
}
func (TaskState) Type() protoreflect.EnumType {
return &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[3]
}
func (x TaskState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TaskState.Descriptor instead.
func (TaskState) EnumDescriptor() ([]byte, []int) {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_rawDescGZIP(), []int{3}
}
type Containment_ContainmentType int32
const (
// Historical value, not specified. Containment may or may not be used.
Containment_NOT_SPECIFIED Containment_ContainmentType = 0
// No containment, the default for now.
Containment_NONE Containment_ContainmentType = 1
// Use the containment appropriate on the platform.
Containment_AUTO Containment_ContainmentType = 2
// Use Job Object on Windows. Will fail if used on other platforms.
Containment_JOB_OBJECT Containment_ContainmentType = 3
)
// Enum value maps for Containment_ContainmentType.
var (
Containment_ContainmentType_name = map[int32]string{
0: "NOT_SPECIFIED",
1: "NONE",
2: "AUTO",
3: "JOB_OBJECT",
}
Containment_ContainmentType_value = map[string]int32{
"NOT_SPECIFIED": 0,
"NONE": 1,
"AUTO": 2,
"JOB_OBJECT": 3,
}
)
func (x Containment_ContainmentType) Enum() *Containment_ContainmentType {
p := new(Containment_ContainmentType)
*p = x
return p
}
func (x Containment_ContainmentType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Containment_ContainmentType) Descriptor() protoreflect.EnumDescriptor {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[4].Descriptor()
}
func (Containment_ContainmentType) Type() protoreflect.EnumType {
return &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_enumTypes[4]
}
func (x Containment_ContainmentType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Containment_ContainmentType.Descriptor instead.
func (Containment_ContainmentType) EnumDescriptor() ([]byte, []int) {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_rawDescGZIP(), []int{16, 0}
}
// Request for BotAPI.Events.
type BotEventsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Bot ID to retrieve results from.
BotId string `protobuf:"bytes,1,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`
// Optional. Use this field to specify the maximum number of results to be
// returned by the server.
//
// The server may further constrain the maximum number of results returned in
// a single page. If the page_size is 0, the server will decide the number of
// results to be returned.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. Use this field to request a specific page of the list results,
// following a previous call.
//
// When specified, page_size, start_time and end_time must match exactly the
// previous call's argument.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// Optional. Earliest time to return bot event. Inclusive.
//
// If not specified, pagination is done until all events are returned.
StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// Optional. Most recent time to return bot event. Exclusive.
//
// If not specified, defaults to the current time.
EndTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
}
func (x *BotEventsRequest) Reset() {
*x = BotEventsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BotEventsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BotEventsRequest) ProtoMessage() {}
func (x *BotEventsRequest) ProtoReflect() protoreflect.Message {
mi := &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BotEventsRequest.ProtoReflect.Descriptor instead.
func (*BotEventsRequest) Descriptor() ([]byte, []int) {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_rawDescGZIP(), []int{0}
}
func (x *BotEventsRequest) GetBotId() string {
if x != nil {
return x.BotId
}
return ""
}
func (x *BotEventsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *BotEventsRequest) GetPageToken() string {
if x != nil {
return x.PageToken
}
return ""
}
func (x *BotEventsRequest) GetStartTime() *timestamppb.Timestamp {
if x != nil {
return x.StartTime
}
return nil
}
func (x *BotEventsRequest) GetEndTime() *timestamppb.Timestamp {
if x != nil {
return x.EndTime
}
return nil
}
// Response of BotAPI.Events.
type BotEventsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Events are in reverse chronological order, most recents first and going
// down to older events.
Events []*BotEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
// This field represents the pagination token to retrieve the next page of
// results. If the value is "", it means no further results for the request.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
}
func (x *BotEventsResponse) Reset() {
*x = BotEventsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BotEventsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BotEventsResponse) ProtoMessage() {}
func (x *BotEventsResponse) ProtoReflect() protoreflect.Message {
mi := &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BotEventsResponse.ProtoReflect.Descriptor instead.
func (*BotEventsResponse) Descriptor() ([]byte, []int) {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_rawDescGZIP(), []int{1}
}
func (x *BotEventsResponse) GetEvents() []*BotEvent {
if x != nil {
return x.Events
}
return nil
}
func (x *BotEventsResponse) GetNextPageToken() string {
if x != nil {
return x.NextPageToken
}
return ""
}
// Represents a mapping of string to a string.
//
// The same as a map<key, value>, except that the encoding is deterministic.
//
// If the StringPair is itself repeated inside another message, the list
// must be sorted by key and the keys must be unique.
type StringPair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *StringPair) Reset() {
*x = StringPair{}
if protoimpl.UnsafeEnabled {
mi := &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StringPair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StringPair) ProtoMessage() {}
func (x *StringPair) ProtoReflect() protoreflect.Message {
mi := &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StringPair.ProtoReflect.Descriptor instead.
func (*StringPair) Descriptor() ([]byte, []int) {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_rawDescGZIP(), []int{2}
}
func (x *StringPair) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *StringPair) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
// Represents a mapping of string to a list of strings.
//
// The same as a map<key, repeated values>, except that the encoding is
// deterministic.
//
// If the StringListPair is itself repeated inside another message, the list
// must be sorted by key and the keys must be unique.
type StringListPair struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// All the values for this key. values must be sorted. Human readable.
//
// This string should make sense to a user in the context of 'key'.
Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
}
func (x *StringListPair) Reset() {
*x = StringListPair{}
if protoimpl.UnsafeEnabled {
mi := &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StringListPair) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StringListPair) ProtoMessage() {}
func (x *StringListPair) ProtoReflect() protoreflect.Message {
mi := &file_go_chromium_org_luci_swarming_proto_api_swarming_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StringListPair.ProtoReflect.Descriptor instead.
func (*StringListPair) Descriptor() ([]byte, []int) {
return file_go_chromium_org_luci_swarming_proto_api_swarming_proto_rawDescGZIP(), []int{3}
}
func (x *StringListPair) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *StringListPair) GetValues() []string {
if x != nil {
return x.Values
}
return nil
}
// Bot describes a Swarming bot.
//
// Because a Swarming bot is a single execution unit unlike RBE, it doesn't have
// a concept of owned device at the moment. This may change later.
type Bot struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Bot ID. It must be unique across the Swarming fleet. Generally based on the
// hostname where the bot runs, but that's not a requirement. Must be
// predefined in bots.cfg.
//
// This value is also included in dimensions for the key 'id'.
BotId string `protobuf:"bytes,1,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`
// Bot session ID. An opaque value.
//
// There is one bot session ID per bot process ID on the host. When the bot
// self-upgrades, it creates a new bot session ID.
SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // Not used yet. https://crbug.com/786735
// Pools that this bot belongs to. Normally assigned via bots.cfg. The
// pools must be defined in pools.cfg.
//
// Normally a bot shall belong to a single pool, but belonging to multiple
// pool is allowed. This is generally helpful for transitioning bots.
//
// This value is also included in dimensions for the key 'pool'.