@flyteorg/flyteidl 1.5.10 → 1.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1355,6 +1355,79 @@ export namespace flyteidl {
1355
1355
  public static verify(message: { [k: string]: any }): (string|null);
1356
1356
  }
1357
1357
 
1358
+ /** Properties of an ArrayNode. */
1359
+ interface IArrayNode {
1360
+
1361
+ /** ArrayNode node */
1362
+ node?: (flyteidl.core.INode|null);
1363
+
1364
+ /** ArrayNode parallelism */
1365
+ parallelism?: (number|null);
1366
+
1367
+ /** ArrayNode minSuccesses */
1368
+ minSuccesses?: (number|null);
1369
+
1370
+ /** ArrayNode minSuccessRatio */
1371
+ minSuccessRatio?: (number|null);
1372
+ }
1373
+
1374
+ /** Represents an ArrayNode. */
1375
+ class ArrayNode implements IArrayNode {
1376
+
1377
+ /**
1378
+ * Constructs a new ArrayNode.
1379
+ * @param [properties] Properties to set
1380
+ */
1381
+ constructor(properties?: flyteidl.core.IArrayNode);
1382
+
1383
+ /** ArrayNode node. */
1384
+ public node?: (flyteidl.core.INode|null);
1385
+
1386
+ /** ArrayNode parallelism. */
1387
+ public parallelism: number;
1388
+
1389
+ /** ArrayNode minSuccesses. */
1390
+ public minSuccesses: number;
1391
+
1392
+ /** ArrayNode minSuccessRatio. */
1393
+ public minSuccessRatio: number;
1394
+
1395
+ /** ArrayNode successCriteria. */
1396
+ public successCriteria?: ("minSuccesses"|"minSuccessRatio");
1397
+
1398
+ /**
1399
+ * Creates a new ArrayNode instance using the specified properties.
1400
+ * @param [properties] Properties to set
1401
+ * @returns ArrayNode instance
1402
+ */
1403
+ public static create(properties?: flyteidl.core.IArrayNode): flyteidl.core.ArrayNode;
1404
+
1405
+ /**
1406
+ * Encodes the specified ArrayNode message. Does not implicitly {@link flyteidl.core.ArrayNode.verify|verify} messages.
1407
+ * @param message ArrayNode message or plain object to encode
1408
+ * @param [writer] Writer to encode to
1409
+ * @returns Writer
1410
+ */
1411
+ public static encode(message: flyteidl.core.IArrayNode, writer?: $protobuf.Writer): $protobuf.Writer;
1412
+
1413
+ /**
1414
+ * Decodes an ArrayNode message from the specified reader or buffer.
1415
+ * @param reader Reader or buffer to decode from
1416
+ * @param [length] Message length if known beforehand
1417
+ * @returns ArrayNode
1418
+ * @throws {Error} If the payload is not a reader or valid buffer
1419
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1420
+ */
1421
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.ArrayNode;
1422
+
1423
+ /**
1424
+ * Verifies an ArrayNode message.
1425
+ * @param message Plain object to verify
1426
+ * @returns `null` if valid, otherwise the reason why it is not
1427
+ */
1428
+ public static verify(message: { [k: string]: any }): (string|null);
1429
+ }
1430
+
1358
1431
  /** Properties of a NodeMetadata. */
