flyte 0.2.0b12__py3-none-any.whl → 0.2.0b14__py3-none-any.whl

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.

Potentially problematic release.


This version of flyte might be problematic. Click here for more details.

flyte/__init__.py CHANGED
@@ -46,10 +46,13 @@ __all__ = [
46
46
  "with_runcontext",
47
47
  ]
48
48
 
49
+ import sys
50
+
49
51
  from ._cache import Cache, CachePolicy, CacheRequest
50
52
  from ._context import ctx
51
53
  from ._deploy import deploy
52
54
  from ._environment import Environment
55
+ from ._excepthook import custom_excepthook
53
56
  from ._group import group
54
57
  from ._image import Image
55
58
  from ._initialize import init, init_from_config
@@ -64,3 +67,5 @@ from ._task_environment import TaskEnvironment
64
67
  from ._timeout import Timeout, TimeoutType
65
68
  from ._trace import trace
66
69
  from ._version import __version__
70
+
71
+ sys.excepthook = custom_excepthook
flyte/_excepthook.py ADDED
@@ -0,0 +1,37 @@
1
+ import logging
2
+ import sys
3
+ import traceback
4
+
5
+ from flyte._logging import logger
6
+
7
+ # Save the original excepthook so we can call it later
8
+ original_excepthook = sys.excepthook
9
+
10
+ # Filters: exclude frames where filename or function name contains these substrings
11
+ EXCLUDED_MODULE_SUBSTRINGS = ["_internal", "syncify"]
12
+ EXCLUDED_FILE_SUBSTRINGS = ["syncify", "_code_bundle"]
13
+
14
+
15
+ def should_include_frame(frame: traceback.FrameSummary) -> bool:
16
+ return not (
17
+ any(sub in frame.name for sub in EXCLUDED_MODULE_SUBSTRINGS)
18
+ or any(sub in frame.filename for sub in EXCLUDED_FILE_SUBSTRINGS)
19
+ )
20
+
21
+
22
+ def custom_excepthook(exc_type, exc_value, exc_tb):
23
+ """
24
+ Custom exception hook to filter and format tracebacks.
25
+ If the logger's level is DEBUG, it uses the original excepthook.
26
+ """
27
+
28
+ if logger.getEffectiveLevel() <= logging.DEBUG:
29
+ original_excepthook(exc_type, exc_value, exc_tb)
30
+ else:
31
+ # Extract and filter traceback
32
+ tb_list = traceback.extract_tb(exc_tb)
33
+ filtered_tb = [frame for frame in tb_list if should_include_frame(frame)]
34
+ # Print the filtered version (custom format)
35
+ print("Filtered traceback (most recent call last):")
36
+ print("".join(traceback.format_list(filtered_tb)))
37
+ print(f"{exc_type.__name__}: {exc_value}\n")
@@ -28,6 +28,7 @@ class Action:
28
28
  started: bool = False
29
29
  retries: int = 0
30
30
  client_err: Exception | None = None # This error is set when something goes wrong in the controller.
31
+ cache_key: str | None = None # None means no caching, otherwise it is the version of the cache.
31
32
 
32
33
  @property
33
34
  def name(self) -> str:
@@ -91,6 +92,8 @@ class Action:
91
92
  if not self.started:
92
93
  self.task = action.task
93
94
 
95
+ self.cache_key = action.cache_key
96
+
94
97
  def set_client_error(self, exc: Exception):
95
98
  self.client_err = exc
96
99
 
@@ -106,6 +109,7 @@ class Action:
106
109
  task_spec: task_definition_pb2.TaskSpec,
107
110
  inputs_uri: str,
108
111
  run_output_base: str,
112
+ cache_key: str | None = None,
109
113
  ) -> Action:
110
114
  return cls(
111
115
  action_id=sub_action_id,
@@ -115,6 +119,7 @@ class Action:
115
119
  task=task_spec,
116
120
  inputs_uri=inputs_uri,
117
121
  run_output_base=run_output_base,
122
+ cache_key=cache_key,
118
123
  )
119
124
 
120
125
  @classmethod
@@ -174,16 +174,35 @@ class RemoteController(Controller):
174
174
  )
175
175
 
176
176
  task_spec = translate_task_to_wire(_task, new_serialization_context)
177
-
178
177
  serialized_inputs = inputs.proto_inputs.SerializeToString(deterministic=True)
178
+
179
+ inputs_hash = convert.generate_inputs_hash(serialized_inputs)
179
180
  sub_action_id, sub_action_output_path = convert.generate_sub_action_id_and_output_path(
180
- tctx, task_spec, serialized_inputs, _task_call_seq
181
+ tctx, task_spec, inputs_hash, _task_call_seq
181
182
  )
182
183
 
183
184
  inputs_uri = io.inputs_path(sub_action_output_path)
184
185
  await upload_inputs_with_retry(serialized_inputs, inputs_uri)
186
+
187
+ md = task_spec.task_template.metadata
188
+ ignored_input_vars = []
189
+ if len(md.cache_ignore_input_vars) > 0:
190
+ ignored_input_vars = list(md.cache_ignore_input_vars)
191
+ cache_key = None
192
+ if task_spec.task_template.metadata and task_spec.task_template.metadata.discoverable:
193
+ discovery_version = task_spec.task_template.metadata.discovery_version
194
+ cache_key = convert.generate_cache_key_hash(
195
+ _task.name,
196
+ inputs_hash,
197
+ task_spec.task_template.interface,
198
+ discovery_version,
199
+ ignored_input_vars,
200
+ inputs.proto_inputs,
201
+ )
202
+
185
203
  # Clear to free memory
186
204
  serialized_inputs = None # type: ignore
205
+ inputs_hash = None # type: ignore
187
206
 
