diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.cc index 3ca2f983e2..d9fe2fed16 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.cc +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.cc @@ -324,6 +324,7 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fadmin_2fagent_2eproto::o ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Resource, state_), PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Resource, outputs_), + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Resource, message_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::flyteidl::admin::DeleteTaskRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -347,8 +348,8 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SE { 53, -1, sizeof(::flyteidl::admin::GetTaskRequest)}, { 60, -1, sizeof(::flyteidl::admin::GetTaskResponse)}, { 66, -1, sizeof(::flyteidl::admin::Resource)}, - { 73, -1, sizeof(::flyteidl::admin::DeleteTaskRequest)}, - { 80, -1, sizeof(::flyteidl::admin::DeleteTaskResponse)}, + { 74, -1, sizeof(::flyteidl::admin::DeleteTaskRequest)}, + { 81, -1, sizeof(::flyteidl::admin::DeleteTaskResponse)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { @@ -399,20 +400,21 @@ const char descriptor_table_protodef_flyteidl_2fadmin_2fagent_2eproto[] = "\016GetTaskRequest\022\021\n\ttask_type\030\001 \001(\t\022\025\n\rre" "source_meta\030\002 \001(\014\"=\n\017GetTaskResponse\022*\n\010" "resource\030\001 \001(\0132\030.flyteidl.admin.Resource" - "\"\\\n\010Resource\022$\n\005state\030\001 \001(\0162\025.flyteidl.a" + "\"m\n\010Resource\022$\n\005state\030\001 \001(\0162\025.flyteidl.a" "dmin.State\022*\n\007outputs\030\002 \001(\0132\031.flyteidl.c" - "ore.LiteralMap\"=\n\021DeleteTaskRequest\022\021\n\tt" - "ask_type\030\001 \001(\t\022\025\n\rresource_meta\030\002 \001(\014\"\024\n" - "\022DeleteTaskResponse*^\n\005State\022\025\n\021RETRYABL" - "E_FAILURE\020\000\022\025\n\021PERMANENT_FAILURE\020\001\022\013\n\007PE" - "NDING\020\002\022\013\n\007RUNNING\020\003\022\r\n\tSUCCEEDED\020\004B=Z;g" - "ithub.com/flyteorg/flyte/flyteidl/gen/pb" - "-go/flyteidl/adminb\006proto3" + "ore.LiteralMap\022\017\n\007message\030\003 \001(\t\"=\n\021Delet" + "eTaskRequest\022\021\n\ttask_type\030\001 \001(\t\022\025\n\rresou" + "rce_meta\030\002 \001(\014\"\024\n\022DeleteTaskResponse*^\n\005" + "State\022\025\n\021RETRYABLE_FAILURE\020\000\022\025\n\021PERMANEN" + "T_FAILURE\020\001\022\013\n\007PENDING\020\002\022\013\n\007RUNNING\020\003\022\r\n" + "\tSUCCEEDED\020\004B=Z;github.com/flyteorg/flyt" + "e/flyteidl/gen/pb-go/flyteidl/adminb\006pro" + "to3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fadmin_2fagent_2eproto = { false, InitDefaults_flyteidl_2fadmin_2fagent_2eproto, descriptor_table_protodef_flyteidl_2fadmin_2fagent_2eproto, - "flyteidl/admin/agent.proto", &assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto, 1426, + "flyteidl/admin/agent.proto", &assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto, 1443, }; void AddDescriptors_flyteidl_2fadmin_2fagent_2eproto() { @@ -2962,6 +2964,7 @@ void Resource::clear_outputs() { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Resource::kStateFieldNumber; const int Resource::kOutputsFieldNumber; +const int Resource::kMessageFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Resource::Resource() @@ -2973,6 +2976,10 @@ Resource::Resource(const Resource& from) : ::google::protobuf::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); + message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.message().size() > 0) { + message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); + } if (from.has_outputs()) { outputs_ = new ::flyteidl::core::LiteralMap(*from.outputs_); } else { @@ -2985,6 +2992,7 @@ Resource::Resource(const Resource& from) void Resource::SharedCtor() { ::google::protobuf::internal::InitSCC( &scc_info_Resource_flyteidl_2fadmin_2fagent_2eproto.base); + message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&outputs_, 0, static_cast( reinterpret_cast(&state_) - reinterpret_cast(&outputs_)) + sizeof(state_)); @@ -2996,6 +3004,7 @@ Resource::~Resource() { } void Resource::SharedDtor() { + message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete outputs_; } @@ -3014,6 +3023,7 @@ void Resource::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && outputs_ != nullptr) { delete outputs_; } @@ -3056,6 +3066,22 @@ const char* Resource::_InternalParse(const char* begin, const char* end, void* o {parser_till_end, object}, ptr - size, ptr)); break; } + // string message = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.admin.Resource.message"); + object = msg->mutable_message(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -3071,6 +3097,10 @@ const char* Resource::_InternalParse(const char* begin, const char* end, void* o } // switch } // while return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; len_delim_till_end: return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, {parser_till_end, object}, size); @@ -3111,6 +3141,21 @@ bool Resource::MergePartialFromCodedStream( break; } + // string message = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_message())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->message().data(), static_cast(this->message().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.admin.Resource.message")); + } else { + goto handle_unusual; + } + break; + } + default: { handle_unusual: if (tag == 0) { @@ -3150,6 +3195,16 @@ void Resource::SerializeWithCachedSizes( 2, HasBitSetters::outputs(this), output); } + // string message = 3; + if (this->message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->message().data(), static_cast(this->message().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.Resource.message"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->message(), output); + } + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); @@ -3176,6 +3231,17 @@ ::google::protobuf::uint8* Resource::InternalSerializeWithCachedSizesToArray( 2, HasBitSetters::outputs(this), target); } + // string message = 3; + if (this->message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->message().data(), static_cast(this->message().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.Resource.message"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->message(), target); + } + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); @@ -3197,6 +3263,13 @@ size_t Resource::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // string message = 3; + if (this->message().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->message()); + } + // .flyteidl.core.LiteralMap outputs = 2; if (this->has_outputs()) { total_size += 1 + @@ -3237,6 +3310,10 @@ void Resource::MergeFrom(const Resource& from) { ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + if (from.message().size() > 0) { + + message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); + } if (from.has_outputs()) { mutable_outputs()->::flyteidl::core::LiteralMap::MergeFrom(from.outputs()); } @@ -3270,6 +3347,8 @@ void Resource::Swap(Resource* other) { void Resource::InternalSwap(Resource* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); + message_.Swap(&other->message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); swap(outputs_, other->outputs_); swap(state_, other->state_); } diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.h b/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.h index 5ee08079fc..5d43236ad3 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.h +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.h @@ -1015,6 +1015,20 @@ class Resource final : // accessors ------------------------------------------------------- + // string message = 3; + void clear_message(); + static const int kMessageFieldNumber = 3; + const ::std::string& message() const; + void set_message(const ::std::string& value); + #if LANG_CXX11 + void set_message(::std::string&& value); + #endif + void set_message(const char* value); + void set_message(const char* value, size_t size); + ::std::string* mutable_message(); + ::std::string* release_message(); + void set_allocated_message(::std::string* message); + // .flyteidl.core.LiteralMap outputs = 2; bool has_outputs() const; void clear_outputs(); @@ -1035,6 +1049,7 @@ class Resource final : class HasBitSetters; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr message_; ::flyteidl::core::LiteralMap* outputs_; int state_; mutable ::google::protobuf::internal::CachedSize _cached_size_; @@ -1985,6 +2000,59 @@ inline void Resource::set_allocated_outputs(::flyteidl::core::LiteralMap* output // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.Resource.outputs) } +// string message = 3; +inline void Resource::clear_message() { + message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Resource::message() const { + // @@protoc_insertion_point(field_get:flyteidl.admin.Resource.message) + return message_.GetNoArena(); +} +inline void Resource::set_message(const ::std::string& value) { + + message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.admin.Resource.message) +} +#if LANG_CXX11 +inline void Resource::set_message(::std::string&& value) { + + message_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.admin.Resource.message) +} +#endif +inline void Resource::set_message(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.admin.Resource.message) +} +inline void Resource::set_message(const char* value, size_t size) { + + message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.admin.Resource.message) +} +inline ::std::string* Resource::mutable_message() { + + // @@protoc_insertion_point(field_mutable:flyteidl.admin.Resource.message) + return message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Resource::release_message() { + // @@protoc_insertion_point(field_release:flyteidl.admin.Resource.message) + + return message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Resource::set_allocated_message(::std::string* message) { + if (message != nullptr) { + + } else { + + } + message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), message); + // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.Resource.message) +} + // ------------------------------------------------------------------- // DeleteTaskRequest diff --git a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go index 436d00d29a..7511d46559 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go @@ -349,10 +349,12 @@ type Resource struct { // The outputs of the execution. It's typically used by sql task. Agent service will create a // Structured dataset pointing to the query result table. // +optional - Outputs *core.LiteralMap `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Outputs *core.LiteralMap `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"` + // A descriptive message for the current state. e.g. waiting for cluster. + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Resource) Reset() { *m = Resource{} } @@ -394,6 +396,13 @@ func (m *Resource) GetOutputs() *core.LiteralMap { return nil } +func (m *Resource) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + // A message used to delete a task. type DeleteTaskRequest struct { // A predefined yet extensible Task type identifier. @@ -494,51 +503,52 @@ func init() { func init() { proto.RegisterFile("flyteidl/admin/agent.proto", fileDescriptor_c434e52bb0028071) } var fileDescriptor_c434e52bb0028071 = []byte{ - // 726 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08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 0x59, 0xb3, 0x21, 0x1f, 0x57, 0xc9, 0x8f, 0x90, - 0x15, 0x32, 0x98, 0x4e, 0xd0, 0x7e, 0xd0, 0xa8, 0x6c, 0xb6, 0x3f, 0x04, 0x20, 0x0d, 0x39, 0xe4, - 0x12, 0x76, 0xc3, 0xfc, 0x45, 0x34, 0xcc, 0x4f, 0xdc, 0x80, 0x98, 0x59, 0x1b, 0x40, 0xb9, 0x85, - 0x36, 0xae, 0x5f, 0xa5, 0xcf, 0x4f, 0xe3, 0x08, 0xc8, 0xaa, 0x6c, 0x18, 0xc8, 0x0f, 0xaf, 0x21, - 0xab, 0x1c, 0x93, 0x0a, 0x94, 0xa9, 0xd1, 0xa7, 0xff, 0x35, 0x6f, 0xba, 0xc6, 0xf0, 0xef, 0x66, - 0xa7, 0x3b, 0xa0, 0x46, 0xe9, 0x8b, 0xa0, 0x7c, 0x6f, 0xd0, 0xbb, 0x66, 0xcf, 0xe8, 0xf5, 0x93, - 0x72, 0x8a, 0x14, 0x61, 0xf7, 0xde, 0xe8, 0xb5, 0x3a, 0xbd, 0x76, 0x29, 0x1d, 0x2c, 0xe8, 0xa0, - 0xd7, 0x0b, 0x16, 0x19, 0xb2, 0x0f, 0x85, 0x87, 0xc1, 0xed, 0xad, 0x61, 0xb4, 0x8c, 0x56, 0x69, - 0xe7, 0xe6, 0x8f, 0xff, 0x7f, 0x9f, 0x5a, 0xf2, 0x8d, 0x3f, 0xd2, 0x4d, 0x67, 0x5e, 0x57, 0x87, - 0x77, 0xbc, 0x69, 0xf8, 0x50, 0x4f, 0xbe, 0xf7, 0x53, 0xe4, 0x75, 0x77, 0xf4, 0xd3, 0xd4, 0xa9, - 0xaf, 0xff, 0x86, 0x46, 0x39, 0xf5, 0xe5, 0xbf, 0xfc, 0x10, 0x00, 0x00, 0xff, 0xff, 0x14, 0xef, - 0x1e, 0x8b, 0x9f, 0x06, 0x00, 0x00, + // 740 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0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 0x00, 0xff, 0xff, 0xc9, 0x0a, 0x0e, 0xc8, + 0xba, 0x06, 0x00, 0x00, } diff --git a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.validate.go b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.validate.go index 0ba579cb0b..7efab6b18a 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.validate.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.validate.go @@ -454,6 +454,8 @@ func (m *Resource) Validate() error { } } + // no validation rules for Message + return nil } diff --git a/flyteidl/gen/pb-go/flyteidl/service/agent.swagger.json b/flyteidl/gen/pb-go/flyteidl/service/agent.swagger.json index 0a788c919c..2d1d5ea07b 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/agent.swagger.json +++ b/flyteidl/gen/pb-go/flyteidl/service/agent.swagger.json @@ -197,6 +197,10 @@ "outputs": { "$ref": "#/definitions/coreLiteralMap", "title": "The outputs of the execution. It's typically used by sql task. Agent service will create a\nStructured dataset pointing to the query result table.\n+optional" + }, + "message": { + "type": "string", + "description": "A descriptive message for the current state. e.g. waiting for cluster." } } }, diff --git a/flyteidl/gen/pb-java/flyteidl/admin/Agent.java b/flyteidl/gen/pb-java/flyteidl/admin/Agent.java index b0d9d2574e..b2dfd16e61 100644 --- a/flyteidl/gen/pb-java/flyteidl/admin/Agent.java +++ b/flyteidl/gen/pb-java/flyteidl/admin/Agent.java @@ -5460,6 +5460,24 @@ public interface ResourceOrBuilder extends * .flyteidl.core.LiteralMap outputs = 2; */ flyteidl.core.Literals.LiteralMapOrBuilder getOutputsOrBuilder(); + + /** + *
+     * A descriptive message for the current state. e.g. waiting for cluster.
+     * 
+ * + * string message = 3; + */ + java.lang.String getMessage(); + /** + *
+     * A descriptive message for the current state. e.g. waiting for cluster.
+     * 
+ * + * string message = 3; + */ + com.google.protobuf.ByteString + getMessageBytes(); } /** * Protobuf type {@code flyteidl.admin.Resource} @@ -5475,6 +5493,7 @@ private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Resource() { state_ = 0; + message_ = ""; } @java.lang.Override @@ -5520,6 +5539,12 @@ private Resource( break; } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + message_ = s; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -5616,6 +5641,48 @@ public flyteidl.core.Literals.LiteralMapOrBuilder getOutputsOrBuilder() { return getOutputs(); } + public static final int MESSAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object message_; + /** + *
+     * A descriptive message for the current state. e.g. waiting for cluster.
+     * 
+ * + * string message = 3; + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + *
+     * A descriptive message for the current state. e.g. waiting for cluster.
+     * 
+ * + * string message = 3; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -5636,6 +5703,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (outputs_ != null) { output.writeMessage(2, getOutputs()); } + if (!getMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_); + } unknownFields.writeTo(output); } @@ -5653,6 +5723,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getOutputs()); } + if (!getMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, message_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -5674,6 +5747,8 @@ public boolean equals(final java.lang.Object obj) { if (!getOutputs() .equals(other.getOutputs())) return false; } + if (!getMessage() + .equals(other.getMessage())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -5691,6 +5766,8 @@ public int hashCode() { hash = (37 * hash) + OUTPUTS_FIELD_NUMBER; hash = (53 * hash) + getOutputs().hashCode(); } + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -5832,6 +5909,8 @@ public Builder clear() { outputs_ = null; outputsBuilder_ = null; } + message_ = ""; + return this; } @@ -5864,6 +5943,7 @@ public flyteidl.admin.Agent.Resource buildPartial() { } else { result.outputs_ = outputsBuilder_.build(); } + result.message_ = message_; onBuilt(); return result; } @@ -5918,6 +5998,10 @@ public Builder mergeFrom(flyteidl.admin.Agent.Resource other) { if (other.hasOutputs()) { mergeOutputs(other.getOutputs()); } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -6182,6 +6266,95 @@ public flyteidl.core.Literals.LiteralMapOrBuilder getOutputsOrBuilder() { } return outputsBuilder_; } + + private java.lang.Object message_ = ""; + /** + *
+       * A descriptive message for the current state. e.g. waiting for cluster.
+       * 
+ * + * string message = 3; + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A descriptive message for the current state. e.g. waiting for cluster.
+       * 
+ * + * string message = 3; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A descriptive message for the current state. e.g. waiting for cluster.
+       * 
+ * + * string message = 3; + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + *
+       * A descriptive message for the current state. e.g. waiting for cluster.
+       * 
+ * + * string message = 3; + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + *
+       * A descriptive message for the current state. e.g. waiting for cluster.
+       * 
+ * + * string message = 3; + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -7424,15 +7597,16 @@ public flyteidl.admin.Agent.DeleteTaskResponse getDefaultInstanceForType() { "\016GetTaskRequest\022\021\n\ttask_type\030\001 \001(\t\022\025\n\rre" + "source_meta\030\002 \001(\014\"=\n\017GetTaskResponse\022*\n\010" + "resource\030\001 \001(\0132\030.flyteidl.admin.Resource" + - "\"\\\n\010Resource\022$\n\005state\030\001 \001(\0162\025.flyteidl.a" + + "\"m\n\010Resource\022$\n\005state\030\001 \001(\0162\025.flyteidl.a" + "dmin.State\022*\n\007outputs\030\002 \001(\0132\031.flyteidl.c" + - "ore.LiteralMap\"=\n\021DeleteTaskRequest\022\021\n\tt" + - "ask_type\030\001 \001(\t\022\025\n\rresource_meta\030\002 \001(\014\"\024\n" + - "\022DeleteTaskResponse*^\n\005State\022\025\n\021RETRYABL" + - "E_FAILURE\020\000\022\025\n\021PERMANENT_FAILURE\020\001\022\013\n\007PE" + - "NDING\020\002\022\013\n\007RUNNING\020\003\022\r\n\tSUCCEEDED\020\004B=Z;g" + - "ithub.com/flyteorg/flyte/flyteidl/gen/pb" + - "-go/flyteidl/adminb\006proto3" + "ore.LiteralMap\022\017\n\007message\030\003 \001(\t\"=\n\021Delet" + + "eTaskRequest\022\021\n\ttask_type\030\001 \001(\t\022\025\n\rresou" + + "rce_meta\030\002 \001(\014\"\024\n\022DeleteTaskResponse*^\n\005" + + "State\022\025\n\021RETRYABLE_FAILURE\020\000\022\025\n\021PERMANEN" + + "T_FAILURE\020\001\022\013\n\007PENDING\020\002\022\013\n\007RUNNING\020\003\022\r\n" + + "\tSUCCEEDED\020\004B=Z;github.com/flyteorg/flyt" + + "e/flyteidl/gen/pb-go/flyteidl/adminb\006pro" + + "to3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -7503,7 +7677,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_flyteidl_admin_Resource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_Resource_descriptor, - new java.lang.String[] { "State", "Outputs", }); + new java.lang.String[] { "State", "Outputs", "Message", }); internal_static_flyteidl_admin_DeleteTaskRequest_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_flyteidl_admin_DeleteTaskRequest_fieldAccessorTable = new diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index a7fde2b80b..4378251613 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -8044,6 +8044,9 @@ export namespace flyteidl { /** Resource outputs */ outputs?: (flyteidl.core.ILiteralMap|null); + + /** Resource message */ + message?: (string|null); } /** Represents a Resource. */ @@ -8061,6 +8064,9 @@ export namespace flyteidl { /** Resource outputs. */ public outputs?: (flyteidl.core.ILiteralMap|null); + /** Resource message. */ + public message: string; + /** * Creates a new Resource instance using the specified properties. * @param [properties] Properties to set diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 2477e38c8e..53967ab7ad 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -19623,6 +19623,7 @@ * @interface IResource * @property {flyteidl.admin.State|null} [state] Resource state * @property {flyteidl.core.ILiteralMap|null} [outputs] Resource outputs + * @property {string|null} [message] Resource message */ /** @@ -19656,6 +19657,14 @@ */ Resource.prototype.outputs = null; + /** + * Resource message. + * @member {string} message + * @memberof flyteidl.admin.Resource + * @instance + */ + Resource.prototype.message = ""; + /** * Creates a new Resource instance using the specified properties. * @function create @@ -19684,6 +19693,8 @@ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); if (message.outputs != null && message.hasOwnProperty("outputs")) $root.flyteidl.core.LiteralMap.encode(message.outputs, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.message != null && message.hasOwnProperty("message")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); return writer; }; @@ -19711,6 +19722,9 @@ case 2: message.outputs = $root.flyteidl.core.LiteralMap.decode(reader, reader.uint32()); break; + case 3: + message.message = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -19746,6 +19760,9 @@ if (error) return "outputs." + error; } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; return null; }; diff --git a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py index 236728acf1..bb0aa9384a 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py @@ -17,7 +17,7 @@ from flyteidl.core import identifier_pb2 as flyteidl_dot_core_dot_identifier__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/admin/agent.proto\x12\x0e\x66lyteidl.admin\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x1d\x66lyteidl/core/interface.proto\x1a\x1e\x66lyteidl/core/identifier.proto\"\x98\x05\n\x15TaskExecutionMetadata\x12R\n\x11task_execution_id\x18\x01 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierR\x0ftaskExecutionId\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x31.flyteidl.admin.TaskExecutionMetadata.LabelsEntryR\x06labels\x12X\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x36.flyteidl.admin.TaskExecutionMetadata.AnnotationsEntryR\x0b\x61nnotations\x12.\n\x13k8s_service_account\x18\x05 \x01(\tR\x11k8sServiceAccount\x12t\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32?.flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntryR\x14\x65nvironmentVariables\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a>\n\x10\x41nnotationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aG\n\x19\x45nvironmentVariablesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x83\x02\n\x11\x43reateTaskRequest\x12\x31\n\x06inputs\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x37\n\x08template\x18\x02 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x03 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x04 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\"9\n\x12\x43reateTaskResponse\x12#\n\rresource_meta\x18\x01 \x01(\x0cR\x0cresourceMeta\"R\n\x0eGetTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"G\n\x0fGetTaskResponse\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\"l\n\x08Resource\x12+\n\x05state\x18\x01 \x01(\x0e\x32\x15.flyteidl.admin.StateR\x05state\x12\x33\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x07outputs\"U\n\x11\x44\x65leteTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"\x14\n\x12\x44\x65leteTaskResponse*^\n\x05State\x12\x15\n\x11RETRYABLE_FAILURE\x10\x00\x12\x15\n\x11PERMANENT_FAILURE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x42\xb6\x01\n\x12\x63om.flyteidl.adminB\nAgentProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/admin/agent.proto\x12\x0e\x66lyteidl.admin\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x1d\x66lyteidl/core/interface.proto\x1a\x1e\x66lyteidl/core/identifier.proto\"\x98\x05\n\x15TaskExecutionMetadata\x12R\n\x11task_execution_id\x18\x01 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierR\x0ftaskExecutionId\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x31.flyteidl.admin.TaskExecutionMetadata.LabelsEntryR\x06labels\x12X\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x36.flyteidl.admin.TaskExecutionMetadata.AnnotationsEntryR\x0b\x61nnotations\x12.\n\x13k8s_service_account\x18\x05 \x01(\tR\x11k8sServiceAccount\x12t\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32?.flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntryR\x14\x65nvironmentVariables\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a>\n\x10\x41nnotationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aG\n\x19\x45nvironmentVariablesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x83\x02\n\x11\x43reateTaskRequest\x12\x31\n\x06inputs\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x37\n\x08template\x18\x02 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x03 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x04 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\"9\n\x12\x43reateTaskResponse\x12#\n\rresource_meta\x18\x01 \x01(\x0cR\x0cresourceMeta\"R\n\x0eGetTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"G\n\x0fGetTaskResponse\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\"\x86\x01\n\x08Resource\x12+\n\x05state\x18\x01 \x01(\x0e\x32\x15.flyteidl.admin.StateR\x05state\x12\x33\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x07outputs\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\"U\n\x11\x44\x65leteTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"\x14\n\x12\x44\x65leteTaskResponse*^\n\x05State\x12\x15\n\x11RETRYABLE_FAILURE\x10\x00\x12\x15\n\x11PERMANENT_FAILURE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x42\xb6\x01\n\x12\x63om.flyteidl.adminB\nAgentProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -32,8 +32,8 @@ _TASKEXECUTIONMETADATA_ANNOTATIONSENTRY._serialized_options = b'8\001' _TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY._options = None _TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY._serialized_options = b'8\001' - _globals['_STATE']._serialized_start=1530 - _globals['_STATE']._serialized_end=1624 + _globals['_STATE']._serialized_start=1557 + _globals['_STATE']._serialized_end=1651 _globals['_TASKEXECUTIONMETADATA']._serialized_start=167 _globals['_TASKEXECUTIONMETADATA']._serialized_end=831 _globals['_TASKEXECUTIONMETADATA_LABELSENTRY']._serialized_start=637 @@ -50,10 +50,10 @@ _globals['_GETTASKREQUEST']._serialized_end=1236 _globals['_GETTASKRESPONSE']._serialized_start=1238 _globals['_GETTASKRESPONSE']._serialized_end=1309 - _globals['_RESOURCE']._serialized_start=1311 - _globals['_RESOURCE']._serialized_end=1419 - _globals['_DELETETASKREQUEST']._serialized_start=1421 - _globals['_DELETETASKREQUEST']._serialized_end=1506 - _globals['_DELETETASKRESPONSE']._serialized_start=1508 - _globals['_DELETETASKRESPONSE']._serialized_end=1528 + _globals['_RESOURCE']._serialized_start=1312 + _globals['_RESOURCE']._serialized_end=1446 + _globals['_DELETETASKREQUEST']._serialized_start=1448 + _globals['_DELETETASKREQUEST']._serialized_end=1533 + _globals['_DELETETASKRESPONSE']._serialized_start=1535 + _globals['_DELETETASKRESPONSE']._serialized_end=1555 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi index 830158d0b2..6ca7ba23a7 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi @@ -93,12 +93,14 @@ class GetTaskResponse(_message.Message): def __init__(self, resource: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ... class Resource(_message.Message): - __slots__ = ["state", "outputs"] + __slots__ = ["state", "outputs", "message"] STATE_FIELD_NUMBER: _ClassVar[int] OUTPUTS_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] state: State outputs: _literals_pb2.LiteralMap - def __init__(self, state: _Optional[_Union[State, str]] = ..., outputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ...) -> None: ... + message: str + def __init__(self, state: _Optional[_Union[State, str]] = ..., outputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ..., message: _Optional[str] = ...) -> None: ... class DeleteTaskRequest(_message.Message): __slots__ = ["task_type", "resource_meta"] diff --git a/flyteidl/gen/pb_rust/flyteidl.admin.rs b/flyteidl/gen/pb_rust/flyteidl.admin.rs index b73776a730..b30f28dd5b 100644 --- a/flyteidl/gen/pb_rust/flyteidl.admin.rs +++ b/flyteidl/gen/pb_rust/flyteidl.admin.rs @@ -78,6 +78,9 @@ pub struct Resource { /// +optional #[prost(message, optional, tag="2")] pub outputs: ::core::option::Option, + /// A descriptive message for the current state. e.g. waiting for cluster. + #[prost(string, tag="3")] + pub message: ::prost::alloc::string::String, } /// A message used to delete a task. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/flyteidl/protos/flyteidl/admin/agent.proto b/flyteidl/protos/flyteidl/admin/agent.proto index d85d4d9a9e..a4dade0953 100644 --- a/flyteidl/protos/flyteidl/admin/agent.proto +++ b/flyteidl/protos/flyteidl/admin/agent.proto @@ -73,6 +73,8 @@ message Resource { // Structured dataset pointing to the query result table. // +optional core.LiteralMap outputs = 2; + // A descriptive message for the current state. e.g. waiting for cluster. + string message = 3; } // A message used to delete a task. diff --git a/flyteplugins/go/tasks/pluginmachinery/core/phase.go b/flyteplugins/go/tasks/pluginmachinery/core/phase.go index 4f3836a8b1..3f8c2a0914 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/phase.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/phase.go @@ -226,7 +226,6 @@ func PhaseInfoQueuedWithTaskInfo(version uint32, reason string, info *TaskInfo) } func PhaseInfoInitializing(t time.Time, version uint32, reason string, info *TaskInfo) PhaseInfo { - pi := phaseInfo(PhaseInitializing, version, nil, info, false) pi.reason = reason return pi diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go index a9b233a3bb..c50d361726 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go @@ -5,6 +5,7 @@ import ( "crypto/x509" "encoding/gob" "fmt" + "time" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flytestdlib/config" @@ -39,6 +40,7 @@ type Plugin struct { type ResourceWrapper struct { State admin.State Outputs *flyteIdl.LiteralMap + Message string } type ResourceMetaWrapper struct { @@ -141,6 +143,7 @@ func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest weba return ResourceWrapper{ State: res.Resource.State, Outputs: res.Resource.Outputs, + Message: res.Resource.Message, }, nil } @@ -171,6 +174,8 @@ func (p Plugin) Status(ctx context.Context, taskCtx webapi.StatusContext) (phase taskInfo := &core.TaskInfo{} switch resource.State { + case admin.State_PENDING: + return core.PhaseInfoInitializing(time.Now(), core.DefaultPhaseVersion, resource.Message, taskInfo), nil case admin.State_RUNNING: return core.PhaseInfoRunning(core.DefaultPhaseVersion, taskInfo), nil case admin.State_PERMANENT_FAILURE: diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go index 7a4ea350b6..3a8e759908 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go @@ -5,12 +5,14 @@ import ( "testing" "time" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flytestdlib/config" "google.golang.org/grpc" pluginsCore "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core" pluginCoreMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core/mocks" + webapiPlugin "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/webapi/mocks" "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/stretchr/testify/assert" ) @@ -99,4 +101,70 @@ func TestPlugin(t *testing.T) { ctx, _ = getFinalContext(context.TODO(), "CreateTask", &Agent{Endpoint: "localhost:8080", Timeouts: map[string]config.Duration{"CreateTask": {Duration: 1 * time.Millisecond}}}) assert.NotEqual(t, context.TODO(), ctx) }) + + t.Run("test PENDING Status", func(t *testing.T) { + taskContext := new(webapiPlugin.StatusContext) + taskContext.On("Resource").Return(ResourceWrapper{ + State: admin.State_PENDING, + Outputs: nil, + Message: "Waiting for cluster", + }) + + phase, err := plugin.Status(context.Background(), taskContext) + assert.NoError(t, err) + assert.Equal(t, pluginsCore.PhaseInitializing, phase.Phase()) + assert.Equal(t, "Waiting for cluster", phase.Reason()) + }) + + t.Run("test RUNNING Status", func(t *testing.T) { + taskContext := new(webapiPlugin.StatusContext) + taskContext.On("Resource").Return(ResourceWrapper{ + State: admin.State_RUNNING, + Outputs: nil, + Message: "Job is running", + }) + + phase, err := plugin.Status(context.Background(), taskContext) + assert.NoError(t, err) + assert.Equal(t, pluginsCore.PhaseRunning, phase.Phase()) + }) + + t.Run("test PERMANENT_FAILURE Status", func(t *testing.T) { + taskContext := new(webapiPlugin.StatusContext) + taskContext.On("Resource").Return(ResourceWrapper{ + State: admin.State_PERMANENT_FAILURE, + Outputs: nil, + Message: "", + }) + + phase, err := plugin.Status(context.Background(), taskContext) + assert.NoError(t, err) + assert.Equal(t, pluginsCore.PhasePermanentFailure, phase.Phase()) + }) + + t.Run("test RETRYABLE_FAILURE Status", func(t *testing.T) { + taskContext := new(webapiPlugin.StatusContext) + taskContext.On("Resource").Return(ResourceWrapper{ + State: admin.State_RETRYABLE_FAILURE, + Outputs: nil, + Message: "", + }) + + phase, err := plugin.Status(context.Background(), taskContext) + assert.NoError(t, err) + assert.Equal(t, pluginsCore.PhaseRetryableFailure, phase.Phase()) + }) + + t.Run("test UNDEFINED Status", func(t *testing.T) { + taskContext := new(webapiPlugin.StatusContext) + taskContext.On("Resource").Return(ResourceWrapper{ + State: 5, + Outputs: nil, + Message: "", + }) + + phase, err := plugin.Status(context.Background(), taskContext) + assert.Error(t, err) + assert.Equal(t, pluginsCore.PhaseUndefined, phase.Phase()) + }) }