diff --git a/flyteidl/clients/go/assets/admin.swagger.json b/flyteidl/clients/go/assets/admin.swagger.json index 4e944181b5..6b15593c08 100644 --- a/flyteidl/clients/go/assets/admin.swagger.json +++ b/flyteidl/clients/go/assets/admin.swagger.json @@ -7957,7 +7957,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "ANY" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-es/flyteidl/core/types_pb.ts b/flyteidl/gen/pb-es/flyteidl/core/types_pb.ts index f311fa0692..59bb3a61b4 100644 --- a/flyteidl/gen/pb-es/flyteidl/core/types_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/core/types_pb.ts @@ -61,6 +61,11 @@ export enum SimpleType { * @generated from enum value: STRUCT = 9; */ STRUCT = 9, + + /** + * @generated from enum value: ANY = 10; + */ + ANY = 10, } // Retrieve enum metadata with: proto3.getEnumType(SimpleType) proto3.util.setEnumType(SimpleType, "flyteidl.core.SimpleType", [ @@ -74,6 +79,7 @@ proto3.util.setEnumType(SimpleType, "flyteidl.core.SimpleType", [ { no: 7, name: "BINARY" }, { no: 8, name: "ERROR" }, { no: 9, name: "STRUCT" }, + { no: 10, name: "ANY" }, ]); /** diff --git a/flyteidl/gen/pb-go/flyteidl/core/types.pb.go b/flyteidl/gen/pb-go/flyteidl/core/types.pb.go index b844e951c9..1391306a4a 100644 --- a/flyteidl/gen/pb-go/flyteidl/core/types.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/core/types.pb.go @@ -35,21 +35,23 @@ const ( SimpleType_BINARY SimpleType = 7 SimpleType_ERROR SimpleType = 8 SimpleType_STRUCT SimpleType = 9 + SimpleType_ANY SimpleType = 10 ) // Enum value maps for SimpleType. var ( SimpleType_name = map[int32]string{ - 0: "NONE", - 1: "INTEGER", - 2: "FLOAT", - 3: "STRING", - 4: "BOOLEAN", - 5: "DATETIME", - 6: "DURATION", - 7: "BINARY", - 8: "ERROR", - 9: "STRUCT", + 0: "NONE", + 1: "INTEGER", + 2: "FLOAT", + 3: "STRING", + 4: "BOOLEAN", + 5: "DATETIME", + 6: "DURATION", + 7: "BINARY", + 8: "ERROR", + 9: "STRUCT", + 10: "ANY", } SimpleType_value = map[string]int32{ "NONE": 0, @@ -62,6 +64,7 @@ var ( "BINARY": 7, "ERROR": 8, "STRUCT": 9, + "ANY": 10, } ) @@ -1274,7 +1277,7 @@ var file_flyteidl_core_types_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x86, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x8f, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, @@ -1282,19 +1285,20 @@ var file_flyteidl_core_types_proto_rawDesc = []byte{ 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x10, 0x09, 0x42, 0xb0, - 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 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, + 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x10, 0x09, 0x12, 0x07, + 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x0a, 0x42, 0xb0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0a, 0x54, + 0x79, 0x70, 0x65, 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 ( diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json index 79be0ba117..0b13d1af25 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json @@ -403,7 +403,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "ANY" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json index 1f2f91d28b..042a6de4d2 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json @@ -335,7 +335,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "ANY" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json index 4e944181b5..6b15593c08 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json @@ -7957,7 +7957,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "ANY" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json index a2d429d019..45e36c65cb 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json @@ -1614,7 +1614,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "ANY" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json index 4798fc6c2d..d4f759dfa4 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json @@ -463,7 +463,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "ANY" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/external_plugin_service.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/external_plugin_service.swagger.json index f488a49c00..c81bdda9db 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/external_plugin_service.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/external_plugin_service.swagger.json @@ -918,7 +918,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "ANY" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/signal.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/signal.swagger.json index 94c859bfcd..8bb84edae3 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/signal.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/signal.swagger.json @@ -541,7 +541,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "ANY" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index cceab76647..a1bdc2d7ba 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -1906,7 +1906,8 @@ export namespace flyteidl { DURATION = 6, BINARY = 7, ERROR = 8, - STRUCT = 9 + STRUCT = 9, + ANY = 10 } /** Properties of a SchemaType. */ diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index e29f5fc9ff..cb4a73367b 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -4545,6 +4545,7 @@ * @property {number} BINARY=7 BINARY value * @property {number} ERROR=8 ERROR value * @property {number} STRUCT=9 STRUCT value + * @property {number} ANY=10 ANY value */ core.SimpleType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -4558,6 +4559,7 @@ values[valuesById[7] = "BINARY"] = 7; values[valuesById[8] = "ERROR"] = 8; values[valuesById[9] = "STRUCT"] = 9; + values[valuesById[10] = "ANY"] = 10; return values; })(); @@ -6049,6 +6051,7 @@ case 7: case 8: case 9: + case 10: break; } } diff --git a/flyteidl/gen/pb_python/flyteidl/core/types_pb2.py b/flyteidl/gen/pb_python/flyteidl/core/types_pb2.py index 3043a0cf6b..748e6b402f 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/types_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/core/types_pb2.py @@ -14,7 +14,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x66lyteidl/core/types.proto\x12\rflyteidl.core\x1a\x1cgoogle/protobuf/struct.proto\"\xa1\x02\n\nSchemaType\x12@\n\x07\x63olumns\x18\x03 \x03(\x0b\x32&.flyteidl.core.SchemaType.SchemaColumnR\x07\x63olumns\x1a\xd0\x01\n\x0cSchemaColumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12K\n\x04type\x18\x02 \x01(\x0e\x32\x37.flyteidl.core.SchemaType.SchemaColumn.SchemaColumnTypeR\x04type\"_\n\x10SchemaColumnType\x12\x0b\n\x07INTEGER\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x0b\n\x07\x42OOLEAN\x10\x03\x12\x0c\n\x08\x44\x41TETIME\x10\x04\x12\x0c\n\x08\x44URATION\x10\x05\"\xc7\x02\n\x15StructuredDatasetType\x12L\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x32.flyteidl.core.StructuredDatasetType.DatasetColumnR\x07\x63olumns\x12\x16\n\x06\x66ormat\x18\x02 \x01(\tR\x06\x66ormat\x12\x30\n\x14\x65xternal_schema_type\x18\x03 \x01(\tR\x12\x65xternalSchemaType\x12\x32\n\x15\x65xternal_schema_bytes\x18\x04 \x01(\x0cR\x13\x65xternalSchemaBytes\x1a\x62\n\rDatasetColumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12=\n\x0cliteral_type\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x0bliteralType\"\xa7\x01\n\x08\x42lobType\x12\x16\n\x06\x66ormat\x18\x01 \x01(\tR\x06\x66ormat\x12R\n\x0e\x64imensionality\x18\x02 \x01(\x0e\x32*.flyteidl.core.BlobType.BlobDimensionalityR\x0e\x64imensionality\"/\n\x12\x42lobDimensionality\x12\n\n\x06SINGLE\x10\x00\x12\r\n\tMULTIPART\x10\x01\"\"\n\x08\x45numType\x12\x16\n\x06values\x18\x01 \x03(\tR\x06values\"C\n\tUnionType\x12\x36\n\x08variants\x18\x01 \x03(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x08variants\"\xd7\x01\n\rTypeStructure\x12\x10\n\x03tag\x18\x01 \x01(\tR\x03tag\x12V\n\x0e\x64\x61taclass_type\x18\x02 \x03(\x0b\x32/.flyteidl.core.TypeStructure.DataclassTypeEntryR\rdataclassType\x1a\\\n\x12\x44\x61taclassTypeEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x05value:\x02\x38\x01\"K\n\x0eTypeAnnotation\x12\x39\n\x0b\x61nnotations\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x0b\x61nnotations\"\xbc\x05\n\x0bLiteralType\x12\x33\n\x06simple\x18\x01 \x01(\x0e\x32\x19.flyteidl.core.SimpleTypeH\x00R\x06simple\x12\x33\n\x06schema\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.SchemaTypeH\x00R\x06schema\x12\x45\n\x0f\x63ollection_type\x18\x03 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeH\x00R\x0e\x63ollectionType\x12\x42\n\x0emap_value_type\x18\x04 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeH\x00R\x0cmapValueType\x12-\n\x04\x62lob\x18\x05 \x01(\x0b\x32\x17.flyteidl.core.BlobTypeH\x00R\x04\x62lob\x12\x36\n\tenum_type\x18\x07 \x01(\x0b\x32\x17.flyteidl.core.EnumTypeH\x00R\x08\x65numType\x12^\n\x17structured_dataset_type\x18\x08 \x01(\x0b\x32$.flyteidl.core.StructuredDatasetTypeH\x00R\x15structuredDatasetType\x12\x39\n\nunion_type\x18\n \x01(\x0b\x32\x18.flyteidl.core.UnionTypeH\x00R\tunionType\x12\x33\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\x12=\n\nannotation\x18\t \x01(\x0b\x32\x1d.flyteidl.core.TypeAnnotationR\nannotation\x12:\n\tstructure\x18\x0b \x01(\x0b\x32\x1c.flyteidl.core.TypeStructureR\tstructureB\x06\n\x04type\"z\n\x0fOutputReference\x12\x17\n\x07node_id\x18\x01 \x01(\tR\x06nodeId\x12\x10\n\x03var\x18\x02 \x01(\tR\x03var\x12<\n\tattr_path\x18\x03 \x03(\x0b\x32\x1f.flyteidl.core.PromiseAttributeR\x08\x61ttrPath\"_\n\x10PromiseAttribute\x12#\n\x0cstring_value\x18\x01 \x01(\tH\x00R\x0bstringValue\x12\x1d\n\tint_value\x18\x02 \x01(\x05H\x00R\x08intValueB\x07\n\x05value\"G\n\x05\x45rror\x12$\n\x0e\x66\x61iled_node_id\x18\x01 \x01(\tR\x0c\x66\x61iledNodeId\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message*\x86\x01\n\nSimpleType\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07INTEGER\x10\x01\x12\t\n\x05\x46LOAT\x10\x02\x12\n\n\x06STRING\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\x0c\n\x08\x44\x41TETIME\x10\x05\x12\x0c\n\x08\x44URATION\x10\x06\x12\n\n\x06\x42INARY\x10\x07\x12\t\n\x05\x45RROR\x10\x08\x12\n\n\x06STRUCT\x10\tB\xb0\x01\n\x11\x63om.flyteidl.coreB\nTypesProtoP\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') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x66lyteidl/core/types.proto\x12\rflyteidl.core\x1a\x1cgoogle/protobuf/struct.proto\"\xa1\x02\n\nSchemaType\x12@\n\x07\x63olumns\x18\x03 \x03(\x0b\x32&.flyteidl.core.SchemaType.SchemaColumnR\x07\x63olumns\x1a\xd0\x01\n\x0cSchemaColumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12K\n\x04type\x18\x02 \x01(\x0e\x32\x37.flyteidl.core.SchemaType.SchemaColumn.SchemaColumnTypeR\x04type\"_\n\x10SchemaColumnType\x12\x0b\n\x07INTEGER\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x0b\n\x07\x42OOLEAN\x10\x03\x12\x0c\n\x08\x44\x41TETIME\x10\x04\x12\x0c\n\x08\x44URATION\x10\x05\"\xc7\x02\n\x15StructuredDatasetType\x12L\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x32.flyteidl.core.StructuredDatasetType.DatasetColumnR\x07\x63olumns\x12\x16\n\x06\x66ormat\x18\x02 \x01(\tR\x06\x66ormat\x12\x30\n\x14\x65xternal_schema_type\x18\x03 \x01(\tR\x12\x65xternalSchemaType\x12\x32\n\x15\x65xternal_schema_bytes\x18\x04 \x01(\x0cR\x13\x65xternalSchemaBytes\x1a\x62\n\rDatasetColumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12=\n\x0cliteral_type\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x0bliteralType\"\xa7\x01\n\x08\x42lobType\x12\x16\n\x06\x66ormat\x18\x01 \x01(\tR\x06\x66ormat\x12R\n\x0e\x64imensionality\x18\x02 \x01(\x0e\x32*.flyteidl.core.BlobType.BlobDimensionalityR\x0e\x64imensionality\"/\n\x12\x42lobDimensionality\x12\n\n\x06SINGLE\x10\x00\x12\r\n\tMULTIPART\x10\x01\"\"\n\x08\x45numType\x12\x16\n\x06values\x18\x01 \x03(\tR\x06values\"C\n\tUnionType\x12\x36\n\x08variants\x18\x01 \x03(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x08variants\"\xd7\x01\n\rTypeStructure\x12\x10\n\x03tag\x18\x01 \x01(\tR\x03tag\x12V\n\x0e\x64\x61taclass_type\x18\x02 \x03(\x0b\x32/.flyteidl.core.TypeStructure.DataclassTypeEntryR\rdataclassType\x1a\\\n\x12\x44\x61taclassTypeEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x05value:\x02\x38\x01\"K\n\x0eTypeAnnotation\x12\x39\n\x0b\x61nnotations\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x0b\x61nnotations\"\xbc\x05\n\x0bLiteralType\x12\x33\n\x06simple\x18\x01 \x01(\x0e\x32\x19.flyteidl.core.SimpleTypeH\x00R\x06simple\x12\x33\n\x06schema\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.SchemaTypeH\x00R\x06schema\x12\x45\n\x0f\x63ollection_type\x18\x03 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeH\x00R\x0e\x63ollectionType\x12\x42\n\x0emap_value_type\x18\x04 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeH\x00R\x0cmapValueType\x12-\n\x04\x62lob\x18\x05 \x01(\x0b\x32\x17.flyteidl.core.BlobTypeH\x00R\x04\x62lob\x12\x36\n\tenum_type\x18\x07 \x01(\x0b\x32\x17.flyteidl.core.EnumTypeH\x00R\x08\x65numType\x12^\n\x17structured_dataset_type\x18\x08 \x01(\x0b\x32$.flyteidl.core.StructuredDatasetTypeH\x00R\x15structuredDatasetType\x12\x39\n\nunion_type\x18\n \x01(\x0b\x32\x18.flyteidl.core.UnionTypeH\x00R\tunionType\x12\x33\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\x12=\n\nannotation\x18\t \x01(\x0b\x32\x1d.flyteidl.core.TypeAnnotationR\nannotation\x12:\n\tstructure\x18\x0b \x01(\x0b\x32\x1c.flyteidl.core.TypeStructureR\tstructureB\x06\n\x04type\"z\n\x0fOutputReference\x12\x17\n\x07node_id\x18\x01 \x01(\tR\x06nodeId\x12\x10\n\x03var\x18\x02 \x01(\tR\x03var\x12<\n\tattr_path\x18\x03 \x03(\x0b\x32\x1f.flyteidl.core.PromiseAttributeR\x08\x61ttrPath\"_\n\x10PromiseAttribute\x12#\n\x0cstring_value\x18\x01 \x01(\tH\x00R\x0bstringValue\x12\x1d\n\tint_value\x18\x02 \x01(\x05H\x00R\x08intValueB\x07\n\x05value\"G\n\x05\x45rror\x12$\n\x0e\x66\x61iled_node_id\x18\x01 \x01(\tR\x0c\x66\x61iledNodeId\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message*\x8f\x01\n\nSimpleType\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07INTEGER\x10\x01\x12\t\n\x05\x46LOAT\x10\x02\x12\n\n\x06STRING\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\x0c\n\x08\x44\x41TETIME\x10\x05\x12\x0c\n\x08\x44URATION\x10\x06\x12\n\n\x06\x42INARY\x10\x07\x12\t\n\x05\x45RROR\x10\x08\x12\n\n\x06STRUCT\x10\t\x12\x07\n\x03\x41NY\x10\nB\xb0\x01\n\x11\x63om.flyteidl.coreB\nTypesProtoP\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) @@ -26,7 +26,7 @@ _TYPESTRUCTURE_DATACLASSTYPEENTRY._options = None _TYPESTRUCTURE_DATACLASSTYPEENTRY._serialized_options = b'8\001' _globals['_SIMPLETYPE']._serialized_start=2264 - _globals['_SIMPLETYPE']._serialized_end=2398 + _globals['_SIMPLETYPE']._serialized_end=2407 _globals['_SCHEMATYPE']._serialized_start=75 _globals['_SCHEMATYPE']._serialized_end=364 _globals['_SCHEMATYPE_SCHEMACOLUMN']._serialized_start=156 diff --git a/flyteidl/gen/pb_python/flyteidl/core/types_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/core/types_pb2.pyi index 9028afabd5..62e3447510 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/types_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/core/types_pb2.pyi @@ -19,6 +19,7 @@ class SimpleType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): BINARY: _ClassVar[SimpleType] ERROR: _ClassVar[SimpleType] STRUCT: _ClassVar[SimpleType] + ANY: _ClassVar[SimpleType] NONE: SimpleType INTEGER: SimpleType FLOAT: SimpleType @@ -29,6 +30,7 @@ DURATION: SimpleType BINARY: SimpleType ERROR: SimpleType STRUCT: SimpleType +ANY: SimpleType class SchemaType(_message.Message): __slots__ = ["columns"] diff --git a/flyteidl/gen/pb_rust/flyteidl.core.rs b/flyteidl/gen/pb_rust/flyteidl.core.rs index 215fa60f82..e6338d28a3 100644 --- a/flyteidl/gen/pb_rust/flyteidl.core.rs +++ b/flyteidl/gen/pb_rust/flyteidl.core.rs @@ -305,6 +305,7 @@ pub enum SimpleType { Binary = 7, Error = 8, Struct = 9, + Any = 10, } impl SimpleType { /// String value of the enum field names used in the ProtoBuf definition. @@ -323,6 +324,7 @@ impl SimpleType { SimpleType::Binary => "BINARY", SimpleType::Error => "ERROR", SimpleType::Struct => "STRUCT", + SimpleType::Any => "ANY", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -338,6 +340,7 @@ impl SimpleType { "BINARY" => Some(Self::Binary), "ERROR" => Some(Self::Error), "STRUCT" => Some(Self::Struct), + "ANY" => Some(Self::Any), _ => None, } } diff --git a/flyteidl/protos/flyteidl/core/types.proto b/flyteidl/protos/flyteidl/core/types.proto index 3580eea9f0..44daf4dbee 100644 --- a/flyteidl/protos/flyteidl/core/types.proto +++ b/flyteidl/protos/flyteidl/core/types.proto @@ -18,6 +18,7 @@ enum SimpleType { BINARY = 7; ERROR = 8; STRUCT = 9; + ANY = 10; } // Defines schema columns and types to strongly type-validate schemas interoperability. diff --git a/flytepropeller/pkg/compiler/validators/typing.go b/flytepropeller/pkg/compiler/validators/typing.go index 388cb32123..2c036e42c2 100644 --- a/flytepropeller/pkg/compiler/validators/typing.go +++ b/flytepropeller/pkg/compiler/validators/typing.go @@ -356,7 +356,19 @@ func getTypeChecker(t *flyte.LiteralType) typeChecker { } } -func AreTypesCastable(upstreamType, downstreamType *flyte.LiteralType) bool { +func isTypeAny(t *flyte.LiteralType) bool { + if simpleType, ok := t.GetType().(*flyte.LiteralType_Simple); ok { + return simpleType.Simple == flyte.SimpleType_ANY + } + + return false +} + +func AreTypesCastable(upstreamType *flyte.LiteralType, downstreamType *flyte.LiteralType) bool { + if isTypeAny(downstreamType) { + return true + } + typeChecker := getTypeChecker(downstreamType) // if upstream is a singular union we check if the downstream type is castable from the union variant diff --git a/flytepropeller/pkg/compiler/validators/typing_test.go b/flytepropeller/pkg/compiler/validators/typing_test.go index 17e55b1e0a..0f310d1efd 100644 --- a/flytepropeller/pkg/compiler/validators/typing_test.go +++ b/flytepropeller/pkg/compiler/validators/typing_test.go @@ -22,6 +22,18 @@ func TestSimpleLiteralCasting(t *testing.T) { assert.True(t, castable, "Integers should be castable to other integers") }) + t.Run("IntegerToAny", func(t *testing.T) { + castable := AreTypesCastable( + &core.LiteralType{ + Type: &core.LiteralType_Simple{Simple: core.SimpleType_INTEGER}, + }, + &core.LiteralType{ + Type: &core.LiteralType_Simple{Simple: core.SimpleType_ANY}, + }, + ) + assert.True(t, castable, "Integers should be castable to Any") + }) + t.Run("IntegerToFloat", func(t *testing.T) { castable := AreTypesCastable( &core.LiteralType{