188
207
  action = Action.from_task(
189
208
  sub_action_id=run_definition_pb2.ActionIdentifier(
@@ -200,6 +219,7 @@ class RemoteController(Controller):
200
219
  task_spec=task_spec,
201
220
  inputs_uri=inputs_uri,
202
221
  run_output_base=tctx.run_base_dir,
222
+ cache_key=cache_key,
203
223
  )
204
224
 
205
225
  try:
@@ -400,14 +420,33 @@ class RemoteController(Controller):
400
420
  inputs = await convert.convert_from_native_to_inputs(native_interface, *args, **kwargs)
401
421
  serialized_inputs = inputs.proto_inputs.SerializeToString(deterministic=True)
402
422
 
423
+ inputs_hash = convert.generate_inputs_hash(serialized_inputs)
403
424
  sub_action_id, sub_action_output_path = convert.generate_sub_action_id_and_output_path(
404
- tctx, task_name, serialized_inputs, invoke_seq_num
425
+ tctx, task_name, inputs_hash, invoke_seq_num
405
426
  )
406
427
 
407
428
  inputs_uri = io.inputs_path(sub_action_output_path)
408
429
  await upload_inputs_with_retry(serialized_inputs, inputs_uri)
430
+ # cache key - task name, task signature, inputs, cache version
431
+ cache_key = None
432
+ md = _task.spec.task_template.metadata
433
+ ignored_input_vars = []
434
+ if len(md.cache_ignore_input_vars) > 0:
435
+ ignored_input_vars = list(md.cache_ignore_input_vars)
436
+ if _task.spec.task_template.metadata and _task.spec.task_template.metadata.discoverable:
437
+ discovery_version = _task.spec.task_template.metadata.discovery_version
438
+ cache_key = convert.generate_cache_key_hash(
439
+ task_name,
440
+ inputs_hash,
441
+ _task.spec.task_template.interface,
442
+ discovery_version,
443
+ ignored_input_vars,
444
+ inputs.proto_inputs,
445
+ )
446
+
409
447
  # Clear to free memory
410
448
  serialized_inputs = None # type: ignore
449
+ inputs_hash = None # type: ignore
411
450
 
412
451
  action = Action.from_task(
413
452
  sub_action_id=run_definition_pb2.ActionIdentifier(
@@ -424,6 +463,7 @@ class RemoteController(Controller):
424
463
  task_spec=_task.spec,
425
464
  inputs_uri=inputs_uri,
426
465
  run_output_base=tctx.run_base_dir,
466
+ cache_key=cache_key,
427
467
  )
428
468
 
429
469
  try:
@@ -7,6 +7,7 @@ from asyncio import Event
7
7
  from typing import Awaitable, Coroutine, Optional
8
8
 
9
9
  import grpc.aio
10
+ from google.protobuf.wrappers_pb2 import StringValue
10
11
 
11
12
  import flyte.errors
12
13
  from flyte._logging import log, logger
@@ -311,6 +312,11 @@ class Controller:
311
312
  if not action.is_started() and action.task is not None:
312
313
  logger.debug(f"Attempting to launch action: {action.name}")
313
314
  try:
315
+ cache_key = None
316
+ logger.info(f"Action {action.name} has cache version {action.cache_key}")
317
+ if action.cache_key:
318
+ cache_key = StringValue(value=action.cache_key)
319
+
314
320
  await self._queue_service.EnqueueAction(
315
321
  queue_service_pb2.EnqueueActionRequest(
316
322
  action_id=action.action_id,
@@ -324,6 +330,7 @@ class Controller:
324
330
  name=action.task.task_template.id.name,
325
331
  ),
326
332
  spec=action.task,
333
+ cache_key=cache_key,
327
334
  ),
328
335
  input_uri=action.inputs_uri,
329
336
  run_output_base=action.run_output_base,
@@ -2,10 +2,13 @@ from __future__ import annotations
2
2
 
3
3
  import base64
4
4
  import hashlib
5
+ import inspect
5
6
  from dataclasses import dataclass
6
- from typing import Any, Dict, Tuple, Union
7
+ from types import NoneType
8
+ from typing import Any, Dict, List, Tuple, Union, get_args
7
9
 
8
10
  from flyteidl.core import execution_pb2, literals_pb2
11
+ from flyteidl.core.interface_pb2 import TypedInterface
9
12
 
10
13
  import flyte.errors
11
14
  import flyte.storage as storage
@@ -57,25 +60,38 @@ async def convert_inputs_to_native(inputs: Inputs, python_interface: NativeInter
57
60
  return native_vals
58
61
 
59
62
 
63
+ def is_optional_type(tp) -> bool:
64
+ """
65
+ True if the *annotation* `tp` is equivalent to Optional[…].
66
+ Works for Optional[T], Union[T, None], and T | None.
67
+ """
68
+ return NoneType in get_args(tp) # fastest check
69
+
70
+
60
71
  async def convert_from_native_to_inputs(interface: NativeInterface, *args, **kwargs) -> Inputs:
61
72
  kwargs = interface.convert_to_kwargs(*args, **kwargs)
62
73
  if len(kwargs) == 0:
63
74
  return Inputs.empty()
75
+
64
76
  # fill in defaults if missing
65
77
  for input_name, (input_type, default_value) in interface.inputs.items():
66
78
  if input_name not in kwargs:
67
- if default_value is not None:
79
+ if (default_value is not None and default_value is not inspect.Signature.empty) or (
80
+ default_value is None and is_optional_type(input_type)
81
+ ):
68
82
  kwargs[input_name] = default_value
69
- # todo: fill in Nones for optional inputs
70
83
  if len(kwargs) < len(interface.inputs):
71
84
  raise ValueError(
72
85
  f"Received {len(kwargs)} inputs but interface has {len(interface.inputs)}. "
73
86
  f"Please provide all required inputs."
74
87
  )
75
88
  literal_map = await TypeEngine.dict_to_literal_map(kwargs, interface.get_input_types())
89
+ # Make sure we the interface, not literal_map or kwargs, because those may have a different order
76
90
  return Inputs(
77
91
  proto_inputs=run_definition_pb2.Inputs(
78
- literals=[run_definition_pb2.NamedLiteral(name=k, value=v) for k, v in literal_map.literals.items()]
92
+ literals=[
93
+ run_definition_pb2.NamedLiteral(name=k, value=literal_map.literals[k]) for k in interface.inputs.keys()
94
+ ]
79
95
  )
80
96
  )
81
97
 
@@ -201,10 +217,48 @@ def hash_data(data: Union[str, bytes]) -> str:
201
217
  return base64.b64encode(digest).decode("utf-8")
202
218
 
203
219
 
220
+ def generate_inputs_hash(serialized_inputs: str | bytes) -> str:
221
+ """
222
+ Generate a hash for the inputs. This is used to uniquely identify the inputs for a task.
223
+ :return: A hexadecimal string representation of the hash.
224
+ """
225
+ return hash_data(serialized_inputs)
226
+
227
+
228
+ def generate_cache_key_hash(
229
+ task_name: str,
230
+ inputs_hash: str,
231
+ task_interface: TypedInterface,
232
+ cache_version: str,
233
+ ignored_input_vars: List[str],
234
+ proto_inputs: run_definition_pb2.Inputs,
235
+ ) -> str:
236
+ """
237
+ Generate a cache key hash based on the inputs hash, task name, task interface, and cache version.
238
+ This is used to uniquely identify the cache key for a task.
239
+
240
+ :param task_name: The name of the task.
241
+ :param inputs_hash: The hash of the inputs.
242
+ :param task_interface: The interface of the task.
243
+ :param cache_version: The version of the cache.
244
+ :param ignored_input_vars: A list of input variable names to ignore when generating the cache key.
245
+ :param proto_inputs: The proto inputs for the task, only used if there are ignored inputs.
246
+ :return: A hexadecimal string representation of the cache key hash.
247
+ """
248
+ if ignored_input_vars:
249
+ filtered = [named_lit for named_lit in proto_inputs.literals if named_lit.name not in ignored_input_vars]
250
+ final = run_definition_pb2.Inputs(literals=filtered)
251
+ final_inputs = final.SerializeToString(deterministic=True)
252
+ else:
253
+ final_inputs = inputs_hash
254
+ data = f"{final_inputs}{task_name}{task_interface.SerializeToString(deterministic=True)}{cache_version}"
255
+ return hash_data(data)
256
+
257
+
204
258
  def generate_sub_action_id_and_output_path(
205
259
  tctx: TaskContext,
206
260
  task_spec_or_name: task_definition_pb2.TaskSpec | str,
207
- serialized_inputs: str | bytes,
261
+ inputs_hash: str,
208
262
  invoke_seq: int,
209
263
  ) -> Tuple[ActionID, str]:
210
264
  """
@@ -213,14 +267,14 @@ def generate_sub_action_id_and_output_path(
213
267
  action name = current action name + task name + input hash + group name (if available)
214
268
  :param tctx:
215
269
  :param task_spec_or_name: task specification or task name. Task name is only used in case of trace actions.
216
- :param serialized_inputs:
270
+ :param inputs_hash: Consistent hash string of the inputs
217
271
  :param invoke_seq: The sequence number of the invocation, used to differentiate between multiple invocations.
218
272
  :return:
219
273
  """
220
274
  current_action_id = tctx.action
221
275
  current_output_path = tctx.run_base_dir
222
- inputs_hash = hash_data(serialized_inputs)
223
276
  if isinstance(task_spec_or_name, task_definition_pb2.TaskSpec):
277
+ task_spec_or_name.task_template.interface
224
278
  task_hash = hash_data(task_spec_or_name.SerializeToString(deterministic=True))
225
279
  else:
226
280
  task_hash = task_spec_or_name
@@ -165,7 +165,7 @@ def get_proto_task(task: TaskTemplate, serialize_context: SerializationContext)
165
165
  discoverable=cache_enabled,
166
166
  discovery_version=cache_version,
167
167
  cache_serializable=task_cache.serialize,
168
- cache_ignore_input_vars=task_cache.ignored_inputs,
168
+ cache_ignore_input_vars=task_cache.get_ignored_inputs() if cache_enabled else None,
169
169
  runtime=tasks_pb2.RuntimeMetadata(),
170
170
  retries=get_proto_retry_strategy(task.retries),
171
171
  timeout=get_proto_timeout(task.timeout),
@@ -12,12 +12,13 @@ _sym_db = _symbol_database.Default()
12
12
 
13
13
 
14
14
  from flyteidl.core import types_pb2 as flyteidl_dot_core_dot_types__pb2
15
+ from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
15
16
  from flyte._protos.validate.validate import validate_pb2 as validate_dot_validate__pb2
16
17
  from flyte._protos.workflow import run_definition_pb2 as workflow_dot_run__definition__pb2
17
18
  from flyte._protos.workflow import task_definition_pb2 as workflow_dot_task__definition__pb2
18
19
 
19
20
 
20
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cworkflow/queue_service.proto\x12\x11\x63loudidl.workflow\x1a\x19\x66lyteidl/core/types.proto\x1a\x17validate/validate.proto\x1a\x1dworkflow/run_definition.proto\x1a\x1eworkflow/task_definition.proto\"\x7f\n\x10WorkerIdentifier\x12+\n\x0corganization\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x0corganization\x12!\n\x07\x63luster\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07\x63luster\x12\x1b\n\x04name\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"\x8a\x04\n\x14\x45nqueueActionRequest\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x31\n\x12parent_action_name\x18\x02 \x01(\tH\x01R\x10parentActionName\x88\x01\x01\x12$\n\tinput_uri\x18\x06 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x08inputUri\x12/\n\x0frun_output_base\x18\x07 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\rrunOutputBase\x12\x14\n\x05group\x18\x08 \x01(\tR\x05group\x12\x18\n\x07subject\x18\t \x01(\tR\x07subject\x12=\n\x04task\x18\n \x01(\x0b\x32\x1d.cloudidl.workflow.TaskActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x04task\x12@\n\x05trace\x18\x0b \x01(\x0b\x32\x1e.cloudidl.workflow.TraceActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x05trace\x12L\n\tcondition\x18\x0c \x01(\x0b\x32\".cloudidl.workflow.ConditionActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\tconditionB\x06\n\x04specB\x15\n\x13_parent_action_name\"z\n\nTaskAction\x12\x31\n\x02id\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TaskIdentifierR\x02id\x12\x39\n\x04spec\x18\x02 \x01(\x0b\x32\x1b.cloudidl.workflow.TaskSpecB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x04spec\"*\n\x0bTraceAction\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"\x8a\x02\n\x0f\x43onditionAction\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\x12 \n\x06run_id\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00R\x05runId\x12&\n\taction_id\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00R\x08\x61\x63tionId\x12\x18\n\x06global\x18\x04 \x01(\x08H\x00R\x06global\x12.\n\x04type\x18\x06 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x04type\x12\x16\n\x06prompt\x18\x07 \x01(\tR\x06prompt\x12 \n\x0b\x64\x65scription\x18\x08 \x01(\tR\x0b\x64\x65scriptionB\x0c\n\x05scope\x12\x03\xf8\x42\x01\"\x17\n\x15\x45nqueueActionResponse\"Z\n\x15\x41\x62ortQueuedRunRequest\x12\x41\n\x06run_id\x18\x01 \x01(\x0b\x32 .cloudidl.workflow.RunIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x05runId\"\x18\n\x16\x41\x62ortQueuedRunResponse\"\x86\x03\n\x10HeartbeatRequest\x12J\n\tworker_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.WorkerIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08workerId\x12O\n\x11\x61\x63tive_action_ids\x18\x02 \x03(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x0f\x61\x63tiveActionIds\x12S\n\x13terminal_action_ids\x18\x03 \x03(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x11terminalActionIds\x12Q\n\x12\x61\x62orted_action_ids\x18\x04 \x03(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x10\x61\x62ortedActionIds\x12-\n\x12\x61vailable_capacity\x18\x05 \x01(\x05R\x11\x61vailableCapacity\"\xe4\x01\n\x11HeartbeatResponse\x12\x37\n\nnew_leases\x18\x01 \x03(\x0b\x32\x18.cloudidl.workflow.LeaseR\tnewLeases\x12?\n\x0e\x61\x62orted_leases\x18\x02 \x03(\x0b\x32\x18.cloudidl.workflow.LeaseR\rabortedLeases\x12U\n\x14\x66inalized_action_ids\x18\x03 \x03(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x12\x66inalizedActionIds\"a\n\x13StreamLeasesRequest\x12J\n\tworker_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.WorkerIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08workerId\"H\n\x14StreamLeasesResponse\x12\x30\n\x06leases\x18\x01 \x03(\x0b\x32\x18.cloudidl.workflow.LeaseR\x06leases\"\xbe\x03\n\x05Lease\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x31\n\x12parent_action_name\x18\x02 \x01(\tH\x01R\x10parentActionName\x88\x01\x01\x12$\n\tinput_uri\x18\x04 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x08inputUri\x12/\n\x0frun_output_base\x18\x05 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\rrunOutputBase\x12=\n\x04task\x18\x06 \x01(\x0b\x32\x1d.cloudidl.workflow.TaskActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x04task\x12L\n\tcondition\x18\x07 \x01(\x0b\x32\".cloudidl.workflow.ConditionActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\tcondition\x12\x14\n\x05group\x18\x08 \x01(\tR\x05group\x12\x18\n\x07subject\x18\t \x01(\tR\x07subjectB\x0b\n\x04spec\x12\x03\xf8\x42\x01\x42\x15\n\x13_parent_action_name2\xa0\x03\n\x0cQueueService\x12\x64\n\rEnqueueAction\x12\'.cloudidl.workflow.EnqueueActionRequest\x1a(.cloudidl.workflow.EnqueueActionResponse\"\x00\x12g\n\x0e\x41\x62ortQueuedRun\x12(.cloudidl.workflow.AbortQueuedRunRequest\x1a).cloudidl.workflow.AbortQueuedRunResponse\"\x00\x12\\\n\tHeartbeat\x12#.cloudidl.workflow.HeartbeatRequest\x1a$.cloudidl.workflow.HeartbeatResponse\"\x00(\x01\x30\x01\x12\x63\n\x0cStreamLeases\x12&.cloudidl.workflow.StreamLeasesRequest\x1a\'.cloudidl.workflow.StreamLeasesResponse\"\x00\x30\x01\x42\xbe\x01\n\x15\x63om.cloudidl.workflowB\x11QueueServiceProtoH\x02P\x01Z+github.com/unionai/cloud/gen/pb-go/workflow\xa2\x02\x03\x43WX\xaa\x02\x11\x43loudidl.Workflow\xca\x02\x11\x43loudidl\\Workflow\xe2\x02\x1d\x43loudidl\\Workflow\\GPBMetadata\xea\x02\x12\x43loudidl::Workflowb\x06proto3')
21
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cworkflow/queue_service.proto\x12\x11\x63loudidl.workflow\x1a\x19\x66lyteidl/core/types.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17validate/validate.proto\x1a\x1dworkflow/run_definition.proto\x1a\x1eworkflow/task_definition.proto\"\x7f\n\x10WorkerIdentifier\x12+\n\x0corganization\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x0corganization\x12!\n\x07\x63luster\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07\x63luster\x12\x1b\n\x04name\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"\x8a\x04\n\x14\x45nqueueActionRequest\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x31\n\x12parent_action_name\x18\x02 \x01(\tH\x01R\x10parentActionName\x88\x01\x01\x12$\n\tinput_uri\x18\x06 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x08inputUri\x12/\n\x0frun_output_base\x18\x07 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\rrunOutputBase\x12\x14\n\x05group\x18\x08 \x01(\tR\x05group\x12\x18\n\x07subject\x18\t \x01(\tR\x07subject\x12=\n\x04task\x18\n \x01(\x0b\x32\x1d.cloudidl.workflow.TaskActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x04task\x12@\n\x05trace\x18\x0b \x01(\x0b\x32\x1e.cloudidl.workflow.TraceActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x05trace\x12L\n\tcondition\x18\x0c \x01(\x0b\x32\".cloudidl.workflow.ConditionActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\tconditionB\x06\n\x04specB\x15\n\x13_parent_action_name\"\xb5\x01\n\nTaskAction\x12\x31\n\x02id\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TaskIdentifierR\x02id\x12\x39\n\x04spec\x18\x02 \x01(\x0b\x32\x1b.cloudidl.workflow.TaskSpecB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x04spec\x12\x39\n\tcache_key\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.StringValueR\x08\x63\x61\x63heKey\"*\n\x0bTraceAction\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"\x8a\x02\n\x0f\x43onditionAction\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\x12 \n\x06run_id\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00R\x05runId\x12&\n\taction_id\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00R\x08\x61\x63tionId\x12\x18\n\x06global\x18\x04 \x01(\x08H\x00R\x06global\x12.\n\x04type\x18\x06 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x04type\x12\x16\n\x06prompt\x18\x07 \x01(\tR\x06prompt\x12 \n\x0b\x64\x65scription\x18\x08 \x01(\tR\x0b\x64\x65scriptionB\x0c\n\x05scope\x12\x03\xf8\x42\x01\"\x17\n\x15\x45nqueueActionResponse\"Z\n\x15\x41\x62ortQueuedRunRequest\x12\x41\n\x06run_id\x18\x01 \x01(\x0b\x32 .cloudidl.workflow.RunIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x05runId\"\x18\n\x16\x41\x62ortQueuedRunResponse\"\x86\x03\n\x10HeartbeatRequest\x12J\n\tworker_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.WorkerIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08workerId\x12O\n\x11\x61\x63tive_action_ids\x18\x02 \x03(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x0f\x61\x63tiveActionIds\x12S\n\x13terminal_action_ids\x18\x03 \x03(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x11terminalActionIds\x12Q\n\x12\x61\x62orted_action_ids\x18\x04 \x03(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x10\x61\x62ortedActionIds\x12-\n\x12\x61vailable_capacity\x18\x05 \x01(\x05R\x11\x61vailableCapacity\"\xe4\x01\n\x11HeartbeatResponse\x12\x37\n\nnew_leases\x18\x01 \x03(\x0b\x32\x18.cloudidl.workflow.LeaseR\tnewLeases\x12?\n\x0e\x61\x62orted_leases\x18\x02 \x03(\x0b\x32\x18.cloudidl.workflow.LeaseR\rabortedLeases\x12U\n\x14\x66inalized_action_ids\x18\x03 \x03(\x0b\x32#.cloudidl.workflow.ActionIdentifierR\x12\x66inalizedActionIds\"a\n\x13StreamLeasesRequest\x12J\n\tworker_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.WorkerIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08workerId\"H\n\x14StreamLeasesResponse\x12\x30\n\x06leases\x18\x01 \x03(\x0b\x32\x18.cloudidl.workflow.LeaseR\x06leases\"\xbe\x03\n\x05Lease\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x31\n\x12parent_action_name\x18\x02 \x01(\tH\x01R\x10parentActionName\x88\x01\x01\x12$\n\tinput_uri\x18\x04 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x08inputUri\x12/\n\x0frun_output_base\x18\x05 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\rrunOutputBase\x12=\n\x04task\x18\x06 \x01(\x0b\x32\x1d.cloudidl.workflow.TaskActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x04task\x12L\n\tcondition\x18\x07 \x01(\x0b\x32\".cloudidl.workflow.ConditionActionB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\tcondition\x12\x14\n\x05group\x18\x08 \x01(\tR\x05group\x12\x18\n\x07subject\x18\t \x01(\tR\x07subjectB\x0b\n\x04spec\x12\x03\xf8\x42\x01\x42\x15\n\x13_parent_action_name2\xa0\x03\n\x0cQueueService\x12\x64\n\rEnqueueAction\x12\'.cloudidl.workflow.EnqueueActionRequest\x1a(.cloudidl.workflow.EnqueueActionResponse\"\x00\x12g\n\x0e\x41\x62ortQueuedRun\x12(.cloudidl.workflow.AbortQueuedRunRequest\x1a).cloudidl.workflow.AbortQueuedRunResponse\"\x00\x12\\\n\tHeartbeat\x12#.cloudidl.workflow.HeartbeatRequest\x1a$.cloudidl.workflow.HeartbeatResponse\"\x00(\x01\x30\x01\x12\x63\n\x0cStreamLeases\x12&.cloudidl.workflow.StreamLeasesRequest\x1a\'.cloudidl.workflow.StreamLeasesResponse\"\x00\x30\x01\x42\xbe\x01\n\x15\x63om.cloudidl.workflowB\x11QueueServiceProtoH\x02P\x01Z+github.com/unionai/cloud/gen/pb-go/workflow\xa2\x02\x03\x43WX\xaa\x02\x11\x43loudidl.Workflow\xca\x02\x11\x43loudidl\\Workflow\xe2\x02\x1d\x43loudidl\\Workflow\\GPBMetadata\xea\x02\x12\x43loudidl::Workflowb\x06proto3')
21
22
 
22
23
  _globals = globals()
23
24
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -73,32 +74,32 @@ if _descriptor._USE_C_DESCRIPTORS == False:
73
74
  _LEASE.fields_by_name['task']._serialized_options = b'\372B\005\212\001\002\020\001'
74
75
  _LEASE.fields_by_name['condition']._options = None
75
76
  _LEASE.fields_by_name['condition']._serialized_options = b'\372B\005\212\001\002\020\001'
76
- _globals['_WORKERIDENTIFIER']._serialized_start=166
77
- _globals['_WORKERIDENTIFIER']._serialized_end=293
78
- _globals['_ENQUEUEACTIONREQUEST']._serialized_start=296
79
- _globals['_ENQUEUEACTIONREQUEST']._serialized_end=818
80
- _globals['_TASKACTION']._serialized_start=820
81
- _globals['_TASKACTION']._serialized_end=942
82
- _globals['_TRACEACTION']._serialized_start=944
83
- _globals['_TRACEACTION']._serialized_end=986
84
- _globals['_CONDITIONACTION']._serialized_start=989
85
- _globals['_CONDITIONACTION']._serialized_end=1255
86
- _globals['_ENQUEUEACTIONRESPONSE']._serialized_start=1257
87
- _globals['_ENQUEUEACTIONRESPONSE']._serialized_end=1280
88
- _globals['_ABORTQUEUEDRUNREQUEST']._serialized_start=1282
89
- _globals['_ABORTQUEUEDRUNREQUEST']._serialized_end=1372
90
- _globals['_ABORTQUEUEDRUNRESPONSE']._serialized_start=1374
91
- _globals['_ABORTQUEUEDRUNRESPONSE']._serialized_end=1398
92
- _globals['_HEARTBEATREQUEST']._serialized_start=1401
93
- _globals['_HEARTBEATREQUEST']._serialized_end=1791
94
- _globals['_HEARTBEATRESPONSE']._serialized_start=1794
95
- _globals['_HEARTBEATRESPONSE']._serialized_end=2022
96
- _globals['_STREAMLEASESREQUEST']._serialized_start=2024
97
- _globals['_STREAMLEASESREQUEST']._serialized_end=2121
98
- _globals['_STREAMLEASESRESPONSE']._serialized_start=2123
99
- _globals['_STREAMLEASESRESPONSE']._serialized_end=2195
100
- _globals['_LEASE']._serialized_start=2198
101
- _globals['_LEASE']._serialized_end=2644
102
- _globals['_QUEUESERVICE']._serialized_start=2647
103
- _globals['_QUEUESERVICE']._serialized_end=3063
77
+ _globals['_WORKERIDENTIFIER']._serialized_start=198
78
+ _globals['_WORKERIDENTIFIER']._serialized_end=325
79
+ _globals['_ENQUEUEACTIONREQUEST']._serialized_start=328
80
+ _globals['_ENQUEUEACTIONREQUEST']._serialized_end=850
81
+ _globals['_TASKACTION']._serialized_start=853
82
+ _globals['_TASKACTION']._serialized_end=1034
83
+ _globals['_TRACEACTION']._serialized_start=1036
84
+ _globals['_TRACEACTION']._serialized_end=1078
85
+ _globals['_CONDITIONACTION']._serialized_start=1081
86
+ _globals['_CONDITIONACTION']._serialized_end=1347
87
+ _globals['_ENQUEUEACTIONRESPONSE']._serialized_start=1349
88
+ _globals['_ENQUEUEACTIONRESPONSE']._serialized_end=1372
89
+ _globals['_ABORTQUEUEDRUNREQUEST']._serialized_start=1374
90
+ _globals['_ABORTQUEUEDRUNREQUEST']._serialized_end=1464
91
+ _globals['_ABORTQUEUEDRUNRESPONSE']._serialized_start=1466
92
+ _globals['_ABORTQUEUEDRUNRESPONSE']._serialized_end=1490
93
+ _globals['_HEARTBEATREQUEST']._serialized_start=1493
94
+ _globals['_HEARTBEATREQUEST']._serialized_end=1883
95
+ _globals['_HEARTBEATRESPONSE']._serialized_start=1886
96
+ _globals['_HEARTBEATRESPONSE']._serialized_end=2114
97
+ _globals['_STREAMLEASESREQUEST']._serialized_start=2116
98
+ _globals['_STREAMLEASESREQUEST']._serialized_end=2213
99
+ _globals['_STREAMLEASESRESPONSE']._serialized_start=2215
100
+ _globals['_STREAMLEASESRESPONSE']._serialized_end=2287
101
+ _globals['_LEASE']._serialized_start=2290
102
+ _globals['_LEASE']._serialized_end=2736
103
+ _globals['_QUEUESERVICE']._serialized_start=2739
104
+ _globals['_QUEUESERVICE']._serialized_end=3155
104
105
  # @@protoc_insertion_point(module_scope)
@@ -1,4 +1,5 @@
1
1
  from flyteidl.core import types_pb2 as _types_pb2
2
+ from google.protobuf import wrappers_pb2 as _wrappers_pb2
2
3
  from flyte._protos.validate.validate import validate_pb2 as _validate_pb2
3
4
  from flyte._protos.workflow import run_definition_pb2 as _run_definition_pb2
4
5
  from flyte._protos.workflow import task_definition_pb2 as _task_definition_pb2
@@ -42,12 +43,14 @@ class EnqueueActionRequest(_message.Message):
42
43
  def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ..., parent_action_name: _Optional[str] = ..., input_uri: _Optional[str] = ..., run_output_base: _Optional[str] = ..., group: _Optional[str] = ..., subject: _Optional[str] = ..., task: _Optional[_Union[TaskAction, _Mapping]] = ..., trace: _Optional[_Union[TraceAction, _Mapping]] = ..., condition: _Optional[_Union[ConditionAction, _Mapping]] = ...) -> None: ...
43
44
 
44
45
  class TaskAction(_message.Message):
45
- __slots__ = ["id", "spec"]
46
+ __slots__ = ["id", "spec", "cache_key"]
46
47
  ID_FIELD_NUMBER: _ClassVar[int]
47
48
  SPEC_FIELD_NUMBER: _ClassVar[int]
49
+ CACHE_KEY_FIELD_NUMBER: _ClassVar[int]
48
50
  id: _task_definition_pb2.TaskIdentifier
49
51
  spec: _task_definition_pb2.TaskSpec
50
- def __init__(self, id: _Optional[_Union[_task_definition_pb2.TaskIdentifier, _Mapping]] = ..., spec: _Optional[_Union[_task_definition_pb2.TaskSpec, _Mapping]] = ...) -> None: ...
52
+ cache_key: _wrappers_pb2.StringValue
53
+ def __init__(self, id: _Optional[_Union[_task_definition_pb2.TaskIdentifier, _Mapping]] = ..., spec: _Optional[_Union[_task_definition_pb2.TaskSpec, _Mapping]] = ..., cache_key: _Optional[_Union[_wrappers_pb2.StringValue, _Mapping]] = ...) -> None: ...
51
54
 
52
55
  class TraceAction(_message.Message):
53
56
  __slots__ = ["name"]
@@ -12,12 +12,12 @@ _sym_db = _symbol_database.Default()
12
12
 
13
13
 
14
14
  from flyteidl.core import execution_pb2 as flyteidl_dot_core_dot_execution__pb2
15
+ from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
15
16
  from flyte._protos.validate.validate import validate_pb2 as validate_dot_validate__pb2
16
17
  from flyte._protos.workflow import run_definition_pb2 as workflow_dot_run__definition__pb2
17
- from flyte._protos.workflow import task_definition_pb2 as workflow_dot_task__definition__pb2
18
18
 
19
19
 
20
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cworkflow/state_service.proto\x12\x11\x63loudidl.workflow\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x17validate/validate.proto\x1a\x1dworkflow/run_definition.proto\x1a\x1eworkflow/task_definition.proto\"\xc3\x01\n\x0cStoreRequest\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x31\n\x12parent_action_name\x18\x02 \x01(\tH\x00R\x10parentActionName\x88\x01\x01\x12\x1d\n\x05state\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x05stateB\x15\n\x13_parent_action_name\"\x0f\n\rStoreResponse\"\xb6\x01\n\x0bLoadRequest\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12:\n\x07task_id\x18\x02 \x01(\x0b\x32!.cloudidl.workflow.TaskIdentifierR\x06taskId\x12\x1f\n\x0binputs_hash\x18\x03 \x01(\x03R\ninputsHash\"-\n\x0cLoadResponse\x12\x1d\n\x05state\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x05state\"n\n\x0cWatchRequest\x12O\n\x10parent_action_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierH\x00R\x0eparentActionIdB\r\n\x06\x66ilter\x12\x03\xf8\x42\x01\"\xb0\x01\n\rWatchResponse\x12\x46\n\raction_update\x18\x01 \x01(\x0b\x32\x1f.cloudidl.workflow.ActionUpdateH\x00R\x0c\x61\x63tionUpdate\x12L\n\x0f\x63ontrol_message\x18\x02 \x01(\x0b\x32!.cloudidl.workflow.ControlMessageH\x00R\x0e\x63ontrolMessageB\t\n\x07message\",\n\x0e\x43ontrolMessage\x12\x1a\n\x08sentinel\x18\x01 \x01(\x08R\x08sentinel\"\xed\x01\n\x0c\x41\x63tionUpdate\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12.\n\x05phase\x18\x02 \x01(\x0e\x32\x18.cloudidl.workflow.PhaseR\x05phase\x12\x38\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x1d.flyteidl.core.ExecutionErrorH\x00R\x05\x65rror\x88\x01\x01\x12\x1d\n\noutput_uri\x18\x04 \x01(\tR\toutputUriB\x08\n\x06_error2\xf7\x01\n\x0cStateService\x12L\n\x05Store\x12\x1f.cloudidl.workflow.StoreRequest\x1a .cloudidl.workflow.StoreResponse\"\x00\x12I\n\x04Load\x12\x1e.cloudidl.workflow.LoadRequest\x1a\x1f.cloudidl.workflow.LoadResponse\"\x00\x12N\n\x05Watch\x12\x1f.cloudidl.workflow.WatchRequest\x1a .cloudidl.workflow.WatchResponse\"\x00\x30\x01\x42\xbe\x01\n\x15\x63om.cloudidl.workflowB\x11StateServiceProtoH\x02P\x01Z+github.com/unionai/cloud/gen/pb-go/workflow\xa2\x02\x03\x43WX\xaa\x02\x11\x43loudidl.Workflow\xca\x02\x11\x43loudidl\\Workflow\xe2\x02\x1d\x43loudidl\\Workflow\\GPBMetadata\xea\x02\x12\x43loudidl::Workflowb\x06proto3')
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cworkflow/state_service.proto\x12\x11\x63loudidl.workflow\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x17google/rpc/status.proto\x1a\x17validate/validate.proto\x1a\x1dworkflow/run_definition.proto\"\xc1\x01\n\nPutRequest\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x31\n\x12parent_action_name\x18\x02 \x01(\tH\x00R\x10parentActionName\x88\x01\x01\x12\x1d\n\x05state\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x05stateB\x15\n\x13_parent_action_name\"\x8f\x01\n\x0bPutResponse\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x34\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06status\"X\n\nGetRequest\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\"\xae\x01\n\x0bGetResponse\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x34\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06status\x12\x1d\n\x05state\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x05state\"n\n\x0cWatchRequest\x12O\n\x10parent_action_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierH\x00R\x0eparentActionIdB\r\n\x06\x66ilter\x12\x03\xf8\x42\x01\"\xb0\x01\n\rWatchResponse\x12\x46\n\raction_update\x18\x01 \x01(\x0b\x32\x1f.cloudidl.workflow.ActionUpdateH\x00R\x0c\x61\x63tionUpdate\x12L\n\x0f\x63ontrol_message\x18\x02 \x01(\x0b\x32!.cloudidl.workflow.ControlMessageH\x00R\x0e\x63ontrolMessageB\t\n\x07message\",\n\x0e\x43ontrolMessage\x12\x1a\n\x08sentinel\x18\x01 \x01(\x08R\x08sentinel\"\xed\x01\n\x0c\x41\x63tionUpdate\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12.\n\x05phase\x18\x02 \x01(\x0e\x32\x18.cloudidl.workflow.PhaseR\x05phase\x12\x38\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x1d.flyteidl.core.ExecutionErrorH\x00R\x05\x65rror\x88\x01\x01\x12\x1d\n\noutput_uri\x18\x04 \x01(\tR\toutputUriB\x08\n\x06_error2\xf6\x01\n\x0cStateService\x12J\n\x03Put\x12\x1d.cloudidl.workflow.PutRequest\x1a\x1e.cloudidl.workflow.PutResponse\"\x00(\x01\x30\x01\x12J\n\x03Get\x12\x1d.cloudidl.workflow.GetRequest\x1a\x1e.cloudidl.workflow.GetResponse\"\x00(\x01\x30\x01\x12N\n\x05Watch\x12\x1f.cloudidl.workflow.WatchRequest\x1a .cloudidl.workflow.WatchResponse\"\x00\x30\x01\x42\xbe\x01\n\x15\x63om.cloudidl.workflowB\x11StateServiceProtoH\x02P\x01Z+github.com/unionai/cloud/gen/pb-go/workflow\xa2\x02\x03\x43WX\xaa\x02\x11\x43loudidl.Workflow\xca\x02\x11\x43loudidl\\Workflow\xe2\x02\x1d\x43loudidl\\Workflow\\GPBMetadata\xea\x02\x12\x43loudidl::Workflowb\x06proto3')
21
21
 
22
22
  _globals = globals()
23
23
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -25,34 +25,42 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflow.state_service_pb2'
25
25
  if _descriptor._USE_C_DESCRIPTORS == False:
26
26
  DESCRIPTOR._options = None
27
27
  DESCRIPTOR._serialized_options = b'\n\025com.cloudidl.workflowB\021StateServiceProtoH\002P\001Z+github.com/unionai/cloud/gen/pb-go/workflow\242\002\003CWX\252\002\021Cloudidl.Workflow\312\002\021Cloudidl\\Workflow\342\002\035Cloudidl\\Workflow\\GPBMetadata\352\002\022Cloudidl::Workflow'
28
- _STOREREQUEST.fields_by_name['action_id']._options = None
29
- _STOREREQUEST.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
30
- _STOREREQUEST.fields_by_name['state']._options = None
31
- _STOREREQUEST.fields_by_name['state']._serialized_options = b'\372B\004r\002\020\001'
32
- _LOADREQUEST.fields_by_name['action_id']._options = None
33
- _LOADREQUEST.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
34
- _LOADRESPONSE.fields_by_name['state']._options = None
35
- _LOADRESPONSE.fields_by_name['state']._serialized_options = b'\372B\004r\002\020\001'
28
+ _PUTREQUEST.fields_by_name['action_id']._options = None
29
+ _PUTREQUEST.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
30
+ _PUTREQUEST.fields_by_name['state']._options = None
31
+ _PUTREQUEST.fields_by_name['state']._serialized_options = b'\372B\004r\002\020\001'
32
+ _PUTRESPONSE.fields_by_name['action_id']._options = None
33
+ _PUTRESPONSE.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
34
+ _PUTRESPONSE.fields_by_name['status']._options = None
35
+ _PUTRESPONSE.fields_by_name['status']._serialized_options = b'\372B\005\212\001\002\020\001'
36
+ _GETREQUEST.fields_by_name['action_id']._options = None
37
+ _GETREQUEST.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
38
+ _GETRESPONSE.fields_by_name['action_id']._options = None
39
+ _GETRESPONSE.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
40
+ _GETRESPONSE.fields_by_name['status']._options = None
41
+ _GETRESPONSE.fields_by_name['status']._serialized_options = b'\372B\005\212\001\002\020\001'
42
+ _GETRESPONSE.fields_by_name['state']._options = None
43
+ _GETRESPONSE.fields_by_name['state']._serialized_options = b'\372B\004r\002\020\001'
36
44
  _WATCHREQUEST.oneofs_by_name['filter']._options = None
37
45
  _WATCHREQUEST.oneofs_by_name['filter']._serialized_options = b'\370B\001'
38
46
  _ACTIONUPDATE.fields_by_name['action_id']._options = None
39
47
  _ACTIONUPDATE.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
40
- _globals['_STOREREQUEST']._serialized_start=171
41
- _globals['_STOREREQUEST']._serialized_end=366
42
- _globals['_STORERESPONSE']._serialized_start=368
43
- _globals['_STORERESPONSE']._serialized_end=383
44
- _globals['_LOADREQUEST']._serialized_start=386
45
- _globals['_LOADREQUEST']._serialized_end=568
46
- _globals['_LOADRESPONSE']._serialized_start=570
47
- _globals['_LOADRESPONSE']._serialized_end=615
48
- _globals['_WATCHREQUEST']._serialized_start=617
49
- _globals['_WATCHREQUEST']._serialized_end=727
50
- _globals['_WATCHRESPONSE']._serialized_start=730
51
- _globals['_WATCHRESPONSE']._serialized_end=906
52
- _globals['_CONTROLMESSAGE']._serialized_start=908
53
- _globals['_CONTROLMESSAGE']._serialized_end=952
54
- _globals['_ACTIONUPDATE']._serialized_start=955
55
- _globals['_ACTIONUPDATE']._serialized_end=1192
56
- _globals['_STATESERVICE']._serialized_start=1195
57
- _globals['_STATESERVICE']._serialized_end=1442
48
+ _globals['_PUTREQUEST']._serialized_start=164
49
+ _globals['_PUTREQUEST']._serialized_end=357
50
+ _globals['_PUTRESPONSE']._serialized_start=360
51
+ _globals['_PUTRESPONSE']._serialized_end=503
52
+ _globals['_GETREQUEST']._serialized_start=505
53
+ _globals['_GETREQUEST']._serialized_end=593
54
+ _globals['_GETRESPONSE']._serialized_start=596
55
+ _globals['_GETRESPONSE']._serialized_end=770
56
+ _globals['_WATCHREQUEST']._serialized_start=772
57
+ _globals['_WATCHREQUEST']._serialized_end=882
58
+ _globals['_WATCHRESPONSE']._serialized_start=885
59
+ _globals['_WATCHRESPONSE']._serialized_end=1061
60
+ _globals['_CONTROLMESSAGE']._serialized_start=1063
61
+ _globals['_CONTROLMESSAGE']._serialized_end=1107
62
+ _globals['_ACTIONUPDATE']._serialized_start=1110
63
+ _globals['_ACTIONUPDATE']._serialized_end=1347
64
+ _globals['_STATESERVICE']._serialized_start=1350
65
+ _globals['_STATESERVICE']._serialized_end=1596
58
66
  # @@protoc_insertion_point(module_scope)
@@ -1,14 +1,14 @@
1
1
  from flyteidl.core import execution_pb2 as _execution_pb2
2
+ from google.rpc import status_pb2 as _status_pb2
2
3
  from flyte._protos.validate.validate import validate_pb2 as _validate_pb2
3
4
  from flyte._protos.workflow import run_definition_pb2 as _run_definition_pb2
4
- from flyte._protos.workflow import task_definition_pb2 as _task_definition_pb2
5
5
  from google.protobuf import descriptor as _descriptor
6
6
  from google.protobuf import message as _message
7
7
  from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
8
8
 
9
9
  DESCRIPTOR: _descriptor.FileDescriptor
10
10
 
11
- class StoreRequest(_message.Message):
11
+ class PutRequest(_message.Message):
12
12
  __slots__ = ["action_id", "parent_action_name", "state"]
13
13
  ACTION_ID_FIELD_NUMBER: _ClassVar[int]
14
14
  PARENT_ACTION_NAME_FIELD_NUMBER: _ClassVar[int]
@@ -18,25 +18,29 @@ class StoreRequest(_message.Message):
18
18
  state: str
19
19
  def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ..., parent_action_name: _Optional[str] = ..., state: _Optional[str] = ...) -> None: ...
20
20
 
21
- class StoreResponse(_message.Message):
22
- __slots__ = []
23
- def __init__(self) -> None: ...
21
+ class PutResponse(_message.Message):
22
+ __slots__ = ["action_id", "status"]
23
+ ACTION_ID_FIELD_NUMBER: _ClassVar[int]
24
+ STATUS_FIELD_NUMBER: _ClassVar[int]
25
+ action_id: _run_definition_pb2.ActionIdentifier
26
+ status: _status_pb2.Status
27
+ def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ..., status: _Optional[_Union[_status_pb2.Status, _Mapping]] = ...) -> None: ...
24
28
 
25
- class LoadRequest(_message.Message):
26
- __slots__ = ["action_id", "task_id", "inputs_hash"]
29
+ class GetRequest(_message.Message):
30
+ __slots__ = ["action_id"]
27
31
  ACTION_ID_FIELD_NUMBER: _ClassVar[int]
28
- TASK_ID_FIELD_NUMBER: _ClassVar[int]
29
- INPUTS_HASH_FIELD_NUMBER: _ClassVar[int]
30
32
  action_id: _run_definition_pb2.ActionIdentifier
31
- task_id: _task_definition_pb2.TaskIdentifier
32
- inputs_hash: int
33
- def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ..., task_id: _Optional[_Union[_task_definition_pb2.TaskIdentifier, _Mapping]] = ..., inputs_hash: _Optional[int] = ...) -> None: ...
33
+ def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ...) -> None: ...
34
34
 
35
- class LoadResponse(_message.Message):
36
- __slots__ = ["state"]
35
+ class GetResponse(_message.Message):
36
+ __slots__ = ["action_id", "status", "state"]
37
+ ACTION_ID_FIELD_NUMBER: _ClassVar[int]
38
+ STATUS_FIELD_NUMBER: _ClassVar[int]
37
39
  STATE_FIELD_NUMBER: _ClassVar[int]
40
+ action_id: _run_definition_pb2.ActionIdentifier
41
+ status: _status_pb2.Status
38
42
  state: str
39
- def __init__(self, state: _Optional[str] = ...) -> None: ...
43
+ def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ..., status: _Optional[_Union[_status_pb2.Status, _Mapping]] = ..., state: _Optional[str] = ...) -> None: ...
40
44
 
41
45
  class WatchRequest(_message.Message):
42
46
  __slots__ = ["parent_action_id"]