diff --git a/gen/pb-cpp/flyteidl/core/errors.pb.cc b/gen/pb-cpp/flyteidl/core/errors.pb.cc index 5a03977e4..51b8f2e5b 100644 --- a/gen/pb-cpp/flyteidl/core/errors.pb.cc +++ b/gen/pb-cpp/flyteidl/core/errors.pb.cc @@ -76,6 +76,7 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fcore_2ferrors_2eproto::o PROTOBUF_FIELD_OFFSET(::flyteidl::core::ContainerError, code_), PROTOBUF_FIELD_OFFSET(::flyteidl::core::ContainerError, message_), PROTOBUF_FIELD_OFFSET(::flyteidl::core::ContainerError, kind_), + PROTOBUF_FIELD_OFFSET(::flyteidl::core::ContainerError, origin_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::flyteidl::core::ErrorDocument, _internal_metadata_), ~0u, // no _extensions_ @@ -85,7 +86,7 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fcore_2ferrors_2eproto::o }; static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::flyteidl::core::ContainerError)}, - { 8, -1, sizeof(::flyteidl::core::ErrorDocument)}, + { 9, -1, sizeof(::flyteidl::core::ErrorDocument)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { @@ -101,25 +102,28 @@ ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_fl const char descriptor_table_protodef_flyteidl_2fcore_2ferrors_2eproto[] = "\n\032flyteidl/core/errors.proto\022\rflyteidl.c" - "ore\"\217\001\n\016ContainerError\022\014\n\004code\030\001 \001(\t\022\017\n\007" - "message\030\002 \001(\t\0220\n\004kind\030\003 \001(\0162\".flyteidl.c" - "ore.ContainerError.Kind\",\n\004Kind\022\023\n\017NON_R" - "ECOVERABLE\020\000\022\017\n\013RECOVERABLE\020\001\"=\n\rErrorDo" - "cument\022,\n\005error\030\001 \001(\0132\035.flyteidl.core.Co" - "ntainerErrorB2Z0github.com/lyft/flyteidl" - "/gen/pb-go/flyteidl/coreb\006proto3" + "ore\032\035flyteidl/core/execution.proto\"\310\001\n\016C" + "ontainerError\022\014\n\004code\030\001 \001(\t\022\017\n\007message\030\002" + " \001(\t\0220\n\004kind\030\003 \001(\0162\".flyteidl.core.Conta" + "inerError.Kind\0227\n\006origin\030\004 \001(\0162\'.flyteid" + "l.core.ExecutionError.ErrorKind\",\n\004Kind\022" + "\023\n\017NON_RECOVERABLE\020\000\022\017\n\013RECOVERABLE\020\001\"=\n" + "\rErrorDocument\022,\n\005error\030\001 \001(\0132\035.flyteidl" + ".core.ContainerErrorB2Z0github.com/lyft/" + "flyteidl/gen/pb-go/flyteidl/coreb\006proto3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fcore_2ferrors_2eproto = { false, InitDefaults_flyteidl_2fcore_2ferrors_2eproto, descriptor_table_protodef_flyteidl_2fcore_2ferrors_2eproto, - "flyteidl/core/errors.proto", &assign_descriptors_table_flyteidl_2fcore_2ferrors_2eproto, 312, + "flyteidl/core/errors.proto", &assign_descriptors_table_flyteidl_2fcore_2ferrors_2eproto, 400, }; void AddDescriptors_flyteidl_2fcore_2ferrors_2eproto() { static constexpr ::google::protobuf::internal::InitFunc deps[1] = { + ::AddDescriptors_flyteidl_2fcore_2fexecution_2eproto, }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fcore_2ferrors_2eproto, deps, 0); + ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fcore_2ferrors_2eproto, deps, 1); } // Force running AddDescriptors() at dynamic initialization time. @@ -160,6 +164,7 @@ class ContainerError::HasBitSetters { const int ContainerError::kCodeFieldNumber; const int ContainerError::kMessageFieldNumber; const int ContainerError::kKindFieldNumber; +const int ContainerError::kOriginFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ContainerError::ContainerError() @@ -179,7 +184,9 @@ ContainerError::ContainerError(const ContainerError& from) if (from.message().size() > 0) { message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); } - kind_ = from.kind_; + ::memcpy(&kind_, &from.kind_, + static_cast(reinterpret_cast(&origin_) - + reinterpret_cast(&kind_)) + sizeof(origin_)); // @@protoc_insertion_point(copy_constructor:flyteidl.core.ContainerError) } @@ -188,7 +195,9 @@ void ContainerError::SharedCtor() { &scc_info_ContainerError_flyteidl_2fcore_2ferrors_2eproto.base); code_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - kind_ = 0; + ::memset(&kind_, 0, static_cast( + reinterpret_cast(&origin_) - + reinterpret_cast(&kind_)) + sizeof(origin_)); } ContainerError::~ContainerError() { @@ -218,7 +227,9 @@ void ContainerError::Clear() { code_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - kind_ = 0; + ::memset(&kind_, 0, static_cast( + reinterpret_cast(&origin_) - + reinterpret_cast(&kind_)) + sizeof(origin_)); _internal_metadata_.Clear(); } @@ -275,6 +286,14 @@ const char* ContainerError::_InternalParse(const char* begin, const char* end, v GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } + // .flyteidl.core.ExecutionError.ErrorKind origin = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; + ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + msg->set_origin(static_cast<::flyteidl::core::ExecutionError_ErrorKind>(val)); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + break; + } default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -353,6 +372,20 @@ bool ContainerError::MergePartialFromCodedStream( break; } + // .flyteidl.core.ExecutionError.ErrorKind origin = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + int value = 0; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_origin(static_cast< ::flyteidl::core::ExecutionError_ErrorKind >(value)); + } else { + goto handle_unusual; + } + break; + } + default: { handle_unusual: if (tag == 0) { @@ -406,6 +439,12 @@ void ContainerError::SerializeWithCachedSizes( 3, this->kind(), output); } + // .flyteidl.core.ExecutionError.ErrorKind origin = 4; + if (this->origin() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 4, this->origin(), output); + } + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); @@ -447,6 +486,12 @@ ::google::protobuf::uint8* ContainerError::InternalSerializeWithCachedSizesToArr 3, this->kind(), target); } + // .flyteidl.core.ExecutionError.ErrorKind origin = 4; + if (this->origin() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 4, this->origin(), target); + } + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); @@ -488,6 +533,12 @@ size_t ContainerError::ByteSizeLong() const { ::google::protobuf::internal::WireFormatLite::EnumSize(this->kind()); } + // .flyteidl.core.ExecutionError.ErrorKind origin = 4; + if (this->origin() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->origin()); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -526,6 +577,9 @@ void ContainerError::MergeFrom(const ContainerError& from) { if (from.kind() != 0) { set_kind(from.kind()); } + if (from.origin() != 0) { + set_origin(from.origin()); + } } void ContainerError::CopyFrom(const ::google::protobuf::Message& from) { @@ -558,6 +612,7 @@ void ContainerError::InternalSwap(ContainerError* other) { message_.Swap(&other->message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(kind_, other->kind_); + swap(origin_, other->origin_); } ::google::protobuf::Metadata ContainerError::GetMetadata() const { diff --git a/gen/pb-cpp/flyteidl/core/errors.pb.h b/gen/pb-cpp/flyteidl/core/errors.pb.h index 552bbc217..993d23487 100644 --- a/gen/pb-cpp/flyteidl/core/errors.pb.h +++ b/gen/pb-cpp/flyteidl/core/errors.pb.h @@ -32,6 +32,7 @@ #include // IWYU pragma: export #include #include +#include "flyteidl/core/execution.pb.h" // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_flyteidl_2fcore_2ferrors_2eproto @@ -246,6 +247,12 @@ class ContainerError final : ::flyteidl::core::ContainerError_Kind kind() const; void set_kind(::flyteidl::core::ContainerError_Kind value); + // .flyteidl.core.ExecutionError.ErrorKind origin = 4; + void clear_origin(); + static const int kOriginFieldNumber = 4; + ::flyteidl::core::ExecutionError_ErrorKind origin() const; + void set_origin(::flyteidl::core::ExecutionError_ErrorKind value); + // @@protoc_insertion_point(class_scope:flyteidl.core.ContainerError) private: class HasBitSetters; @@ -254,6 +261,7 @@ class ContainerError final : ::google::protobuf::internal::ArenaStringPtr code_; ::google::protobuf::internal::ArenaStringPtr message_; int kind_; + int origin_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_flyteidl_2fcore_2ferrors_2eproto; }; @@ -503,6 +511,20 @@ inline void ContainerError::set_kind(::flyteidl::core::ContainerError_Kind value // @@protoc_insertion_point(field_set:flyteidl.core.ContainerError.kind) } +// .flyteidl.core.ExecutionError.ErrorKind origin = 4; +inline void ContainerError::clear_origin() { + origin_ = 0; +} +inline ::flyteidl::core::ExecutionError_ErrorKind ContainerError::origin() const { + // @@protoc_insertion_point(field_get:flyteidl.core.ContainerError.origin) + return static_cast< ::flyteidl::core::ExecutionError_ErrorKind >(origin_); +} +inline void ContainerError::set_origin(::flyteidl::core::ExecutionError_ErrorKind value) { + + origin_ = value; + // @@protoc_insertion_point(field_set:flyteidl.core.ContainerError.origin) +} + // ------------------------------------------------------------------- // ErrorDocument diff --git a/gen/pb-go/flyteidl/core/errors.pb.go b/gen/pb-go/flyteidl/core/errors.pb.go index f39246944..036215bb4 100644 --- a/gen/pb-go/flyteidl/core/errors.pb.go +++ b/gen/pb-go/flyteidl/core/errors.pb.go @@ -54,10 +54,12 @@ type ContainerError struct { // A detailed error message. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // An abstract error kind for this error. Defaults to Non_Recoverable if not specified. - Kind ContainerError_Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=flyteidl.core.ContainerError_Kind" json:"kind,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Kind ContainerError_Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=flyteidl.core.ContainerError_Kind" json:"kind,omitempty"` + // Defines the origin of the error (system, user, unknown). + Origin ExecutionError_ErrorKind `protobuf:"varint,4,opt,name=origin,proto3,enum=flyteidl.core.ExecutionError_ErrorKind" json:"origin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ContainerError) Reset() { *m = ContainerError{} } @@ -106,6 +108,13 @@ func (m *ContainerError) GetKind() ContainerError_Kind { return ContainerError_NON_RECOVERABLE } +func (m *ContainerError) GetOrigin() ExecutionError_ErrorKind { + if m != nil { + return m.Origin + } + return ExecutionError_UNKNOWN +} + // Defines the errors.pb file format the container can produce to communicate // failure reasons to the execution engine. type ErrorDocument struct { @@ -157,21 +166,23 @@ func init() { func init() { proto.RegisterFile("flyteidl/core/errors.proto", fileDescriptor_c2a49b99f342b879) } var fileDescriptor_c2a49b99f342b879 = []byte{ - // 245 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xcb, 0xa9, 0x2c, - 0x49, 0xcd, 0x4c, 0xc9, 0xd1, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0x2d, 0x2a, 0xca, 0x2f, 0x2a, - 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x85, 0xc9, 0xe9, 0x81, 0xe4, 0x94, 0x96, 0x30, - 0x72, 0xf1, 0x39, 0xe7, 0xe7, 0x95, 0x24, 0x66, 0xe6, 0xa5, 0x16, 0xb9, 0x82, 0x14, 0x0a, 0x09, - 0x71, 0xb1, 0x24, 0xe7, 0xa7, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x42, - 0x12, 0x5c, 0xec, 0xb9, 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0xa9, 0x12, 0x4c, 0x60, 0x61, 0x18, 0x57, - 0xc8, 0x8c, 0x8b, 0x25, 0x3b, 0x33, 0x2f, 0x45, 0x82, 0x59, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x49, - 0x0f, 0xc5, 0x78, 0x3d, 0x54, 0xa3, 0xf5, 0xbc, 0x33, 0xf3, 0x52, 0x82, 0xc0, 0xea, 0x95, 0x74, - 0xb8, 0x58, 0x40, 0x3c, 0x21, 0x61, 0x2e, 0x7e, 0x3f, 0x7f, 0xbf, 0xf8, 0x20, 0x57, 0x67, 0xff, - 0x30, 0xd7, 0x20, 0x47, 0x27, 0x1f, 0x57, 0x01, 0x06, 0x21, 0x7e, 0x2e, 0x6e, 0x64, 0x01, 0x46, - 0x25, 0x17, 0x2e, 0x5e, 0xb0, 0x09, 0x2e, 0xf9, 0xc9, 0xa5, 0xb9, 0xa9, 0x79, 0x25, 0x42, 0xc6, - 0x5c, 0xac, 0x60, 0x6f, 0x81, 0x5d, 0xc9, 0x6d, 0x24, 0x8b, 0xd7, 0xde, 0x20, 0x88, 0x5a, 0x27, - 0xa3, 0x28, 0x83, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x9c, 0xca, - 0xb4, 0x12, 0x7d, 0x78, 0x48, 0xa5, 0xa7, 0xe6, 0xe9, 0x17, 0x24, 0xe9, 0xa6, 0xe7, 0xeb, 0xa3, - 0x04, 0x5e, 0x12, 0x1b, 0x38, 0xd8, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xbe, 0xb8, - 0x64, 0x54, 0x01, 0x00, 0x00, + // 285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x41, 0x4b, 0xfb, 0x40, + 0x10, 0xc5, 0xff, 0xf9, 0x1b, 0x2b, 0x4e, 0x69, 0x2b, 0xeb, 0x25, 0x14, 0x0a, 0x25, 0x17, 0x7b, + 0xd0, 0x5d, 0x49, 0xc1, 0xab, 0xd8, 0x36, 0x27, 0xa5, 0x85, 0x1c, 0x3c, 0x78, 0x91, 0x26, 0xd9, + 0xc6, 0xc5, 0x64, 0xa7, 0x6c, 0x36, 0x60, 0x3f, 0xb0, 0xdf, 0x43, 0x32, 0x31, 0x62, 0x7a, 0xf0, + 0xb2, 0xec, 0xcc, 0xbc, 0xdf, 0xdb, 0xd9, 0x07, 0xe3, 0x5d, 0x7e, 0xb0, 0x52, 0xa5, 0xb9, 0x48, + 0xd0, 0x48, 0x21, 0x8d, 0x41, 0x53, 0xf2, 0xbd, 0x41, 0x8b, 0x6c, 0xd0, 0xce, 0x78, 0x3d, 0x1b, + 0x4f, 0x8e, 0xa4, 0x1f, 0x32, 0xa9, 0xac, 0x42, 0xdd, 0xa8, 0xfd, 0x4f, 0x07, 0x86, 0x4b, 0xd4, + 0x76, 0xab, 0xb4, 0x34, 0x61, 0xed, 0xc3, 0x18, 0xb8, 0x09, 0xa6, 0xd2, 0x73, 0xa6, 0xce, 0xec, + 0x3c, 0xa2, 0x3b, 0xf3, 0xe0, 0xac, 0x90, 0x65, 0xb9, 0xcd, 0xa4, 0xf7, 0x9f, 0xda, 0x6d, 0xc9, + 0xee, 0xc0, 0x7d, 0x57, 0x3a, 0xf5, 0x4e, 0xa6, 0xce, 0x6c, 0x18, 0xf8, 0xbc, 0xf3, 0x3a, 0xef, + 0x5a, 0xf3, 0x47, 0xa5, 0xd3, 0x88, 0xf4, 0xec, 0x1e, 0x7a, 0x68, 0x54, 0xa6, 0xb4, 0xe7, 0x12, + 0x79, 0x75, 0x44, 0x86, 0xed, 0xa2, 0x0d, 0x49, 0x27, 0xe1, 0xdf, 0x98, 0x7f, 0x0d, 0x6e, 0x5d, + 0xb3, 0x4b, 0x18, 0xad, 0x37, 0xeb, 0xd7, 0x28, 0x5c, 0x6e, 0x9e, 0xc3, 0xe8, 0x61, 0xf1, 0x14, + 0x5e, 0xfc, 0x63, 0x23, 0xe8, 0xff, 0x6e, 0x38, 0xfe, 0x0a, 0x06, 0x64, 0xb1, 0xc2, 0xa4, 0x2a, + 0xa4, 0xb6, 0x6c, 0x0e, 0xa7, 0x14, 0x1b, 0x7d, 0xb3, 0x1f, 0x4c, 0xfe, 0x5c, 0x3c, 0x6a, 0xb4, + 0x8b, 0xe0, 0xe5, 0x36, 0x53, 0xf6, 0xad, 0x8a, 0x79, 0x82, 0x85, 0xc8, 0x0f, 0x3b, 0x2b, 0x7e, + 0xe2, 0xcd, 0xa4, 0x16, 0xfb, 0xf8, 0x26, 0x43, 0xd1, 0x49, 0x3c, 0xee, 0x51, 0xd0, 0xf3, 0xaf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x4a, 0xfc, 0x79, 0xc4, 0xb4, 0x01, 0x00, 0x00, } diff --git a/gen/pb-go/flyteidl/core/errors.pb.validate.go b/gen/pb-go/flyteidl/core/errors.pb.validate.go index 8e977634a..4d091b1e6 100644 --- a/gen/pb-go/flyteidl/core/errors.pb.validate.go +++ b/gen/pb-go/flyteidl/core/errors.pb.validate.go @@ -50,6 +50,8 @@ func (m *ContainerError) Validate() error { // no validation rules for Kind + // no validation rules for Origin + return nil } diff --git a/gen/pb-java/flyteidl/core/Errors.java b/gen/pb-java/flyteidl/core/Errors.java index d794adb89..077cb58e0 100644 --- a/gen/pb-java/flyteidl/core/Errors.java +++ b/gen/pb-java/flyteidl/core/Errors.java @@ -70,6 +70,23 @@ public interface ContainerErrorOrBuilder extends * .flyteidl.core.ContainerError.Kind kind = 3; */ flyteidl.core.Errors.ContainerError.Kind getKind(); + + /** + *
+     * Defines the origin of the error (system, user, unknown).
+     * 
+ * + * .flyteidl.core.ExecutionError.ErrorKind origin = 4; + */ + int getOriginValue(); + /** + *
+     * Defines the origin of the error (system, user, unknown).
+     * 
+ * + * .flyteidl.core.ExecutionError.ErrorKind origin = 4; + */ + flyteidl.core.Execution.ExecutionError.ErrorKind getOrigin(); } /** *
@@ -92,6 +109,7 @@ private ContainerError() {
       code_ = "";
       message_ = "";
       kind_ = 0;
+      origin_ = 0;
     }
 
     @java.lang.Override
@@ -136,6 +154,12 @@ private ContainerError(
               kind_ = rawValue;
               break;
             }
+            case 32: {
+              int rawValue = input.readEnum();
+
+              origin_ = rawValue;
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -379,6 +403,31 @@ public flyteidl.core.Errors.ContainerError.Kind getKind() {
       return result == null ? flyteidl.core.Errors.ContainerError.Kind.UNRECOGNIZED : result;
     }
 
+    public static final int ORIGIN_FIELD_NUMBER = 4;
+    private int origin_;
+    /**
+     * 
+     * Defines the origin of the error (system, user, unknown).
+     * 
+ * + * .flyteidl.core.ExecutionError.ErrorKind origin = 4; + */ + public int getOriginValue() { + return origin_; + } + /** + *
+     * Defines the origin of the error (system, user, unknown).
+     * 
+ * + * .flyteidl.core.ExecutionError.ErrorKind origin = 4; + */ + public flyteidl.core.Execution.ExecutionError.ErrorKind getOrigin() { + @SuppressWarnings("deprecation") + flyteidl.core.Execution.ExecutionError.ErrorKind result = flyteidl.core.Execution.ExecutionError.ErrorKind.valueOf(origin_); + return result == null ? flyteidl.core.Execution.ExecutionError.ErrorKind.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -402,6 +451,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (kind_ != flyteidl.core.Errors.ContainerError.Kind.NON_RECOVERABLE.getNumber()) { output.writeEnum(3, kind_); } + if (origin_ != flyteidl.core.Execution.ExecutionError.ErrorKind.UNKNOWN.getNumber()) { + output.writeEnum(4, origin_); + } unknownFields.writeTo(output); } @@ -421,6 +473,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, kind_); } + if (origin_ != flyteidl.core.Execution.ExecutionError.ErrorKind.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, origin_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -441,6 +497,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMessage() .equals(other.getMessage())) return false; if (kind_ != other.kind_) return false; + if (origin_ != other.origin_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -458,6 +515,8 @@ public int hashCode() { hash = (53 * hash) + getMessage().hashCode(); hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + kind_; + hash = (37 * hash) + ORIGIN_FIELD_NUMBER; + hash = (53 * hash) + origin_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -602,6 +661,8 @@ public Builder clear() { kind_ = 0; + origin_ = 0; + return this; } @@ -631,6 +692,7 @@ public flyteidl.core.Errors.ContainerError buildPartial() { result.code_ = code_; result.message_ = message_; result.kind_ = kind_; + result.origin_ = origin_; onBuilt(); return result; } @@ -690,6 +752,9 @@ public Builder mergeFrom(flyteidl.core.Errors.ContainerError other) { if (other.kind_ != 0) { setKindValue(other.getKindValue()); } + if (other.origin_ != 0) { + setOriginValue(other.getOriginValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -961,6 +1026,71 @@ public Builder clearKind() { onChanged(); return this; } + + private int origin_ = 0; + /** + *
+       * Defines the origin of the error (system, user, unknown).
+       * 
+ * + * .flyteidl.core.ExecutionError.ErrorKind origin = 4; + */ + public int getOriginValue() { + return origin_; + } + /** + *
+       * Defines the origin of the error (system, user, unknown).
+       * 
+ * + * .flyteidl.core.ExecutionError.ErrorKind origin = 4; + */ + public Builder setOriginValue(int value) { + origin_ = value; + onChanged(); + return this; + } + /** + *
+       * Defines the origin of the error (system, user, unknown).
+       * 
+ * + * .flyteidl.core.ExecutionError.ErrorKind origin = 4; + */ + public flyteidl.core.Execution.ExecutionError.ErrorKind getOrigin() { + @SuppressWarnings("deprecation") + flyteidl.core.Execution.ExecutionError.ErrorKind result = flyteidl.core.Execution.ExecutionError.ErrorKind.valueOf(origin_); + return result == null ? flyteidl.core.Execution.ExecutionError.ErrorKind.UNRECOGNIZED : result; + } + /** + *
+       * Defines the origin of the error (system, user, unknown).
+       * 
+ * + * .flyteidl.core.ExecutionError.ErrorKind origin = 4; + */ + public Builder setOrigin(flyteidl.core.Execution.ExecutionError.ErrorKind value) { + if (value == null) { + throw new NullPointerException(); + } + + origin_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Defines the origin of the error (system, user, unknown).
+       * 
+ * + * .flyteidl.core.ExecutionError.ErrorKind origin = 4; + */ + public Builder clearOrigin() { + + origin_ = 0; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1710,13 +1840,15 @@ public flyteidl.core.Errors.ErrorDocument getDefaultInstanceForType() { static { java.lang.String[] descriptorData = { "\n\032flyteidl/core/errors.proto\022\rflyteidl.c" + - "ore\"\217\001\n\016ContainerError\022\014\n\004code\030\001 \001(\t\022\017\n\007" + - "message\030\002 \001(\t\0220\n\004kind\030\003 \001(\0162\".flyteidl.c" + - "ore.ContainerError.Kind\",\n\004Kind\022\023\n\017NON_R" + - "ECOVERABLE\020\000\022\017\n\013RECOVERABLE\020\001\"=\n\rErrorDo" + - "cument\022,\n\005error\030\001 \001(\0132\035.flyteidl.core.Co" + - "ntainerErrorB2Z0github.com/lyft/flyteidl" + - "/gen/pb-go/flyteidl/coreb\006proto3" + "ore\032\035flyteidl/core/execution.proto\"\310\001\n\016C" + + "ontainerError\022\014\n\004code\030\001 \001(\t\022\017\n\007message\030\002" + + " \001(\t\0220\n\004kind\030\003 \001(\0162\".flyteidl.core.Conta" + + "inerError.Kind\0227\n\006origin\030\004 \001(\0162\'.flyteid" + + "l.core.ExecutionError.ErrorKind\",\n\004Kind\022" + + "\023\n\017NON_RECOVERABLE\020\000\022\017\n\013RECOVERABLE\020\001\"=\n" + + "\rErrorDocument\022,\n\005error\030\001 \001(\0132\035.flyteidl" + + ".core.ContainerErrorB2Z0github.com/lyft/" + + "flyteidl/gen/pb-go/flyteidl/coreb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -1729,19 +1861,21 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + flyteidl.core.Execution.getDescriptor(), }, assigner); internal_static_flyteidl_core_ContainerError_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_flyteidl_core_ContainerError_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_core_ContainerError_descriptor, - new java.lang.String[] { "Code", "Message", "Kind", }); + new java.lang.String[] { "Code", "Message", "Kind", "Origin", }); internal_static_flyteidl_core_ErrorDocument_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_flyteidl_core_ErrorDocument_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_core_ErrorDocument_descriptor, new java.lang.String[] { "Error", }); + flyteidl.core.Execution.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/gen/pb-js/flyteidl.d.ts b/gen/pb-js/flyteidl.d.ts index 9e715a61a..a96e30eda 100644 --- a/gen/pb-js/flyteidl.d.ts +++ b/gen/pb-js/flyteidl.d.ts @@ -3816,6 +3816,9 @@ export namespace flyteidl { /** ContainerError kind */ kind?: (flyteidl.core.ContainerError.Kind|null); + + /** ContainerError origin */ + origin?: (flyteidl.core.ExecutionError.ErrorKind|null); } /** Represents a ContainerError. */ @@ -3836,6 +3839,9 @@ export namespace flyteidl { /** ContainerError kind. */ public kind: flyteidl.core.ContainerError.Kind; + /** ContainerError origin. */ + public origin: flyteidl.core.ExecutionError.ErrorKind; + /** * Creates a new ContainerError instance using the specified properties. * @param [properties] Properties to set diff --git a/gen/pb-js/flyteidl.js b/gen/pb-js/flyteidl.js index dfb13eb57..6bbc8c50f 100644 --- a/gen/pb-js/flyteidl.js +++ b/gen/pb-js/flyteidl.js @@ -9284,6 +9284,7 @@ export const flyteidl = $root.flyteidl = (() => { * @property {string|null} [code] ContainerError code * @property {string|null} [message] ContainerError message * @property {flyteidl.core.ContainerError.Kind|null} [kind] ContainerError kind + * @property {flyteidl.core.ExecutionError.ErrorKind|null} [origin] ContainerError origin */ /** @@ -9325,6 +9326,14 @@ export const flyteidl = $root.flyteidl = (() => { */ ContainerError.prototype.kind = 0; + /** + * ContainerError origin. + * @member {flyteidl.core.ExecutionError.ErrorKind} origin + * @memberof flyteidl.core.ContainerError + * @instance + */ + ContainerError.prototype.origin = 0; + /** * Creates a new ContainerError instance using the specified properties. * @function create @@ -9355,6 +9364,8 @@ export const flyteidl = $root.flyteidl = (() => { writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); if (message.kind != null && message.hasOwnProperty("kind")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.kind); + if (message.origin != null && message.hasOwnProperty("origin")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.origin); return writer; }; @@ -9385,6 +9396,9 @@ export const flyteidl = $root.flyteidl = (() => { case 3: message.kind = reader.int32(); break; + case 4: + message.origin = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -9418,6 +9432,15 @@ export const flyteidl = $root.flyteidl = (() => { case 1: break; } + if (message.origin != null && message.hasOwnProperty("origin")) + switch (message.origin) { + default: + return "origin: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; diff --git a/gen/pb-protodoc/flyteidl/core/errors.proto.rst b/gen/pb-protodoc/flyteidl/core/errors.proto.rst index 4d5107f5d..988ea2f3d 100644 --- a/gen/pb-protodoc/flyteidl/core/errors.proto.rst +++ b/gen/pb-protodoc/flyteidl/core/errors.proto.rst @@ -8,7 +8,7 @@ errors.proto flyteidl.core.ContainerError ---------------------------- -`[flyteidl.core.ContainerError proto] `_ +`[flyteidl.core.ContainerError proto] `_ Error message to propagate detailed errors from container executions to the execution engine. @@ -18,7 +18,8 @@ engine. { "code": "...", "message": "...", - "kind": "..." + "kind": "...", + "origin": "..." } .. _api_field_flyteidl.core.ContainerError.code: @@ -39,13 +40,19 @@ kind (:ref:`flyteidl.core.ContainerError.Kind `) An abstract error kind for this error. Defaults to Non_Recoverable if not specified. +.. _api_field_flyteidl.core.ContainerError.origin: + +origin + (:ref:`flyteidl.core.ExecutionError.ErrorKind `) Defines the origin of the error (system, user, unknown). + + .. _api_enum_flyteidl.core.ContainerError.Kind: Enum flyteidl.core.ContainerError.Kind -------------------------------------- -`[flyteidl.core.ContainerError.Kind proto] `_ +`[flyteidl.core.ContainerError.Kind proto] `_ Defines a generic error type that dictates the behavior of the retry strategy. @@ -65,7 +72,7 @@ RECOVERABLE flyteidl.core.ErrorDocument --------------------------- -`[flyteidl.core.ErrorDocument proto] `_ +`[flyteidl.core.ErrorDocument proto] `_ Defines the errors.pb file format the container can produce to communicate failure reasons to the execution engine. diff --git a/gen/pb_python/flyteidl/core/errors_pb2.py b/gen/pb_python/flyteidl/core/errors_pb2.py index a39a67520..e07691872 100644 --- a/gen/pb_python/flyteidl/core/errors_pb2.py +++ b/gen/pb_python/flyteidl/core/errors_pb2.py @@ -13,6 +13,7 @@ _sym_db = _symbol_database.Default() +from flyteidl.core import execution_pb2 as flyteidl_dot_core_dot_execution__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -20,8 +21,9 @@ package='flyteidl.core', syntax='proto3', serialized_options=_b('Z0github.com/lyft/flyteidl/gen/pb-go/flyteidl/core'), - serialized_pb=_b('\n\x1a\x66lyteidl/core/errors.proto\x12\rflyteidl.core\"\x8f\x01\n\x0e\x43ontainerError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x30\n\x04kind\x18\x03 \x01(\x0e\x32\".flyteidl.core.ContainerError.Kind\",\n\x04Kind\x12\x13\n\x0fNON_RECOVERABLE\x10\x00\x12\x0f\n\x0bRECOVERABLE\x10\x01\"=\n\rErrorDocument\x12,\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1d.flyteidl.core.ContainerErrorB2Z0github.com/lyft/flyteidl/gen/pb-go/flyteidl/coreb\x06proto3') -) + serialized_pb=_b('\n\x1a\x66lyteidl/core/errors.proto\x12\rflyteidl.core\x1a\x1d\x66lyteidl/core/execution.proto\"\xc8\x01\n\x0e\x43ontainerError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x30\n\x04kind\x18\x03 \x01(\x0e\x32\".flyteidl.core.ContainerError.Kind\x12\x37\n\x06origin\x18\x04 \x01(\x0e\x32\'.flyteidl.core.ExecutionError.ErrorKind\",\n\x04Kind\x12\x13\n\x0fNON_RECOVERABLE\x10\x00\x12\x0f\n\x0bRECOVERABLE\x10\x01\"=\n\rErrorDocument\x12,\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1d.flyteidl.core.ContainerErrorB2Z0github.com/lyft/flyteidl/gen/pb-go/flyteidl/coreb\x06proto3') + , + dependencies=[flyteidl_dot_core_dot_execution__pb2.DESCRIPTOR,]) @@ -42,8 +44,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=145, - serialized_end=189, + serialized_start=233, + serialized_end=277, ) _sym_db.RegisterEnumDescriptor(_CONTAINERERROR_KIND) @@ -76,6 +78,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='origin', full_name='flyteidl.core.ContainerError.origin', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -89,8 +98,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=46, - serialized_end=189, + serialized_start=77, + serialized_end=277, ) @@ -120,11 +129,12 @@ extension_ranges=[], oneofs=[ ], - serialized_start=191, - serialized_end=252, + serialized_start=279, + serialized_end=340, ) _CONTAINERERROR.fields_by_name['kind'].enum_type = _CONTAINERERROR_KIND +_CONTAINERERROR.fields_by_name['origin'].enum_type = flyteidl_dot_core_dot_execution__pb2._EXECUTIONERROR_ERRORKIND _CONTAINERERROR_KIND.containing_type = _CONTAINERERROR _ERRORDOCUMENT.fields_by_name['error'].message_type = _CONTAINERERROR DESCRIPTOR.message_types_by_name['ContainerError'] = _CONTAINERERROR diff --git a/package.json b/package.json index 10bc95f9a..be0206e6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lyft/flyteidl", - "version": "0.17.27", + "version": "0.17.28", "description": "Compiled protocol buffers and gRPC service clients/servers for Flyte IDLs", "repository": { "type": "git", diff --git a/protos/flyteidl/core/errors.proto b/protos/flyteidl/core/errors.proto index 74b67609e..44fa43385 100644 --- a/protos/flyteidl/core/errors.proto +++ b/protos/flyteidl/core/errors.proto @@ -4,6 +4,8 @@ package flyteidl.core; option go_package = "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core"; +import "flyteidl/core/execution.proto"; + // Error message to propagate detailed errors from container executions to the execution // engine. message ContainerError { @@ -20,6 +22,9 @@ message ContainerError { // An abstract error kind for this error. Defaults to Non_Recoverable if not specified. Kind kind = 3; + + // Defines the origin of the error (system, user, unknown). + ExecutionError.ErrorKind origin = 4; } // Defines the errors.pb file format the container can produce to communicate diff --git a/setup.py b/setup.py index 49d7ac364..af85d8811 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -__version__ = '0.17.27' +__version__ = '0.17.28' setup( name='flyteidl',