From 5350c4297d1f3a61df3b42e70eda4164b6357b16 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Wed, 1 May 2024 11:46:55 -0500 Subject: [PATCH] added execution environment protos (#5311) Signed-off-by: Daniel Rammer --- .../pb-es/flyteidl/core/execution_envs_pb.ts | 141 ++++++++ .../pb-go/flyteidl/core/execution_envs.pb.go | 321 ++++++++++++++++ .../flyteidl/core/execution_envs.swagger.json | 46 +++ flyteidl/gen/pb-js/flyteidl.d.ts | 137 +++++++ flyteidl/gen/pb-js/flyteidl.js | 342 ++++++++++++++++++ .../flyteidl/core/execution_envs_pb2.py | 30 ++ .../flyteidl/core/execution_envs_pb2.pyi | 29 ++ .../flyteidl/core/execution_envs_pb2_grpc.py | 4 + flyteidl/gen/pb_rust/flyteidl.core.rs | 44 +++ .../protos/flyteidl/core/execution_envs.proto | 39 ++ 10 files changed, 1133 insertions(+) create mode 100644 flyteidl/gen/pb-es/flyteidl/core/execution_envs_pb.ts create mode 100644 flyteidl/gen/pb-go/flyteidl/core/execution_envs.pb.go create mode 100644 flyteidl/gen/pb-go/gateway/flyteidl/core/execution_envs.swagger.json create mode 100644 flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2.py create mode 100644 flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2.pyi create mode 100644 flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2_grpc.py create mode 100644 flyteidl/protos/flyteidl/core/execution_envs.proto diff --git a/flyteidl/gen/pb-es/flyteidl/core/execution_envs_pb.ts b/flyteidl/gen/pb-es/flyteidl/core/execution_envs_pb.ts new file mode 100644 index 0000000000..350528d3f9 --- /dev/null +++ b/flyteidl/gen/pb-es/flyteidl/core/execution_envs_pb.ts @@ -0,0 +1,141 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file flyteidl/core/execution_envs.proto (package flyteidl.core, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3, Struct } from "@bufbuild/protobuf"; + +/** + * ExecutionEnvAssignment is a message that is used to assign an execution environment to a set of + * nodes. + * + * @generated from message flyteidl.core.ExecutionEnvAssignment + */ +export class ExecutionEnvAssignment extends Message { + /** + * node_ids is a list of node ids that are being assigned the execution environment. + * + * @generated from field: repeated string node_ids = 1; + */ + nodeIds: string[] = []; + + /** + * task_type is the type of task that is being assigned. This is used to override which Flyte + * plugin will be used during execution. + * + * @generated from field: string task_type = 2; + */ + taskType = ""; + + /** + * execution_env is the environment that is being assigned to the nodes. + * + * @generated from field: flyteidl.core.ExecutionEnv execution_env = 3; + */ + executionEnv?: ExecutionEnv; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.core.ExecutionEnvAssignment"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "node_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "task_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "execution_env", kind: "message", T: ExecutionEnv }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ExecutionEnvAssignment { + return new ExecutionEnvAssignment().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ExecutionEnvAssignment { + return new ExecutionEnvAssignment().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ExecutionEnvAssignment { + return new ExecutionEnvAssignment().fromJsonString(jsonString, options); + } + + static equals(a: ExecutionEnvAssignment | PlainMessage | undefined, b: ExecutionEnvAssignment | PlainMessage | undefined): boolean { + return proto3.util.equals(ExecutionEnvAssignment, a, b); + } +} + +/** + * ExecutionEnv is a message that is used to specify the execution environment. + * + * @generated from message flyteidl.core.ExecutionEnv + */ +export class ExecutionEnv extends Message { + /** + * id is a unique identifier for the execution environment. + * + * @generated from field: string id = 1; + */ + id = ""; + + /** + * type is the type of the execution environment. + * + * @generated from field: string type = 2; + */ + type = ""; + + /** + * environment is a oneof field that can be used to specify the environment in different ways. + * + * @generated from oneof flyteidl.core.ExecutionEnv.environment + */ + environment: { + /** + * extant is a reference to an existing environment. + * + * @generated from field: google.protobuf.Struct extant = 3; + */ + value: Struct; + case: "extant"; + } | { + /** + * spec is a specification of the environment. + * + * @generated from field: google.protobuf.Struct spec = 4; + */ + value: Struct; + case: "spec"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.core.ExecutionEnv"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "extant", kind: "message", T: Struct, oneof: "environment" }, + { no: 4, name: "spec", kind: "message", T: Struct, oneof: "environment" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ExecutionEnv { + return new ExecutionEnv().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ExecutionEnv { + return new ExecutionEnv().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ExecutionEnv { + return new ExecutionEnv().fromJsonString(jsonString, options); + } + + static equals(a: ExecutionEnv | PlainMessage | undefined, b: ExecutionEnv | PlainMessage | undefined): boolean { + return proto3.util.equals(ExecutionEnv, a, b); + } +} + diff --git a/flyteidl/gen/pb-go/flyteidl/core/execution_envs.pb.go b/flyteidl/gen/pb-go/flyteidl/core/execution_envs.pb.go new file mode 100644 index 0000000000..1384843c87 --- /dev/null +++ b/flyteidl/gen/pb-go/flyteidl/core/execution_envs.pb.go @@ -0,0 +1,321 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: flyteidl/core/execution_envs.proto + +package core + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + 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) +) + +// ExecutionEnvAssignment is a message that is used to assign an execution environment to a set of +// nodes. +type ExecutionEnvAssignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // node_ids is a list of node ids that are being assigned the execution environment. + NodeIds []string `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` + // task_type is the type of task that is being assigned. This is used to override which Flyte + // plugin will be used during execution. + TaskType string `protobuf:"bytes,2,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"` + // execution_env is the environment that is being assigned to the nodes. + ExecutionEnv *ExecutionEnv `protobuf:"bytes,3,opt,name=execution_env,json=executionEnv,proto3" json:"execution_env,omitempty"` +} + +func (x *ExecutionEnvAssignment) Reset() { + *x = ExecutionEnvAssignment{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_core_execution_envs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionEnvAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionEnvAssignment) ProtoMessage() {} + +func (x *ExecutionEnvAssignment) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_core_execution_envs_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 ExecutionEnvAssignment.ProtoReflect.Descriptor instead. +func (*ExecutionEnvAssignment) Descriptor() ([]byte, []int) { + return file_flyteidl_core_execution_envs_proto_rawDescGZIP(), []int{0} +} + +func (x *ExecutionEnvAssignment) GetNodeIds() []string { + if x != nil { + return x.NodeIds + } + return nil +} + +func (x *ExecutionEnvAssignment) GetTaskType() string { + if x != nil { + return x.TaskType + } + return "" +} + +func (x *ExecutionEnvAssignment) GetExecutionEnv() *ExecutionEnv { + if x != nil { + return x.ExecutionEnv + } + return nil +} + +// ExecutionEnv is a message that is used to specify the execution environment. +type ExecutionEnv struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is a unique identifier for the execution environment. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // type is the type of the execution environment. + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + // environment is a oneof field that can be used to specify the environment in different ways. + // + // Types that are assignable to Environment: + // + // *ExecutionEnv_Extant + // *ExecutionEnv_Spec + Environment isExecutionEnv_Environment `protobuf_oneof:"environment"` +} + +func (x *ExecutionEnv) Reset() { + *x = ExecutionEnv{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_core_execution_envs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionEnv) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionEnv) ProtoMessage() {} + +func (x *ExecutionEnv) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_core_execution_envs_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 ExecutionEnv.ProtoReflect.Descriptor instead. +func (*ExecutionEnv) Descriptor() ([]byte, []int) { + return file_flyteidl_core_execution_envs_proto_rawDescGZIP(), []int{1} +} + +func (x *ExecutionEnv) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ExecutionEnv) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (m *ExecutionEnv) GetEnvironment() isExecutionEnv_Environment { + if m != nil { + return m.Environment + } + return nil +} + +func (x *ExecutionEnv) GetExtant() *structpb.Struct { + if x, ok := x.GetEnvironment().(*ExecutionEnv_Extant); ok { + return x.Extant + } + return nil +} + +func (x *ExecutionEnv) GetSpec() *structpb.Struct { + if x, ok := x.GetEnvironment().(*ExecutionEnv_Spec); ok { + return x.Spec + } + return nil +} + +type isExecutionEnv_Environment interface { + isExecutionEnv_Environment() +} + +type ExecutionEnv_Extant struct { + // extant is a reference to an existing environment. + Extant *structpb.Struct `protobuf:"bytes,3,opt,name=extant,proto3,oneof"` +} + +type ExecutionEnv_Spec struct { + // spec is a specification of the environment. + Spec *structpb.Struct `protobuf:"bytes,4,opt,name=spec,proto3,oneof"` +} + +func (*ExecutionEnv_Extant) isExecutionEnv_Environment() {} + +func (*ExecutionEnv_Spec) isExecutionEnv_Environment() {} + +var File_flyteidl_core_execution_envs_proto protoreflect.FileDescriptor + +var file_flyteidl_core_execution_envs_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x6e, 0x76, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x52, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x22, 0xa3, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x65, + 0x78, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x65, 0x78, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x2d, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x42, 0x0d, 0x0a, + 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0xb8, 0x01, 0x0a, + 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x42, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0d, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x19, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_flyteidl_core_execution_envs_proto_rawDescOnce sync.Once + file_flyteidl_core_execution_envs_proto_rawDescData = file_flyteidl_core_execution_envs_proto_rawDesc +) + +func file_flyteidl_core_execution_envs_proto_rawDescGZIP() []byte { + file_flyteidl_core_execution_envs_proto_rawDescOnce.Do(func() { + file_flyteidl_core_execution_envs_proto_rawDescData = protoimpl.X.CompressGZIP(file_flyteidl_core_execution_envs_proto_rawDescData) + }) + return file_flyteidl_core_execution_envs_proto_rawDescData +} + +var file_flyteidl_core_execution_envs_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_flyteidl_core_execution_envs_proto_goTypes = []interface{}{ + (*ExecutionEnvAssignment)(nil), // 0: flyteidl.core.ExecutionEnvAssignment + (*ExecutionEnv)(nil), // 1: flyteidl.core.ExecutionEnv + (*structpb.Struct)(nil), // 2: google.protobuf.Struct +} +var file_flyteidl_core_execution_envs_proto_depIdxs = []int32{ + 1, // 0: flyteidl.core.ExecutionEnvAssignment.execution_env:type_name -> flyteidl.core.ExecutionEnv + 2, // 1: flyteidl.core.ExecutionEnv.extant:type_name -> google.protobuf.Struct + 2, // 2: flyteidl.core.ExecutionEnv.spec:type_name -> google.protobuf.Struct + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_flyteidl_core_execution_envs_proto_init() } +func file_flyteidl_core_execution_envs_proto_init() { + if File_flyteidl_core_execution_envs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_flyteidl_core_execution_envs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionEnvAssignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_core_execution_envs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionEnv); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_flyteidl_core_execution_envs_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*ExecutionEnv_Extant)(nil), + (*ExecutionEnv_Spec)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_flyteidl_core_execution_envs_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_flyteidl_core_execution_envs_proto_goTypes, + DependencyIndexes: file_flyteidl_core_execution_envs_proto_depIdxs, + MessageInfos: file_flyteidl_core_execution_envs_proto_msgTypes, + }.Build() + File_flyteidl_core_execution_envs_proto = out.File + file_flyteidl_core_execution_envs_proto_rawDesc = nil + file_flyteidl_core_execution_envs_proto_goTypes = nil + file_flyteidl_core_execution_envs_proto_depIdxs = nil +} diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/core/execution_envs.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/core/execution_envs.swagger.json new file mode 100644 index 0000000000..434e85e2ee --- /dev/null +++ b/flyteidl/gen/pb-go/gateway/flyteidl/core/execution_envs.swagger.json @@ -0,0 +1,46 @@ +{ + "swagger": "2.0", + "info": { + "title": "flyteidl/core/execution_envs.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + } + } +} diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index 54bd68f461..5c991ecc68 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -7575,6 +7575,143 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of an ExecutionEnvAssignment. */ + interface IExecutionEnvAssignment { + + /** ExecutionEnvAssignment nodeIds */ + nodeIds?: (string[]|null); + + /** ExecutionEnvAssignment taskType */ + taskType?: (string|null); + + /** ExecutionEnvAssignment executionEnv */ + executionEnv?: (flyteidl.core.IExecutionEnv|null); + } + + /** Represents an ExecutionEnvAssignment. */ + class ExecutionEnvAssignment implements IExecutionEnvAssignment { + + /** + * Constructs a new ExecutionEnvAssignment. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.core.IExecutionEnvAssignment); + + /** ExecutionEnvAssignment nodeIds. */ + public nodeIds: string[]; + + /** ExecutionEnvAssignment taskType. */ + public taskType: string; + + /** ExecutionEnvAssignment executionEnv. */ + public executionEnv?: (flyteidl.core.IExecutionEnv|null); + + /** + * Creates a new ExecutionEnvAssignment instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionEnvAssignment instance + */ + public static create(properties?: flyteidl.core.IExecutionEnvAssignment): flyteidl.core.ExecutionEnvAssignment; + + /** + * Encodes the specified ExecutionEnvAssignment message. Does not implicitly {@link flyteidl.core.ExecutionEnvAssignment.verify|verify} messages. + * @param message ExecutionEnvAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.core.IExecutionEnvAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionEnvAssignment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionEnvAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.ExecutionEnvAssignment; + + /** + * Verifies an ExecutionEnvAssignment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of an ExecutionEnv. */ + interface IExecutionEnv { + + /** ExecutionEnv id */ + id?: (string|null); + + /** ExecutionEnv type */ + type?: (string|null); + + /** ExecutionEnv extant */ + extant?: (google.protobuf.IStruct|null); + + /** ExecutionEnv spec */ + spec?: (google.protobuf.IStruct|null); + } + + /** Represents an ExecutionEnv. */ + class ExecutionEnv implements IExecutionEnv { + + /** + * Constructs a new ExecutionEnv. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.core.IExecutionEnv); + + /** ExecutionEnv id. */ + public id: string; + + /** ExecutionEnv type. */ + public type: string; + + /** ExecutionEnv extant. */ + public extant?: (google.protobuf.IStruct|null); + + /** ExecutionEnv spec. */ + public spec?: (google.protobuf.IStruct|null); + + /** ExecutionEnv environment. */ + public environment?: ("extant"|"spec"); + + /** + * Creates a new ExecutionEnv instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionEnv instance + */ + public static create(properties?: flyteidl.core.IExecutionEnv): flyteidl.core.ExecutionEnv; + + /** + * Encodes the specified ExecutionEnv message. Does not implicitly {@link flyteidl.core.ExecutionEnv.verify|verify} messages. + * @param message ExecutionEnv message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.core.IExecutionEnv, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionEnv message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionEnv + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.ExecutionEnv; + + /** + * Verifies an ExecutionEnv message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a Span. */ interface ISpan { diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 8a47c9bf30..de4f70cbd5 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -18316,6 +18316,348 @@ return ErrorDocument; })(); + core.ExecutionEnvAssignment = (function() { + + /** + * Properties of an ExecutionEnvAssignment. + * @memberof flyteidl.core + * @interface IExecutionEnvAssignment + * @property {Array.|null} [nodeIds] ExecutionEnvAssignment nodeIds + * @property {string|null} [taskType] ExecutionEnvAssignment taskType + * @property {flyteidl.core.IExecutionEnv|null} [executionEnv] ExecutionEnvAssignment executionEnv + */ + + /** + * Constructs a new ExecutionEnvAssignment. + * @memberof flyteidl.core + * @classdesc Represents an ExecutionEnvAssignment. + * @implements IExecutionEnvAssignment + * @constructor + * @param {flyteidl.core.IExecutionEnvAssignment=} [properties] Properties to set + */ + function ExecutionEnvAssignment(properties) { + this.nodeIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionEnvAssignment nodeIds. + * @member {Array.} nodeIds + * @memberof flyteidl.core.ExecutionEnvAssignment + * @instance + */ + ExecutionEnvAssignment.prototype.nodeIds = $util.emptyArray; + + /** + * ExecutionEnvAssignment taskType. + * @member {string} taskType + * @memberof flyteidl.core.ExecutionEnvAssignment + * @instance + */ + ExecutionEnvAssignment.prototype.taskType = ""; + + /** + * ExecutionEnvAssignment executionEnv. + * @member {flyteidl.core.IExecutionEnv|null|undefined} executionEnv + * @memberof flyteidl.core.ExecutionEnvAssignment + * @instance + */ + ExecutionEnvAssignment.prototype.executionEnv = null; + + /** + * Creates a new ExecutionEnvAssignment instance using the specified properties. + * @function create + * @memberof flyteidl.core.ExecutionEnvAssignment + * @static + * @param {flyteidl.core.IExecutionEnvAssignment=} [properties] Properties to set + * @returns {flyteidl.core.ExecutionEnvAssignment} ExecutionEnvAssignment instance + */ + ExecutionEnvAssignment.create = function create(properties) { + return new ExecutionEnvAssignment(properties); + }; + + /** + * Encodes the specified ExecutionEnvAssignment message. Does not implicitly {@link flyteidl.core.ExecutionEnvAssignment.verify|verify} messages. + * @function encode + * @memberof flyteidl.core.ExecutionEnvAssignment + * @static + * @param {flyteidl.core.IExecutionEnvAssignment} message ExecutionEnvAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionEnvAssignment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeIds != null && message.nodeIds.length) + for (var i = 0; i < message.nodeIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.nodeIds[i]); + if (message.taskType != null && message.hasOwnProperty("taskType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskType); + if (message.executionEnv != null && message.hasOwnProperty("executionEnv")) + $root.flyteidl.core.ExecutionEnv.encode(message.executionEnv, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Decodes an ExecutionEnvAssignment message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.core.ExecutionEnvAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.core.ExecutionEnvAssignment} ExecutionEnvAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionEnvAssignment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.ExecutionEnvAssignment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.nodeIds && message.nodeIds.length)) + message.nodeIds = []; + message.nodeIds.push(reader.string()); + break; + case 2: + message.taskType = reader.string(); + break; + case 3: + message.executionEnv = $root.flyteidl.core.ExecutionEnv.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an ExecutionEnvAssignment message. + * @function verify + * @memberof flyteidl.core.ExecutionEnvAssignment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionEnvAssignment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeIds != null && message.hasOwnProperty("nodeIds")) { + if (!Array.isArray(message.nodeIds)) + return "nodeIds: array expected"; + for (var i = 0; i < message.nodeIds.length; ++i) + if (!$util.isString(message.nodeIds[i])) + return "nodeIds: string[] expected"; + } + if (message.taskType != null && message.hasOwnProperty("taskType")) + if (!$util.isString(message.taskType)) + return "taskType: string expected"; + if (message.executionEnv != null && message.hasOwnProperty("executionEnv")) { + var error = $root.flyteidl.core.ExecutionEnv.verify(message.executionEnv); + if (error) + return "executionEnv." + error; + } + return null; + }; + + return ExecutionEnvAssignment; + })(); + + core.ExecutionEnv = (function() { + + /** + * Properties of an ExecutionEnv. + * @memberof flyteidl.core + * @interface IExecutionEnv + * @property {string|null} [id] ExecutionEnv id + * @property {string|null} [type] ExecutionEnv type + * @property {google.protobuf.IStruct|null} [extant] ExecutionEnv extant + * @property {google.protobuf.IStruct|null} [spec] ExecutionEnv spec + */ + + /** + * Constructs a new ExecutionEnv. + * @memberof flyteidl.core + * @classdesc Represents an ExecutionEnv. + * @implements IExecutionEnv + * @constructor + * @param {flyteidl.core.IExecutionEnv=} [properties] Properties to set + */ + function ExecutionEnv(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionEnv id. + * @member {string} id + * @memberof flyteidl.core.ExecutionEnv + * @instance + */ + ExecutionEnv.prototype.id = ""; + + /** + * ExecutionEnv type. + * @member {string} type + * @memberof flyteidl.core.ExecutionEnv + * @instance + */ + ExecutionEnv.prototype.type = ""; + + /** + * ExecutionEnv extant. + * @member {google.protobuf.IStruct|null|undefined} extant + * @memberof flyteidl.core.ExecutionEnv + * @instance + */ + ExecutionEnv.prototype.extant = null; + + /** + * ExecutionEnv spec. + * @member {google.protobuf.IStruct|null|undefined} spec + * @memberof flyteidl.core.ExecutionEnv + * @instance + */ + ExecutionEnv.prototype.spec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecutionEnv environment. + * @member {"extant"|"spec"|undefined} environment + * @memberof flyteidl.core.ExecutionEnv + * @instance + */ + Object.defineProperty(ExecutionEnv.prototype, "environment", { + get: $util.oneOfGetter($oneOfFields = ["extant", "spec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecutionEnv instance using the specified properties. + * @function create + * @memberof flyteidl.core.ExecutionEnv + * @static + * @param {flyteidl.core.IExecutionEnv=} [properties] Properties to set + * @returns {flyteidl.core.ExecutionEnv} ExecutionEnv instance + */ + ExecutionEnv.create = function create(properties) { + return new ExecutionEnv(properties); + }; + + /** + * Encodes the specified ExecutionEnv message. Does not implicitly {@link flyteidl.core.ExecutionEnv.verify|verify} messages. + * @function encode + * @memberof flyteidl.core.ExecutionEnv + * @static + * @param {flyteidl.core.IExecutionEnv} message ExecutionEnv message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionEnv.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.extant != null && message.hasOwnProperty("extant")) + $root.google.protobuf.Struct.encode(message.extant, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.spec != null && message.hasOwnProperty("spec")) + $root.google.protobuf.Struct.encode(message.spec, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Decodes an ExecutionEnv message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.core.ExecutionEnv + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.core.ExecutionEnv} ExecutionEnv + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionEnv.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.ExecutionEnv(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.type = reader.string(); + break; + case 3: + message.extant = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 4: + message.spec = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an ExecutionEnv message. + * @function verify + * @memberof flyteidl.core.ExecutionEnv + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionEnv.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.extant != null && message.hasOwnProperty("extant")) { + properties.environment = 1; + { + var error = $root.google.protobuf.Struct.verify(message.extant); + if (error) + return "extant." + error; + } + } + if (message.spec != null && message.hasOwnProperty("spec")) { + if (properties.environment === 1) + return "environment: multiple values"; + properties.environment = 1; + { + var error = $root.google.protobuf.Struct.verify(message.spec); + if (error) + return "spec." + error; + } + } + return null; + }; + + return ExecutionEnv; + })(); + core.Span = (function() { /** diff --git a/flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2.py b/flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2.py new file mode 100644 index 0000000000..491b9460e1 --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: flyteidl/core/execution_envs.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"flyteidl/core/execution_envs.proto\x12\rflyteidl.core\x1a\x1cgoogle/protobuf/struct.proto\"\x92\x01\n\x16\x45xecutionEnvAssignment\x12\x19\n\x08node_ids\x18\x01 \x03(\tR\x07nodeIds\x12\x1b\n\ttask_type\x18\x02 \x01(\tR\x08taskType\x12@\n\rexecution_env\x18\x03 \x01(\x0b\x32\x1b.flyteidl.core.ExecutionEnvR\x0c\x65xecutionEnv\"\xa3\x01\n\x0c\x45xecutionEnv\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04type\x18\x02 \x01(\tR\x04type\x12\x31\n\x06\x65xtant\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructH\x00R\x06\x65xtant\x12-\n\x04spec\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructH\x00R\x04specB\r\n\x0b\x65nvironmentB\xb8\x01\n\x11\x63om.flyteidl.coreB\x12\x45xecutionEnvsProtoP\x01Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\xa2\x02\x03\x46\x43X\xaa\x02\rFlyteidl.Core\xca\x02\rFlyteidl\\Core\xe2\x02\x19\x46lyteidl\\Core\\GPBMetadata\xea\x02\x0e\x46lyteidl::Coreb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flyteidl.core.execution_envs_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\021com.flyteidl.coreB\022ExecutionEnvsProtoP\001Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\242\002\003FCX\252\002\rFlyteidl.Core\312\002\rFlyteidl\\Core\342\002\031Flyteidl\\Core\\GPBMetadata\352\002\016Flyteidl::Core' + _globals['_EXECUTIONENVASSIGNMENT']._serialized_start=84 + _globals['_EXECUTIONENVASSIGNMENT']._serialized_end=230 + _globals['_EXECUTIONENV']._serialized_start=233 + _globals['_EXECUTIONENV']._serialized_end=396 +# @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2.pyi new file mode 100644 index 0000000000..1757c430af --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2.pyi @@ -0,0 +1,29 @@ +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ExecutionEnvAssignment(_message.Message): + __slots__ = ["node_ids", "task_type", "execution_env"] + NODE_IDS_FIELD_NUMBER: _ClassVar[int] + TASK_TYPE_FIELD_NUMBER: _ClassVar[int] + EXECUTION_ENV_FIELD_NUMBER: _ClassVar[int] + node_ids: _containers.RepeatedScalarFieldContainer[str] + task_type: str + execution_env: ExecutionEnv + def __init__(self, node_ids: _Optional[_Iterable[str]] = ..., task_type: _Optional[str] = ..., execution_env: _Optional[_Union[ExecutionEnv, _Mapping]] = ...) -> None: ... + +class ExecutionEnv(_message.Message): + __slots__ = ["id", "type", "extant", "spec"] + ID_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + EXTANT_FIELD_NUMBER: _ClassVar[int] + SPEC_FIELD_NUMBER: _ClassVar[int] + id: str + type: str + extant: _struct_pb2.Struct + spec: _struct_pb2.Struct + def __init__(self, id: _Optional[str] = ..., type: _Optional[str] = ..., extant: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., spec: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2_grpc.py b/flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2_grpc.py new file mode 100644 index 0000000000..2daafffebf --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/core/execution_envs_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/flyteidl/gen/pb_rust/flyteidl.core.rs b/flyteidl/gen/pb_rust/flyteidl.core.rs index 5612d9c7a2..888b617202 100644 --- a/flyteidl/gen/pb_rust/flyteidl.core.rs +++ b/flyteidl/gen/pb_rust/flyteidl.core.rs @@ -3023,6 +3023,50 @@ pub struct ErrorDocument { #[prost(message, optional, tag="1")] pub error: ::core::option::Option, } +/// ExecutionEnvAssignment is a message that is used to assign an execution environment to a set of +/// nodes. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecutionEnvAssignment { + /// node_ids is a list of node ids that are being assigned the execution environment. + #[prost(string, repeated, tag="1")] + pub node_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// task_type is the type of task that is being assigned. This is used to override which Flyte + /// plugin will be used during execution. + #[prost(string, tag="2")] + pub task_type: ::prost::alloc::string::String, + /// execution_env is the environment that is being assigned to the nodes. + #[prost(message, optional, tag="3")] + pub execution_env: ::core::option::Option, +} +/// ExecutionEnv is a message that is used to specify the execution environment. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecutionEnv { + /// id is a unique identifier for the execution environment. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// type is the type of the execution environment. + #[prost(string, tag="2")] + pub r#type: ::prost::alloc::string::String, + /// environment is a oneof field that can be used to specify the environment in different ways. + #[prost(oneof="execution_env::Environment", tags="3, 4")] + pub environment: ::core::option::Option, +} +/// Nested message and enum types in `ExecutionEnv`. +pub mod execution_env { + /// environment is a oneof field that can be used to specify the environment in different ways. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Environment { + /// extant is a reference to an existing environment. + #[prost(message, tag="3")] + Extant(::prost_types::Struct), + /// spec is a specification of the environment. + #[prost(message, tag="4")] + Spec(::prost_types::Struct), + } +} /// Defines an enclosed package of workflow and tasks it references. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/flyteidl/protos/flyteidl/core/execution_envs.proto b/flyteidl/protos/flyteidl/core/execution_envs.proto new file mode 100644 index 0000000000..12aaa00dd5 --- /dev/null +++ b/flyteidl/protos/flyteidl/core/execution_envs.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +package flyteidl.core; + +option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"; + +import "google/protobuf/struct.proto"; + +// ExecutionEnvAssignment is a message that is used to assign an execution environment to a set of +// nodes. +message ExecutionEnvAssignment { + // node_ids is a list of node ids that are being assigned the execution environment. + repeated string node_ids = 1; + + // task_type is the type of task that is being assigned. This is used to override which Flyte + // plugin will be used during execution. + string task_type = 2; + + // execution_env is the environment that is being assigned to the nodes. + ExecutionEnv execution_env = 3; +} + +// ExecutionEnv is a message that is used to specify the execution environment. +message ExecutionEnv { + // id is a unique identifier for the execution environment. + string id = 1; + + // type is the type of the execution environment. + string type = 2; + + // environment is a oneof field that can be used to specify the environment in different ways. + oneof environment { + // extant is a reference to an existing environment. + google.protobuf.Struct extant = 3; + + // spec is a specification of the environment. + google.protobuf.Struct spec = 4; + } +}