/
remote_execution.pb.go
executable file
·7063 lines (6436 loc) · 309 KB
/
remote_execution.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 Bazel Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.10.1
// source: build/bazel/remote/execution/v2/remote_execution.proto
package remoteexecution
import (
context "context"
semver "github.com/buchgr/bazel-remote/v2/genproto/build/bazel/semver"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
_ "google.golang.org/genproto/googleapis/api/annotations"
longrunning "google.golang.org/genproto/googleapis/longrunning"
status "google.golang.org/genproto/googleapis/rpc/status"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status1 "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
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)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type ExecutionStage_Value int32
const (
// Invalid value.
ExecutionStage_UNKNOWN ExecutionStage_Value = 0
// Checking the result against the cache.
ExecutionStage_CACHE_CHECK ExecutionStage_Value = 1
// Currently idle, awaiting a free machine to execute.
ExecutionStage_QUEUED ExecutionStage_Value = 2
// Currently being executed by a worker.
ExecutionStage_EXECUTING ExecutionStage_Value = 3
// Finished execution.
ExecutionStage_COMPLETED ExecutionStage_Value = 4
)
// Enum value maps for ExecutionStage_Value.
var (
ExecutionStage_Value_name = map[int32]string{
0: "UNKNOWN",
1: "CACHE_CHECK",
2: "QUEUED",
3: "EXECUTING",
4: "COMPLETED",
}
ExecutionStage_Value_value = map[string]int32{
"UNKNOWN": 0,
"CACHE_CHECK": 1,
"QUEUED": 2,
"EXECUTING": 3,
"COMPLETED": 4,
}
)
func (x ExecutionStage_Value) Enum() *ExecutionStage_Value {
p := new(ExecutionStage_Value)
*p = x
return p
}
func (x ExecutionStage_Value) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ExecutionStage_Value) Descriptor() protoreflect.EnumDescriptor {
return file_build_bazel_remote_execution_v2_remote_execution_proto_enumTypes[0].Descriptor()
}
func (ExecutionStage_Value) Type() protoreflect.EnumType {
return &file_build_bazel_remote_execution_v2_remote_execution_proto_enumTypes[0]
}
func (x ExecutionStage_Value) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ExecutionStage_Value.Descriptor instead.
func (ExecutionStage_Value) EnumDescriptor() ([]byte, []int) {
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{21, 0}
}
type DigestFunction_Value int32
const (
// It is an error for the server to return this value.
DigestFunction_UNKNOWN DigestFunction_Value = 0
// The SHA-256 digest function.
DigestFunction_SHA256 DigestFunction_Value = 1
// The SHA-1 digest function.
DigestFunction_SHA1 DigestFunction_Value = 2
// The MD5 digest function.
DigestFunction_MD5 DigestFunction_Value = 3
// The Microsoft "VSO-Hash" paged SHA256 digest function.
// See https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/PagedHash.md .
DigestFunction_VSO DigestFunction_Value = 4
// The SHA-384 digest function.
DigestFunction_SHA384 DigestFunction_Value = 5
// The SHA-512 digest function.
DigestFunction_SHA512 DigestFunction_Value = 6
// Murmur3 128-bit digest function, x64 variant. Note that this is not a
// cryptographic hash function and its collision properties are not strongly guaranteed.
// See https://github.com/aappleby/smhasher/wiki/MurmurHash3 .
DigestFunction_MURMUR3 DigestFunction_Value = 7
)
// Enum value maps for DigestFunction_Value.
var (
DigestFunction_Value_name = map[int32]string{
0: "UNKNOWN",
1: "SHA256",
2: "SHA1",
3: "MD5",
4: "VSO",
5: "SHA384",
6: "SHA512",
7: "MURMUR3",
}
DigestFunction_Value_value = map[string]int32{
"UNKNOWN": 0,
"SHA256": 1,
"SHA1": 2,
"MD5": 3,
"VSO": 4,
"SHA384": 5,
"SHA512": 6,
"MURMUR3": 7,
}
)
func (x DigestFunction_Value) Enum() *DigestFunction_Value {
p := new(DigestFunction_Value)
*p = x
return p
}
func (x DigestFunction_Value) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DigestFunction_Value) Descriptor() protoreflect.EnumDescriptor {
return file_build_bazel_remote_execution_v2_remote_execution_proto_enumTypes[1].Descriptor()
}
func (DigestFunction_Value) Type() protoreflect.EnumType {
return &file_build_bazel_remote_execution_v2_remote_execution_proto_enumTypes[1]
}
func (x DigestFunction_Value) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use DigestFunction_Value.Descriptor instead.
func (DigestFunction_Value) EnumDescriptor() ([]byte, []int) {
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{36, 0}
}
type SymlinkAbsolutePathStrategy_Value int32
const (
// Invalid value.
SymlinkAbsolutePathStrategy_UNKNOWN SymlinkAbsolutePathStrategy_Value = 0
// Server will return an `INVALID_ARGUMENT` on input symlinks with absolute
// targets.
// If an action tries to create an output symlink with an absolute target, a
// `FAILED_PRECONDITION` will be returned.
SymlinkAbsolutePathStrategy_DISALLOWED SymlinkAbsolutePathStrategy_Value = 1
// Server will allow symlink targets to escape the input root tree, possibly
// resulting in non-hermetic builds.
SymlinkAbsolutePathStrategy_ALLOWED SymlinkAbsolutePathStrategy_Value = 2
)
// Enum value maps for SymlinkAbsolutePathStrategy_Value.
var (
SymlinkAbsolutePathStrategy_Value_name = map[int32]string{
0: "UNKNOWN",
1: "DISALLOWED",
2: "ALLOWED",
}
SymlinkAbsolutePathStrategy_Value_value = map[string]int32{
"UNKNOWN": 0,
"DISALLOWED": 1,
"ALLOWED": 2,
}
)
func (x SymlinkAbsolutePathStrategy_Value) Enum() *SymlinkAbsolutePathStrategy_Value {
p := new(SymlinkAbsolutePathStrategy_Value)
*p = x
return p
}
func (x SymlinkAbsolutePathStrategy_Value) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SymlinkAbsolutePathStrategy_Value) Descriptor() protoreflect.EnumDescriptor {
return file_build_bazel_remote_execution_v2_remote_execution_proto_enumTypes[2].Descriptor()
}
func (SymlinkAbsolutePathStrategy_Value) Type() protoreflect.EnumType {
return &file_build_bazel_remote_execution_v2_remote_execution_proto_enumTypes[2]
}
func (x SymlinkAbsolutePathStrategy_Value) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SymlinkAbsolutePathStrategy_Value.Descriptor instead.
func (SymlinkAbsolutePathStrategy_Value) EnumDescriptor() ([]byte, []int) {
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{39, 0}
}
type Compressor_Value int32
const (
// No compression. Servers and clients MUST always support this, and do
// not need to advertise it.
Compressor_IDENTITY Compressor_Value = 0
// Zstandard compression.
Compressor_ZSTD Compressor_Value = 1
// RFC 1951 Deflate. This format is identical to what is used by ZIP
// files. Headers such as the one generated by gzip are not
// included.
//
// It is advised to use algorithms such as Zstandard instead, as
// those are faster and/or provide a better compression ratio.
Compressor_DEFLATE Compressor_Value = 2
)
// Enum value maps for Compressor_Value.
var (
Compressor_Value_name = map[int32]string{
0: "IDENTITY",
1: "ZSTD",
2: "DEFLATE",
}
Compressor_Value_value = map[string]int32{
"IDENTITY": 0,
"ZSTD": 1,
"DEFLATE": 2,
}
)
func (x Compressor_Value) Enum() *Compressor_Value {
p := new(Compressor_Value)
*p = x
return p
}
func (x Compressor_Value) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Compressor_Value) Descriptor() protoreflect.EnumDescriptor {
return file_build_bazel_remote_execution_v2_remote_execution_proto_enumTypes[3].Descriptor()
}
func (Compressor_Value) Type() protoreflect.EnumType {
return &file_build_bazel_remote_execution_v2_remote_execution_proto_enumTypes[3]
}
func (x Compressor_Value) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Compressor_Value.Descriptor instead.
func (Compressor_Value) EnumDescriptor() ([]byte, []int) {
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{40, 0}
}
// An `Action` captures all the information about an execution which is required
// to reproduce it.
//
// `Action`s are the core component of the [Execution] service. A single
// `Action` represents a repeatable action that can be performed by the
// execution service. `Action`s can be succinctly identified by the digest of
// their wire format encoding and, once an `Action` has been executed, will be
// cached in the action cache. Future requests can then use the cached result
// rather than needing to run afresh.
//
// When a server completes execution of an
// [Action][build.bazel.remote.execution.v2.Action], it MAY choose to
// cache the [result][build.bazel.remote.execution.v2.ActionResult] in
// the [ActionCache][build.bazel.remote.execution.v2.ActionCache] unless
// `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By
// default, future calls to
// [Execute][build.bazel.remote.execution.v2.Execution.Execute] the same
// `Action` will also serve their results from the cache. Clients must take care
// to understand the caching behaviour. Ideally, all `Action`s will be
// reproducible so that serving a result from cache is always desirable and
// correct.
type Action struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The digest of the [Command][build.bazel.remote.execution.v2.Command]
// to run, which MUST be present in the
// [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
CommandDigest *Digest `protobuf:"bytes,1,opt,name=command_digest,json=commandDigest,proto3" json:"command_digest,omitempty"`
// The digest of the root
// [Directory][build.bazel.remote.execution.v2.Directory] for the input
// files. The files in the directory tree are available in the correct
// location on the build machine before the command is executed. The root
// directory, as well as every subdirectory and content blob referred to, MUST
// be in the
// [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
InputRootDigest *Digest `protobuf:"bytes,2,opt,name=input_root_digest,json=inputRootDigest,proto3" json:"input_root_digest,omitempty"`
// A timeout after which the execution should be killed. If the timeout is
// absent, then the client is specifying that the execution should continue
// as long as the server will let it. The server SHOULD impose a timeout if
// the client does not specify one, however, if the client does specify a
// timeout that is longer than the server's maximum timeout, the server MUST
// reject the request.
//
// The timeout is only intended to cover the "execution" of the specified
// action and not time in queue nor any overheads before or after execution
// such as marshalling inputs/outputs. The server SHOULD avoid including time
// spent the client doesn't have control over, and MAY extend or reduce the
// timeout to account for delays or speedups that occur during execution
// itself (e.g., lazily loading data from the Content Addressable Storage,
// live migration of virtual machines, emulation overhead).
//
// The timeout is a part of the
// [Action][build.bazel.remote.execution.v2.Action] message, and
// therefore two `Actions` with different timeouts are different, even if they
// are otherwise identical. This is because, if they were not, running an
// `Action` with a lower timeout than is required might result in a cache hit
// from an execution run with a longer timeout, hiding the fact that the
// timeout is too short. By encoding it directly in the `Action`, a lower
// timeout will result in a cache miss and the execution timeout will fail
// immediately, rather than whenever the cache entry gets evicted.
Timeout *duration.Duration `protobuf:"bytes,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
// If true, then the `Action`'s result cannot be cached, and in-flight
// requests for the same `Action` may not be merged.
DoNotCache bool `protobuf:"varint,7,opt,name=do_not_cache,json=doNotCache,proto3" json:"do_not_cache,omitempty"`
// An optional additional salt value used to place this `Action` into a
// separate cache namespace from other instances having the same field
// contents. This salt typically comes from operational configuration
// specific to sources such as repo and service configuration,
// and allows disowning an entire set of ActionResults that might have been
// poisoned by buggy software or tool failures.
Salt []byte `protobuf:"bytes,9,opt,name=salt,proto3" json:"salt,omitempty"`
// The optional platform requirements 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. A detailed lexicon for this can be
// found in the accompanying platform.md.
// New in version 2.2: clients SHOULD set these platform properties as well
// as those in the [Command][build.bazel.remote.execution.v2.Command]. Servers
// SHOULD prefer those set here.
Platform *Platform `protobuf:"bytes,10,opt,name=platform,proto3" json:"platform,omitempty"`
}
func (x *Action) Reset() {
*x = Action{}
if protoimpl.UnsafeEnabled {
mi := &file_build_bazel_remote_execution_v2_remote_execution_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Action) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Action) ProtoMessage() {}
func (x *Action) ProtoReflect() protoreflect.Message {
mi := &file_build_bazel_remote_execution_v2_remote_execution_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 Action.ProtoReflect.Descriptor instead.
func (*Action) Descriptor() ([]byte, []int) {
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{0}
}
func (x *Action) GetCommandDigest() *Digest {
if x != nil {
return x.CommandDigest
}
return nil
}
func (x *Action) GetInputRootDigest() *Digest {
if x != nil {
return x.InputRootDigest
}
return nil
}
func (x *Action) GetTimeout() *duration.Duration {
if x != nil {
return x.Timeout
}
return nil
}
func (x *Action) GetDoNotCache() bool {
if x != nil {
return x.DoNotCache
}
return false
}
func (x *Action) GetSalt() []byte {
if x != nil {
return x.Salt
}
return nil
}
func (x *Action) GetPlatform() *Platform {
if x != nil {
return x.Platform
}
return nil
}
// A `Command` is the actual command executed by a worker running an
// [Action][build.bazel.remote.execution.v2.Action] and specifications of its
// environment.
//
// Except as otherwise required, the environment (such as which system
// libraries or binaries are available, and what filesystems are mounted where)
// is defined by and specific to the implementation of the remote execution API.
type Command struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The arguments to the command. The first argument must be the path to the
// executable, which must be either a relative path, in which case it is
// evaluated with respect to the input root, or an absolute path.
Arguments []string `protobuf:"bytes,1,rep,name=arguments,proto3" json:"arguments,omitempty"`
// The environment variables to set when running the program. The worker may
// provide its own default environment variables; these defaults can be
// overridden using this field. Additional variables can also be specified.
//
// In order to ensure that equivalent
// [Command][build.bazel.remote.execution.v2.Command]s always hash to the same
// value, the environment variables MUST be lexicographically sorted by name.
// Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
EnvironmentVariables []*Command_EnvironmentVariable `protobuf:"bytes,2,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty"`
// A list of the output files that the client expects to retrieve from the
// action. Only the listed files, as well as directories listed in
// `output_directories`, will be returned to the client as output.
// Other files or directories that may be created during command execution
// are discarded.
//
// The paths are relative to the working directory of the action execution.
// The paths are specified using a single forward slash (`/`) as a path
// separator, even if the execution platform natively uses a different
// separator. The path MUST NOT include a trailing slash, nor a leading slash,
// being a relative path.
//
// In order to ensure consistent hashing of the same Action, the output paths
// MUST be sorted lexicographically by code point (or, equivalently, by UTF-8
// bytes).
//
// An output file cannot be duplicated, be a parent of another output file, or
// have the same path as any of the listed output directories.
//
// Directories leading up to the output files are created by the worker prior
// to execution, even if they are not explicitly part of the input root.
//
// DEPRECATED since v2.1: Use `output_paths` instead.
OutputFiles []string `protobuf:"bytes,3,rep,name=output_files,json=outputFiles,proto3" json:"output_files,omitempty"`
// A list of the output directories that the client expects to retrieve from
// the action. Only the listed directories will be returned (an entire
// directory structure will be returned as a
// [Tree][build.bazel.remote.execution.v2.Tree] message digest, see
// [OutputDirectory][build.bazel.remote.execution.v2.OutputDirectory]), as
// well as files listed in `output_files`. Other files or directories that
// may be created during command execution are discarded.
//
// The paths are relative to the working directory of the action execution.
// The paths are specified using a single forward slash (`/`) as a path
// separator, even if the execution platform natively uses a different
// separator. The path MUST NOT include a trailing slash, nor a leading slash,
// being a relative path. The special value of empty string is allowed,
// although not recommended, and can be used to capture the entire working
// directory tree, including inputs.
//
// In order to ensure consistent hashing of the same Action, the output paths
// MUST be sorted lexicographically by code point (or, equivalently, by UTF-8
// bytes).
//
// An output directory cannot be duplicated or have the same path as any of
// the listed output files. An output directory is allowed to be a parent of
// another output directory.
//
// Directories leading up to the output directories (but not the output
// directories themselves) are created by the worker prior to execution, even
// if they are not explicitly part of the input root.
//
// DEPRECATED since 2.1: Use `output_paths` instead.
OutputDirectories []string `protobuf:"bytes,4,rep,name=output_directories,json=outputDirectories,proto3" json:"output_directories,omitempty"`
// A list of the output paths that the client expects to retrieve from the
// action. Only the listed paths will be returned to the client as output.
// The type of the output (file or directory) is not specified, and will be
// determined by the server after action execution. If the resulting path is
// a file, it will be returned in an
// [OutputFile][build.bazel.remote.execution.v2.OutputFile] typed field.
// If the path is a directory, the entire directory structure will be returned
// as a [Tree][build.bazel.remote.execution.v2.Tree] message digest, see
// [OutputDirectory][build.bazel.remote.execution.v2.OutputDirectory]
// Other files or directories that may be created during command execution
// are discarded.
//
// The paths are relative to the working directory of the action execution.
// The paths are specified using a single forward slash (`/`) as a path
// separator, even if the execution platform natively uses a different
// separator. The path MUST NOT include a trailing slash, nor a leading slash,
// being a relative path.
//
// In order to ensure consistent hashing of the same Action, the output paths
// MUST be deduplicated and sorted lexicographically by code point (or,
// equivalently, by UTF-8 bytes).
//
// Directories leading up to the output paths are created by the worker prior
// to execution, even if they are not explicitly part of the input root.
//
// New in v2.1: this field supersedes the DEPRECATED `output_files` and
// `output_directories` fields. If `output_paths` is used, `output_files` and
// `output_directories` will be ignored!
OutputPaths []string `protobuf:"bytes,7,rep,name=output_paths,json=outputPaths,proto3" json:"output_paths,omitempty"`
// The platform requirements 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. A detailed lexicon for this can be found in the
// accompanying platform.md.
// DEPRECATED as of v2.2: platform properties are now specified directly in
// the action. See documentation note in the
// [Action][build.bazel.remote.execution.v2.Action] for migration.
Platform *Platform `protobuf:"bytes,5,opt,name=platform,proto3" json:"platform,omitempty"`
// The working directory, relative to the input root, for the command to run
// in. It must be a directory which exists in the input tree. If it is left
// empty, then the action is run in the input root.
WorkingDirectory string `protobuf:"bytes,6,opt,name=working_directory,json=workingDirectory,proto3" json:"working_directory,omitempty"`
// A list of keys for node properties the client expects to retrieve for
// output files and directories. Keys are either names of string-based
// [NodeProperty][build.bazel.remote.execution.v2.NodeProperty] or
// names of fields in [NodeProperties][build.bazel.remote.execution.v2.NodeProperties].
// In order to ensure that equivalent `Action`s always hash to the same
// value, the node properties MUST be lexicographically sorted by name.
// Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
//
// The interpretation of string-based properties is server-dependent. If a
// property is not recognized by the server, the server will return an
// `INVALID_ARGUMENT`.
OutputNodeProperties []string `protobuf:"bytes,8,rep,name=output_node_properties,json=outputNodeProperties,proto3" json:"output_node_properties,omitempty"`
}
func (x *Command) Reset() {
*x = Command{}
if protoimpl.UnsafeEnabled {
mi := &file_build_bazel_remote_execution_v2_remote_execution_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Command) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Command) ProtoMessage() {}
func (x *Command) ProtoReflect() protoreflect.Message {
mi := &file_build_bazel_remote_execution_v2_remote_execution_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 Command.ProtoReflect.Descriptor instead.
func (*Command) Descriptor() ([]byte, []int) {
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{1}
}
func (x *Command) GetArguments() []string {
if x != nil {
return x.Arguments
}
return nil
}
func (x *Command) GetEnvironmentVariables() []*Command_EnvironmentVariable {
if x != nil {
return x.EnvironmentVariables
}
return nil
}
func (x *Command) GetOutputFiles() []string {
if x != nil {
return x.OutputFiles
}
return nil
}
func (x *Command) GetOutputDirectories() []string {
if x != nil {
return x.OutputDirectories
}
return nil
}
func (x *Command) GetOutputPaths() []string {
if x != nil {
return x.OutputPaths
}
return nil
}
func (x *Command) GetPlatform() *Platform {
if x != nil {
return x.Platform
}
return nil
}
func (x *Command) GetWorkingDirectory() string {
if x != nil {
return x.WorkingDirectory
}
return ""
}
func (x *Command) GetOutputNodeProperties() []string {
if x != nil {
return x.OutputNodeProperties
}
return nil
}
// A `Platform` is a set of requirements, such as hardware, operating system, or
// compiler toolchain, for an
// [Action][build.bazel.remote.execution.v2.Action]'s execution
// environment. A `Platform` is represented as a series of key-value pairs
// representing the properties that are required of the platform.
type Platform struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The properties that make up this platform. In order to ensure that
// equivalent `Platform`s always hash to the same value, the properties MUST
// be lexicographically sorted by name, and then by value. Sorting of strings
// is done by code point, equivalently, by the UTF-8 bytes.
Properties []*Platform_Property `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"`
}
func (x *Platform) Reset() {
*x = Platform{}
if protoimpl.UnsafeEnabled {
mi := &file_build_bazel_remote_execution_v2_remote_execution_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Platform) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Platform) ProtoMessage() {}
func (x *Platform) ProtoReflect() protoreflect.Message {
mi := &file_build_bazel_remote_execution_v2_remote_execution_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 Platform.ProtoReflect.Descriptor instead.
func (*Platform) Descriptor() ([]byte, []int) {
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{2}
}
func (x *Platform) GetProperties() []*Platform_Property {
if x != nil {
return x.Properties
}
return nil
}
// A `Directory` represents a directory node in a file tree, containing zero or
// more children [FileNodes][build.bazel.remote.execution.v2.FileNode],
// [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode] and
// [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode].
// Each `Node` contains its name in the directory, either the digest of its
// content (either a file blob or a `Directory` proto) or a symlink target, as
// well as possibly some metadata about the file or directory.
//
// In order to ensure that two equivalent directory trees hash to the same
// value, the following restrictions MUST be obeyed when constructing a
// a `Directory`:
//
// - Every child in the directory must have a path of exactly one segment.
// Multiple levels of directory hierarchy may not be collapsed.
// - Each child in the directory must have a unique path segment (file name).
// Note that while the API itself is case-sensitive, the environment where
// the Action is executed may or may not be case-sensitive. That is, it is
// legal to call the API with a Directory that has both "Foo" and "foo" as
// children, but the Action may be rejected by the remote system upon
// execution.
// - The files, directories and symlinks in the directory must each be sorted
// in lexicographical order by path. The path strings must be sorted by code
// point, equivalently, by UTF-8 bytes.
// - The [NodeProperties][build.bazel.remote.execution.v2.NodeProperty] of files,
// directories, and symlinks must be sorted in lexicographical order by
// property name.
//
// A `Directory` that obeys the restrictions is said to be in canonical form.
//
// As an example, the following could be used for a file named `bar` and a
// directory named `foo` with an executable file named `baz` (hashes shortened
// for readability):
//
// ```json
// // (Directory proto)
//
// {
// files: [
// {
// name: "bar",
// digest: {
// hash: "4a73bc9d03...",
// size: 65534
// },
// node_properties: [
// {
// "name": "MTime",
// "value": "2017-01-15T01:30:15.01Z"
// }
// ]
// }
// ],
// directories: [
// {
// name: "foo",
// digest: {
// hash: "4cf2eda940...",
// size: 43
// }
// }
// ]
// }
//
// // (Directory proto with hash "4cf2eda940..." and size 43)
//
// {
// files: [
// {
// name: "baz",
// digest: {
// hash: "b2c941073e...",
// size: 1294,
// },
// is_executable: true
// }
// ]
// }
//
// ```
type Directory struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The files in the directory.
Files []*FileNode `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
// The subdirectories in the directory.
Directories []*DirectoryNode `protobuf:"bytes,2,rep,name=directories,proto3" json:"directories,omitempty"`
// The symlinks in the directory.
Symlinks []*SymlinkNode `protobuf:"bytes,3,rep,name=symlinks,proto3" json:"symlinks,omitempty"`
NodeProperties *NodeProperties `protobuf:"bytes,5,opt,name=node_properties,json=nodeProperties,proto3" json:"node_properties,omitempty"`
}
func (x *Directory) Reset() {
*x = Directory{}
if protoimpl.UnsafeEnabled {
mi := &file_build_bazel_remote_execution_v2_remote_execution_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Directory) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Directory) ProtoMessage() {}
func (x *Directory) ProtoReflect() protoreflect.Message {
mi := &file_build_bazel_remote_execution_v2_remote_execution_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 Directory.ProtoReflect.Descriptor instead.
func (*Directory) Descriptor() ([]byte, []int) {
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{3}
}
func (x *Directory) GetFiles() []*FileNode {
if x != nil {
return x.Files
}
return nil
}
func (x *Directory) GetDirectories() []*DirectoryNode {
if x != nil {
return x.Directories
}
return nil
}
func (x *Directory) GetSymlinks() []*SymlinkNode {
if x != nil {
return x.Symlinks
}
return nil
}
func (x *Directory) GetNodeProperties() *NodeProperties {
if x != nil {
return x.NodeProperties
}
return nil
}
// A single property for [FileNodes][build.bazel.remote.execution.v2.FileNode],
// [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode], and
// [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode]. The server is
// responsible for specifying the property `name`s that it accepts. If
// permitted by the server, the same `name` may occur multiple times.
type NodeProperty struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The property name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The property value.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NodeProperty) Reset() {
*x = NodeProperty{}
if protoimpl.UnsafeEnabled {
mi := &file_build_bazel_remote_execution_v2_remote_execution_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeProperty) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeProperty) ProtoMessage() {}
func (x *NodeProperty) ProtoReflect() protoreflect.Message {
mi := &file_build_bazel_remote_execution_v2_remote_execution_proto_msgTypes[4]
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 NodeProperty.ProtoReflect.Descriptor instead.
func (*NodeProperty) Descriptor() ([]byte, []int) {
return file_build_bazel_remote_execution_v2_remote_execution_proto_rawDescGZIP(), []int{4}
}
func (x *NodeProperty) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NodeProperty) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
// Node properties for [FileNodes][build.bazel.remote.execution.v2.FileNode],
// [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode], and
// [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode]. The server is
// responsible for specifying the properties that it accepts.
type NodeProperties struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of string-based
// [NodeProperties][build.bazel.remote.execution.v2.NodeProperty].
Properties []*NodeProperty `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"`
// The file's last modification timestamp.
Mtime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=mtime,proto3" json:"mtime,omitempty"`
// The UNIX file mode, e.g., 0755.
UnixMode *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=unix_mode,json=unixMode,proto3" json:"unix_mode,omitempty"`
}
func (x *NodeProperties) Reset() {
*x = NodeProperties{}
if protoimpl.UnsafeEnabled {
mi := &file_build_bazel_remote_execution_v2_remote_execution_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeProperties) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeProperties) ProtoMessage() {}
func (x *NodeProperties) ProtoReflect() protoreflect.Message {
mi := &file_build_bazel_remote_execution_v2_remote_execution_proto_msgTypes[5]
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 NodeProperties.ProtoReflect.Descriptor instead.