1359
1432
  interface INodeMetadata {
1360
1433
 
@@ -1515,6 +1588,9 @@ export namespace flyteidl {
1515
1588
 
1516
1589
  /** Node gateNode */
1517
1590
  gateNode?: (flyteidl.core.IGateNode|null);
1591
+
1592
+ /** Node arrayNode */
1593
+ arrayNode?: (flyteidl.core.IArrayNode|null);
1518
1594
  }
1519
1595
 
1520
1596
  /** Represents a Node. */
@@ -1553,8 +1629,11 @@ export namespace flyteidl {
1553
1629
  /** Node gateNode. */
1554
1630
  public gateNode?: (flyteidl.core.IGateNode|null);
1555
1631
 
1632
+ /** Node arrayNode. */
1633
+ public arrayNode?: (flyteidl.core.IArrayNode|null);
1634
+
1556
1635
  /** Node target. */
1557
- public target?: ("taskNode"|"workflowNode"|"branchNode"|"gateNode");
1636
+ public target?: ("taskNode"|"workflowNode"|"branchNode"|"gateNode"|"arrayNode");
1558
1637
 
1559
1638
  /**
1560
1639
  * Creates a new Node instance using the specified properties.
@@ -19686,6 +19765,9 @@ export namespace flyteidl {
19686
19765
 
19687
19766
  /** CreateUploadLocationRequest contentMd5 */
19688
19767
  contentMd5?: (Uint8Array|null);
19768
+
19769
+ /** CreateUploadLocationRequest filenameRoot */
19770
+ filenameRoot?: (string|null);
19689
19771
  }
19690
19772
 
19691
19773
  /** Represents a CreateUploadLocationRequest. */
@@ -19712,6 +19794,9 @@ export namespace flyteidl {
19712
19794
  /** CreateUploadLocationRequest contentMd5. */
19713
19795
  public contentMd5: Uint8Array;
19714
19796
 
19797
+ /** CreateUploadLocationRequest filenameRoot. */
19798
+ public filenameRoot: string;
19799
+
19715
19800
  /**
19716
19801
  * Creates a new CreateUploadLocationRequest instance using the specified properties.
19717
19802
  * @param [properties] Properties to set
@@ -3200,6 +3200,190 @@
3200
3200
  return GateNode;
3201
3201
  })();
3202
3202
 
3203
+ core.ArrayNode = (function() {
3204
+
3205
+ /**
3206
+ * Properties of an ArrayNode.
3207
+ * @memberof flyteidl.core
3208
+ * @interface IArrayNode
3209
+ * @property {flyteidl.core.INode|null} [node] ArrayNode node
3210
+ * @property {number|null} [parallelism] ArrayNode parallelism
3211
+ * @property {number|null} [minSuccesses] ArrayNode minSuccesses
3212
+ * @property {number|null} [minSuccessRatio] ArrayNode minSuccessRatio
3213
+ */
3214
+
3215
+ /**
3216
+ * Constructs a new ArrayNode.
3217
+ * @memberof flyteidl.core
3218
+ * @classdesc Represents an ArrayNode.
3219
+ * @implements IArrayNode
3220
+ * @constructor
3221
+ * @param {flyteidl.core.IArrayNode=} [properties] Properties to set
3222
+ */
3223
+ function ArrayNode(properties) {
3224
+ if (properties)
3225
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3226
+ if (properties[keys[i]] != null)
3227
+ this[keys[i]] = properties[keys[i]];
3228
+ }
3229
+
3230
+ /**
3231
+ * ArrayNode node.
3232
+ * @member {flyteidl.core.INode|null|undefined} node
3233
+ * @memberof flyteidl.core.ArrayNode
3234
+ * @instance
3235
+ */
3236
+ ArrayNode.prototype.node = null;
3237
+
3238
+ /**
3239
+ * ArrayNode parallelism.
3240
+ * @member {number} parallelism
3241
+ * @memberof flyteidl.core.ArrayNode
3242
+ * @instance
3243
+ */
3244
+ ArrayNode.prototype.parallelism = 0;
3245
+
3246
+ /**
3247
+ * ArrayNode minSuccesses.
3248
+ * @member {number} minSuccesses
3249
+ * @memberof flyteidl.core.ArrayNode
3250
+ * @instance
3251
+ */
3252
+ ArrayNode.prototype.minSuccesses = 0;
3253
+
3254
+ /**
3255
+ * ArrayNode minSuccessRatio.
3256
+ * @member {number} minSuccessRatio
3257
+ * @memberof flyteidl.core.ArrayNode
3258
+ * @instance
3259
+ */
3260
+ ArrayNode.prototype.minSuccessRatio = 0;
3261
+
3262
+ // OneOf field names bound to virtual getters and setters
3263
+ var $oneOfFields;
3264
+
3265
+ /**
3266
+ * ArrayNode successCriteria.
3267
+ * @member {"minSuccesses"|"minSuccessRatio"|undefined} successCriteria
3268
+ * @memberof flyteidl.core.ArrayNode
3269
+ * @instance
3270
+ */
3271
+ Object.defineProperty(ArrayNode.prototype, "successCriteria", {
3272
+ get: $util.oneOfGetter($oneOfFields = ["minSuccesses", "minSuccessRatio"]),
3273
+ set: $util.oneOfSetter($oneOfFields)
3274
+ });
3275
+
3276
+ /**
3277
+ * Creates a new ArrayNode instance using the specified properties.
3278
+ * @function create
3279
+ * @memberof flyteidl.core.ArrayNode
3280
+ * @static
3281
+ * @param {flyteidl.core.IArrayNode=} [properties] Properties to set
3282
+ * @returns {flyteidl.core.ArrayNode} ArrayNode instance
3283
+ */
3284
+ ArrayNode.create = function create(properties) {
3285
+ return new ArrayNode(properties);
3286
+ };
3287
+
3288
+ /**
3289
+ * Encodes the specified ArrayNode message. Does not implicitly {@link flyteidl.core.ArrayNode.verify|verify} messages.
3290
+ * @function encode
3291
+ * @memberof flyteidl.core.ArrayNode
3292
+ * @static
3293
+ * @param {flyteidl.core.IArrayNode} message ArrayNode message or plain object to encode
3294
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3295
+ * @returns {$protobuf.Writer} Writer
3296
+ */
3297
+ ArrayNode.encode = function encode(message, writer) {
3298
+ if (!writer)
3299
+ writer = $Writer.create();
3300
+ if (message.node != null && message.hasOwnProperty("node"))
3301
+ $root.flyteidl.core.Node.encode(message.node, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3302
+ if (message.parallelism != null && message.hasOwnProperty("parallelism"))
3303
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.parallelism);
3304
+ if (message.minSuccesses != null && message.hasOwnProperty("minSuccesses"))
3305
+ writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.minSuccesses);
3306
+ if (message.minSuccessRatio != null && message.hasOwnProperty("minSuccessRatio"))
3307
+ writer.uint32(/* id 4, wireType 5 =*/37).float(message.minSuccessRatio);
3308
+ return writer;
3309
+ };
3310
+
3311
+ /**
3312
+ * Decodes an ArrayNode message from the specified reader or buffer.
3313
+ * @function decode
3314
+ * @memberof flyteidl.core.ArrayNode
3315
+ * @static
3316
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3317
+ * @param {number} [length] Message length if known beforehand
3318
+ * @returns {flyteidl.core.ArrayNode} ArrayNode
3319
+ * @throws {Error} If the payload is not a reader or valid buffer
3320
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3321
+ */
3322
+ ArrayNode.decode = function decode(reader, length) {
3323
+ if (!(reader instanceof $Reader))
3324
+ reader = $Reader.create(reader);
3325
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.ArrayNode();
3326
+ while (reader.pos < end) {
3327
+ var tag = reader.uint32();
3328
+ switch (tag >>> 3) {
3329
+ case 1:
3330
+ message.node = $root.flyteidl.core.Node.decode(reader, reader.uint32());
3331
+ break;
3332
+ case 2:
3333
+ message.parallelism = reader.uint32();
3334
+ break;
3335
+ case 3:
3336
+ message.minSuccesses = reader.uint32();
3337
+ break;
3338
+ case 4:
3339
+ message.minSuccessRatio = reader.float();
3340
+ break;
3341
+ default:
3342
+ reader.skipType(tag & 7);
3343
+ break;
3344
+ }
3345
+ }
3346
+ return message;
3347
+ };
3348
+
3349
+ /**
3350
+ * Verifies an ArrayNode message.
3351
+ * @function verify
3352
+ * @memberof flyteidl.core.ArrayNode
3353
+ * @static
3354
+ * @param {Object.<string,*>} message Plain object to verify
3355
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3356
+ */
3357
+ ArrayNode.verify = function verify(message) {
3358
+ if (typeof message !== "object" || message === null)
3359
+ return "object expected";
3360
+ var properties = {};
3361
+ if (message.node != null && message.hasOwnProperty("node")) {
3362
+ var error = $root.flyteidl.core.Node.verify(message.node);
3363
+ if (error)
3364
+ return "node." + error;
3365
+ }
3366
+ if (message.parallelism != null && message.hasOwnProperty("parallelism"))
3367
+ if (!$util.isInteger(message.parallelism))
3368
+ return "parallelism: integer expected";
3369
+ if (message.minSuccesses != null && message.hasOwnProperty("minSuccesses")) {
3370
+ properties.successCriteria = 1;
3371
+ if (!$util.isInteger(message.minSuccesses))
3372
+ return "minSuccesses: integer expected";
3373
+ }
3374
+ if (message.minSuccessRatio != null && message.hasOwnProperty("minSuccessRatio")) {
3375
+ if (properties.successCriteria === 1)
3376
+ return "successCriteria: multiple values";
3377
+ properties.successCriteria = 1;
3378
+ if (typeof message.minSuccessRatio !== "number")
3379
+ return "minSuccessRatio: number expected";
3380
+ }
3381
+ return null;
3382
+ };
3383
+
3384
+ return ArrayNode;
3385
+ })();
3386
+
3203
3387
  core.NodeMetadata = (function() {
3204
3388
 
3205
3389
  /**
@@ -3524,6 +3708,7 @@
3524
3708
  * @property {flyteidl.core.IWorkflowNode|null} [workflowNode] Node workflowNode
3525
3709
  * @property {flyteidl.core.IBranchNode|null} [branchNode] Node branchNode
3526
3710
  * @property {flyteidl.core.IGateNode|null} [gateNode] Node gateNode
3711
+ * @property {flyteidl.core.IArrayNode|null} [arrayNode] Node arrayNode
3527
3712
  */
3528
3713
 
3529
3714
  /**
@@ -3616,17 +3801,25 @@
3616
3801
  */
3617
3802
  Node.prototype.gateNode = null;
3618
3803
 
3804
+ /**
3805
+ * Node arrayNode.
3806
+ * @member {flyteidl.core.IArrayNode|null|undefined} arrayNode
3807
+ * @memberof flyteidl.core.Node
3808
+ * @instance
3809
+ */
3810
+ Node.prototype.arrayNode = null;
3811
+
3619
3812
  // OneOf field names bound to virtual getters and setters
3620
3813
  var $oneOfFields;
3621
3814
 
3622
3815
  /**
3623
3816
  * Node target.
3624
- * @member {"taskNode"|"workflowNode"|"branchNode"|"gateNode"|undefined} target
3817
+ * @member {"taskNode"|"workflowNode"|"branchNode"|"gateNode"|"arrayNode"|undefined} target
3625
3818
  * @memberof flyteidl.core.Node
3626
3819
  * @instance
3627
3820
  */
3628
3821
  Object.defineProperty(Node.prototype, "target", {
3629
- get: $util.oneOfGetter($oneOfFields = ["taskNode", "workflowNode", "branchNode", "gateNode"]),
3822
+ get: $util.oneOfGetter($oneOfFields = ["taskNode", "workflowNode", "branchNode", "gateNode", "arrayNode"]),
3630
3823
  set: $util.oneOfSetter($oneOfFields)
3631
3824
  });
3632
3825
 
@@ -3675,6 +3868,8 @@
3675
3868
  $root.flyteidl.core.BranchNode.encode(message.branchNode, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
3676
3869
  if (message.gateNode != null && message.hasOwnProperty("gateNode"))
3677
3870
  $root.flyteidl.core.GateNode.encode(message.gateNode, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
3871
+ if (message.arrayNode != null && message.hasOwnProperty("arrayNode"))
3872
+ $root.flyteidl.core.ArrayNode.encode(message.arrayNode, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
3678
3873
  return writer;
3679
3874
  };
3680
3875
 
@@ -3729,6 +3924,9 @@
3729
3924
  case 9:
3730
3925
  message.gateNode = $root.flyteidl.core.GateNode.decode(reader, reader.uint32());
3731
3926
  break;
3927
+ case 10:
3928
+ message.arrayNode = $root.flyteidl.core.ArrayNode.decode(reader, reader.uint32());
3929
+ break;
3732
3930
  default:
3733
3931
  reader.skipType(tag & 7);
3734
3932
  break;
@@ -3820,6 +4018,16 @@
3820
4018
  return "gateNode." + error;
3821
4019
  }
3822
4020
  }
4021
+ if (message.arrayNode != null && message.hasOwnProperty("arrayNode")) {
4022
+ if (properties.target === 1)
4023
+ return "target: multiple values";
4024
+ properties.target = 1;
4025
+ {
4026
+ var error = $root.flyteidl.core.ArrayNode.verify(message.arrayNode);
4027
+ if (error)
4028
+ return "arrayNode." + error;
4029
+ }
4030
+ }
3823
4031
  return null;
3824
4032
  };
3825
4033
 
@@ -45833,6 +46041,7 @@
45833
46041
  * @property {string|null} [filename] CreateUploadLocationRequest filename
45834
46042
  * @property {google.protobuf.IDuration|null} [expiresIn] CreateUploadLocationRequest expiresIn
45835
46043
  * @property {Uint8Array|null} [contentMd5] CreateUploadLocationRequest contentMd5
46044
+ * @property {string|null} [filenameRoot] CreateUploadLocationRequest filenameRoot
45836
46045
  */
45837
46046
 
45838
46047
  /**
@@ -45890,6 +46099,14 @@
45890
46099
  */
45891
46100
  CreateUploadLocationRequest.prototype.contentMd5 = $util.newBuffer([]);
45892
46101
 
46102
+ /**
46103
+ * CreateUploadLocationRequest filenameRoot.
46104
+ * @member {string} filenameRoot
46105
+ * @memberof flyteidl.service.CreateUploadLocationRequest
46106
+ * @instance
46107
+ */
46108
+ CreateUploadLocationRequest.prototype.filenameRoot = "";
46109
+
45893
46110
  /**
45894
46111
  * Creates a new CreateUploadLocationRequest instance using the specified properties.
45895
46112
  * @function create
@@ -45924,6 +46141,8 @@
45924
46141
  $root.google.protobuf.Duration.encode(message.expiresIn, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
45925
46142
  if (message.contentMd5 != null && message.hasOwnProperty("contentMd5"))
45926
46143
  writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.contentMd5);
46144
+ if (message.filenameRoot != null && message.hasOwnProperty("filenameRoot"))
46145
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.filenameRoot);
45927
46146
  return writer;
45928
46147
  };
45929
46148
 
@@ -45960,6 +46179,9 @@
45960
46179
  case 5:
45961
46180
  message.contentMd5 = reader.bytes();
45962
46181
  break;
46182
+ case 6:
46183
+ message.filenameRoot = reader.string();
46184
+ break;
45963
46185
  default:
45964
46186
  reader.skipType(tag & 7);
45965
46187
  break;
@@ -45996,6 +46218,9 @@
45996
46218
  if (message.contentMd5 != null && message.hasOwnProperty("contentMd5"))
45997
46219
  if (!(message.contentMd5 && typeof message.contentMd5.length === "number" || $util.isString(message.contentMd5)))
45998
46220
  return "contentMd5: buffer expected";
46221
+ if (message.filenameRoot != null && message.hasOwnProperty("filenameRoot"))
46222
+ if (!$util.isString(message.filenameRoot))
46223
+ return "filenameRoot: string expected";
45999
46224
  return null;
46000
46225
  };
46001
46226
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyteorg/flyteidl",
3
- "version": "1.5.10",
3
+ "version": "1.5.12",
4
4
  "description": "Compiled protocol buffers and gRPC service clients/servers for Flyte IDLs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -107,6 +107,32 @@ message GateNode {
107
107
  }
108
108
  }
109
109
 
110
+ // ArrayNode is a Flyte node type that simplifies the execution of a sub-node over a list of input
111
+ // values. An ArrayNode can be executed with configurable parallelism (separate from the parent
112
+ // workflow) and can be configured to succeed when a certain number of sub-nodes succeed.
113
+ message ArrayNode {
114
+ // node is the sub-node that will be executed for each element in the array.
115
+ Node node = 1;
116
+
117
+ // parallelism defines the minimum number of instances to bring up concurrently at any given
118
+ // point. Note that this is an optimistic restriction and that, due to network partitioning or
119
+ // other failures, the actual number of currently running instances might be more. This has to
120
+ // be a positive number if assigned. Default value is size.
121
+ uint32 parallelism = 2;
122
+
123
+ oneof success_criteria {
124
+ // min_successes is an absolute number of the minimum number of successful completions of
125
+ // sub-nodes. As soon as this criteria is met, the ArrayNode will be marked as successful
126
+ // and outputs will be computed. This has to be a non-negative number if assigned. Default
127
+ // value is size (if specified).
128
+ uint32 min_successes = 3;
129
+
130
+ // If the array job size is not known beforehand, the min_success_ratio can instead be used
131
+ // to determine when an ArrayNode can be marked successful.
132
+ float min_success_ratio = 4;
133
+ }
134
+ }
135
+
110
136
  // Defines extra information about the Node.
111
137
  message NodeMetadata {
112
138
  // A friendly name for the Node
@@ -171,6 +197,10 @@ message Node {
171
197
 
172
198
  // Information about the condition to evaluate in this node.
173
199
  GateNode gate_node = 9;
200
+
201
+ // Information about the sub-node executions for each value in the list of this nodes
202
+ // inputs values.
203
+ ArrayNode array_node = 10;
174
204
  }
175
205
  }
176
206
 
@@ -23,6 +23,10 @@ message CreateUploadLocationResponse {
23
23
  }
24
24
 
25
25
  // CreateUploadLocationRequest specified request for the CreateUploadLocation API.
26
+ // The implementation in data proxy service will create the s3 location with some server side configured prefixes,
27
+ // and then:
28
+ // - project/domain/(a deterministic str representation of the content_md5)/filename (if present); OR
29
+ // - project/domain/filename_root (if present)/filename (if present).
26
30
  message CreateUploadLocationRequest {
27
31
  // Project to create the upload location for
28
32
  // +required
@@ -45,6 +49,12 @@ message CreateUploadLocationRequest {
45
49
  // generated path.
46
50
  // +required
47
51
  bytes content_md5 = 5;
52
+
53
+ // If present, data proxy will use this string in lieu of the md5 hash in the path. When the filename is also included
54
+ // this makes the upload location deterministic. The native url will still be prefixed by the upload location prefix
55
+ // in data proxy config. This option is useful when uploading multiple files.
56
+ // +optional
57
+ string filename_root = 6;
48
58
  }
49
59
 
50
60
  // CreateDownloadLocationRequest specified request for the CreateDownloadLocation API.