flyte 0.2.0b2__py3-none-any.whl → 0.2.0b4__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/_internal/controllers/remote/_core.py +5 -4
- flyte/_internal/controllers/remote/_service_protocol.py +6 -6
- flyte/_protos/logs/dataplane/payload_pb2.py +28 -24
- flyte/_protos/logs/dataplane/payload_pb2.pyi +11 -2
- flyte/_protos/workflow/queue_service_pb2.py +39 -41
- flyte/_protos/workflow/queue_service_pb2.pyi +30 -28
- flyte/_protos/workflow/queue_service_pb2_grpc.py +15 -15
- flyte/_version.py +2 -2
- flyte/cli/__init__.py +10 -0
- flyte/cli/_abort.py +26 -0
- flyte/{_cli → cli}/_common.py +2 -0
- flyte/{_cli → cli}/_create.py +1 -1
- flyte/{_cli → cli}/_delete.py +1 -1
- flyte/{_cli → cli}/_get.py +12 -3
- flyte/{_cli → cli}/_run.py +49 -16
- flyte/{_cli → cli}/main.py +10 -1
- flyte/config/_config.py +2 -0
- flyte/errors.py +9 -0
- flyte/remote/_client/auth/_channel.py +1 -0
- flyte/remote/_logs.py +57 -20
- flyte/remote/_run.py +118 -68
- {flyte-0.2.0b2.dist-info → flyte-0.2.0b4.dist-info}/METADATA +2 -2
- {flyte-0.2.0b2.dist-info → flyte-0.2.0b4.dist-info}/RECORD +28 -27
- {flyte-0.2.0b2.dist-info → flyte-0.2.0b4.dist-info}/entry_points.txt +1 -1
- flyte/_cli/__init__.py +0 -0
- /flyte/{_cli → cli}/_deploy.py +0 -0
- /flyte/{_cli → cli}/_params.py +0 -0
- {flyte-0.2.0b2.dist-info → flyte-0.2.0b4.dist-info}/WHEEL +0 -0
- {flyte-0.2.0b2.dist-info → flyte-0.2.0b4.dist-info}/top_level.txt +0 -0
|
@@ -286,10 +286,11 @@ class Controller:
|
|
|
286
286
|
if started:
|
|
287
287
|
logger.info(f"Cancelling action: {action.name}")
|
|
288
288
|
try:
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
289
|
+
# TODO add support when the queue service supports aborting actions
|
|
290
|
+
# await self._queue_service.AbortQueuedAction(
|
|
291
|
+
# queue_service_pb2.AbortQueuedActionRequest(action_id=action.action_id),
|
|
292
|
+
# wait_for_ready=True,
|
|
293
|
+
# )
|
|
293
294
|
logger.info(f"Successfully cancelled action: {action.name}")
|
|
294
295
|
except grpc.aio.AioRpcError as e:
|
|
295
296
|
if e.code() in [grpc.StatusCode.NOT_FOUND, grpc.StatusCode.FAILED_PRECONDITION]:
|
|
@@ -28,12 +28,12 @@ class QueueService(Protocol):
|
|
|
28
28
|
) -> queue_service_pb2.EnqueueActionResponse:
|
|
29
29
|
"""Enqueue a task"""
|
|
30
30
|
|
|
31
|
-
async def AbortQueuedAction(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
) -> queue_service_pb2.AbortQueuedActionResponse:
|
|
36
|
-
|
|
31
|
+
# async def AbortQueuedAction(
|
|
32
|
+
# self,
|
|
33
|
+
# req: queue_service_pb2.AbortQueuedActionRequest,
|
|
34
|
+
# **kwargs,
|
|
35
|
+
# ) -> queue_service_pb2.AbortQueuedActionResponse:
|
|
36
|
+
# """Dequeue a task"""
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
class ClientSet(Protocol):
|
|
@@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__
|
|
|
15
15
|
from flyte._protos.validate.validate import validate_pb2 as validate_dot_validate__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1clogs/dataplane/payload.proto\x12\x17\x63loudidl.logs.dataplane\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17validate/validate.proto\"o\n\x0bPodResource\x12%\n\tnamespace\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\tnamespace\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\x12\x1c\n\tcontainer\x18\x03 \x01(\tR\tcontainer\"\xda\x01\n\x1cTailTaskExecutionLogsRequest\x12Z\n\x0flogging_context\x18\x01 \x01(\x0b\x32\'.cloudidl.logs.dataplane.LoggingContextB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0eloggingContext\x12;\n\x06source\x18\x03 \x01(\x0e\x32#.cloudidl.logs.dataplane.LogsSourceR\x06source\x12\x1b\n\tno_follow\x18\x04 \x01(\x08R\x08noFollowJ\x04\x08\x02\x10\x03\"\xeb\x01\n\x1dTailTaskExecutionLogsResponse\x12Q\n\x04logs\x18\x01 \x01(\x0b\x32;.cloudidl.logs.dataplane.TailTaskExecutionLogsResponse.LogsH\x00R\x04logs\x1am\n\x04Logs\x12\x18\n\x05lines\x18\x01 \x03(\tB\x02\x18\x01R\x05lines\x12K\n\x10structured_lines\x18\x02 \x03(\x0b\x32 .cloudidl.logs.dataplane.LogLineR\x0fstructuredLinesB\x08\n\x06result\"\
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1clogs/dataplane/payload.proto\x12\x17\x63loudidl.logs.dataplane\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17validate/validate.proto\"o\n\x0bPodResource\x12%\n\tnamespace\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\tnamespace\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\x12\x1c\n\tcontainer\x18\x03 \x01(\tR\tcontainer\"\xda\x01\n\x1cTailTaskExecutionLogsRequest\x12Z\n\x0flogging_context\x18\x01 \x01(\x0b\x32\'.cloudidl.logs.dataplane.LoggingContextB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0eloggingContext\x12;\n\x06source\x18\x03 \x01(\x0e\x32#.cloudidl.logs.dataplane.LogsSourceR\x06source\x12\x1b\n\tno_follow\x18\x04 \x01(\x08R\x08noFollowJ\x04\x08\x02\x10\x03\"\xeb\x01\n\x1dTailTaskExecutionLogsResponse\x12Q\n\x04logs\x18\x01 \x01(\x0b\x32;.cloudidl.logs.dataplane.TailTaskExecutionLogsResponse.LogsH\x00R\x04logs\x1am\n\x04Logs\x12\x18\n\x05lines\x18\x01 \x03(\tB\x02\x18\x01R\x05lines\x12K\n\x10structured_lines\x18\x02 \x03(\x0b\x32 .cloudidl.logs.dataplane.LogLineR\x0fstructuredLinesB\x08\n\x06result\"\xf6\x04\n\x0eLoggingContext\x12*\n\x0c\x63luster_name\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x0b\x63lusterName\x12:\n\x14kubernetes_namespace\x18\x04 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x13kubernetesNamespace\x12\x37\n\x13kubernetes_pod_name\x18\x05 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x11kubernetesPodName\x12\x43\n\x19kubernetes_container_name\x18\x06 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x17kubernetesContainerName\x12[\n\x1c\x65xecution_attempt_start_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x19\x65xecutionAttemptStartTime\x12W\n\x1a\x65xecution_attempt_end_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x17\x65xecutionAttemptEndTime\x12t\n\x15kubernetes_pod_labels\x18\t \x03(\x0b\x32@.cloudidl.logs.dataplane.LoggingContext.KubernetesPodLabelsEntryR\x13kubernetesPodLabels\x1a\x46\n\x18KubernetesPodLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03\"\xf2\x01\n\x13\x43ontainerIdentifier\x12*\n\x0c\x63luster_name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x0b\x63lusterName\x12:\n\x14kubernetes_namespace\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x13kubernetesNamespace\x12\x37\n\x13kubernetes_pod_name\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x11kubernetesPodName\x12:\n\x19kubernetes_container_name\x18\x04 \x01(\tR\x17kubernetesContainerName\"\xb7\x02\n\x11\x43ontainerSelector\x12*\n\x0c\x63luster_name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x0b\x63lusterName\x12:\n\x14kubernetes_namespace\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x13kubernetesNamespace\x12;\n\x1akubernetes_pod_name_prefix\x18\x03 \x01(\tR\x17kubernetesPodNamePrefix\x12:\n\x19kubernetes_container_name\x18\x04 \x01(\tR\x17kubernetesContainerName\x12\x41\n\x1dkubernetes_pod_label_selector\x18\x05 \x01(\tR\x1akubernetesPodLabelSelector\"^\n\x0fLiveLogsOptions\x12$\n\x0elog_pod_status\x18\x01 \x01(\x08R\x0clogPodStatus\x12%\n\x0elog_timestamps\x18\x02 \x01(\x08R\rlogTimestamps\"\xd5\x03\n\x0fTailLogsRequest\x12L\n\tcontainer\x18\x01 \x01(\x0b\x32,.cloudidl.logs.dataplane.ContainerIdentifierH\x00R\tcontainer\x12[\n\x12\x63ontainer_selector\x18\x02 \x01(\x0b\x32*.cloudidl.logs.dataplane.ContainerSelectorH\x00R\x11\x63ontainerSelector\x12\x43\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x08\xfa\x42\x05\xb2\x01\x02\x08\x01R\tstartTime\x12\x35\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65ndTime\x12;\n\x06source\x18\x05 \x01(\x0e\x32#.cloudidl.logs.dataplane.LogsSourceR\x06source\x12T\n\x11live_logs_options\x18\x06 \x01(\x0b\x32(.cloudidl.logs.dataplane.LiveLogsOptionsR\x0fliveLogsOptionsB\x08\n\x06target\"\xa9\x01\n\x07LogLine\x12\x38\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12J\n\noriginator\x18\x03 \x01(\x0e\x32*.cloudidl.logs.dataplane.LogLineOriginatorR\noriginator\"\xf0\x01\n\x08LogLines\x12\x18\n\x05lines\x18\x01 \x03(\tB\x02\x18\x01R\x05lines\x12\'\n\x0f\x63ontainer_index\x18\x02 \x01(\rR\x0e\x63ontainerIndex\x12T\n\tcontainer\x18\x03 \x01(\x0b\x32,.cloudidl.logs.dataplane.ContainerIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\tcontainer\x12K\n\x10structured_lines\x18\x04 \x03(\x0b\x32 .cloudidl.logs.dataplane.LogLineR\x0fstructuredLines\"a\n\x11LogContainersList\x12L\n\ncontainers\x18\x01 \x03(\x0b\x32,.cloudidl.logs.dataplane.ContainerIdentifierR\ncontainers\"F\n\rLogLinesBatch\x12\x35\n\x04logs\x18\x01 \x03(\x0b\x32!.cloudidl.logs.dataplane.LogLinesR\x04logs\"\xd9\x01\n\x10TailLogsResponse\x12V\n\ncontainers\x18\x01 \x01(\x0b\x32*.cloudidl.logs.dataplane.LogContainersListB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\ncontainers\x12Z\n\x0flog_lines_batch\x18\x03 \x01(\x0b\x32&.cloudidl.logs.dataplane.LogLinesBatchB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\rlogLinesBatchB\x0b\n\x04resp\x12\x03\xf8\x42\x01J\x04\x08\x02\x10\x03*6\n\x11LogLineOriginator\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04USER\x10\x01\x12\n\n\x06SYSTEM\x10\x02*F\n\nLogsSource\x12\x15\n\x11LIVE_OR_PERSISTED\x10\x00\x12\r\n\tLIVE_ONLY\x10\x01\x12\x12\n\x0ePERSISTED_ONLY\x10\x02\x42\xde\x01\n\x1b\x63om.cloudidl.logs.dataplaneB\x0cPayloadProtoH\x02P\x01Z1github.com/unionai/cloud/gen/pb-go/logs/dataplane\xa2\x02\x03\x43LD\xaa\x02\x17\x43loudidl.Logs.Dataplane\xca\x02\x17\x43loudidl\\Logs\\Dataplane\xe2\x02#Cloudidl\\Logs\\Dataplane\\GPBMetadata\xea\x02\x19\x43loudidl::Logs::Dataplaneb\x06proto3')
|
|
19
19
|
|
|
20
20
|
_globals = globals()
|
|
21
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -31,6 +31,8 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
31
31
|
_TAILTASKEXECUTIONLOGSREQUEST.fields_by_name['logging_context']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
32
32
|
_TAILTASKEXECUTIONLOGSRESPONSE_LOGS.fields_by_name['lines']._options = None
|
|
33
33
|
_TAILTASKEXECUTIONLOGSRESPONSE_LOGS.fields_by_name['lines']._serialized_options = b'\030\001'
|
|
34
|
+
_LOGGINGCONTEXT_KUBERNETESPODLABELSENTRY._options = None
|
|
35
|
+
_LOGGINGCONTEXT_KUBERNETESPODLABELSENTRY._serialized_options = b'8\001'
|
|
34
36
|
_LOGGINGCONTEXT.fields_by_name['cluster_name']._options = None
|
|
35
37
|
_LOGGINGCONTEXT.fields_by_name['cluster_name']._serialized_options = b'\372B\004r\002\020\001'
|
|
36
38
|
_LOGGINGCONTEXT.fields_by_name['kubernetes_namespace']._options = None
|
|
@@ -61,10 +63,10 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
61
63
|
_TAILLOGSRESPONSE.fields_by_name['containers']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
62
64
|
_TAILLOGSRESPONSE.fields_by_name['log_lines_batch']._options = None
|
|
63
65
|
_TAILLOGSRESPONSE.fields_by_name['log_lines_batch']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
64
|
-
_globals['_LOGLINEORIGINATOR']._serialized_start=
|
|
65
|
-
_globals['_LOGLINEORIGINATOR']._serialized_end=
|
|
66
|
-
_globals['_LOGSSOURCE']._serialized_start=
|
|
67
|
-
_globals['_LOGSSOURCE']._serialized_end=
|
|
66
|
+
_globals['_LOGLINEORIGINATOR']._serialized_start=3253
|
|
67
|
+
_globals['_LOGLINEORIGINATOR']._serialized_end=3307
|
|
68
|
+
_globals['_LOGSSOURCE']._serialized_start=3309
|
|
69
|
+
_globals['_LOGSSOURCE']._serialized_end=3379
|
|
68
70
|
_globals['_PODRESOURCE']._serialized_start=115
|
|
69
71
|
_globals['_PODRESOURCE']._serialized_end=226
|
|
70
72
|
_globals['_TAILTASKEXECUTIONLOGSREQUEST']._serialized_start=229
|
|
@@ -74,23 +76,25 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
74
76
|
_globals['_TAILTASKEXECUTIONLOGSRESPONSE_LOGS']._serialized_start=566
|
|
75
77
|
_globals['_TAILTASKEXECUTIONLOGSRESPONSE_LOGS']._serialized_end=675
|
|
76
78
|
_globals['_LOGGINGCONTEXT']._serialized_start=688
|
|
77
|
-
_globals['_LOGGINGCONTEXT']._serialized_end=
|
|
78
|
-
_globals['
|
|
79
|
-
_globals['
|
|
80
|
-
_globals['
|
|
81
|
-
_globals['
|
|
82
|
-
_globals['
|
|
83
|
-
_globals['
|
|
84
|
-
_globals['
|
|
85
|
-
_globals['
|
|
86
|
-
_globals['
|
|
87
|
-
_globals['
|
|
88
|
-
_globals['
|
|
89
|
-
_globals['
|
|
90
|
-
_globals['
|
|
91
|
-
_globals['
|
|
92
|
-
_globals['
|
|
93
|
-
_globals['
|
|
94
|
-
_globals['
|
|
95
|
-
_globals['
|
|
79
|
+
_globals['_LOGGINGCONTEXT']._serialized_end=1318
|
|
80
|
+
_globals['_LOGGINGCONTEXT_KUBERNETESPODLABELSENTRY']._serialized_start=1236
|
|
81
|
+
_globals['_LOGGINGCONTEXT_KUBERNETESPODLABELSENTRY']._serialized_end=1306
|
|
82
|
+
_globals['_CONTAINERIDENTIFIER']._serialized_start=1321
|
|
83
|
+
_globals['_CONTAINERIDENTIFIER']._serialized_end=1563
|
|
84
|
+
_globals['_CONTAINERSELECTOR']._serialized_start=1566
|
|
85
|
+
_globals['_CONTAINERSELECTOR']._serialized_end=1877
|
|
86
|
+
_globals['_LIVELOGSOPTIONS']._serialized_start=1879
|
|
87
|
+
_globals['_LIVELOGSOPTIONS']._serialized_end=1973
|
|
88
|
+
_globals['_TAILLOGSREQUEST']._serialized_start=1976
|
|
89
|
+
_globals['_TAILLOGSREQUEST']._serialized_end=2445
|
|
90
|
+
_globals['_LOGLINE']._serialized_start=2448
|
|
91
|
+
_globals['_LOGLINE']._serialized_end=2617
|
|
92
|
+
_globals['_LOGLINES']._serialized_start=2620
|
|
93
|
+
_globals['_LOGLINES']._serialized_end=2860
|
|
94
|
+
_globals['_LOGCONTAINERSLIST']._serialized_start=2862
|
|
95
|
+
_globals['_LOGCONTAINERSLIST']._serialized_end=2959
|
|
96
|
+
_globals['_LOGLINESBATCH']._serialized_start=2961
|
|
97
|
+
_globals['_LOGLINESBATCH']._serialized_end=3031
|
|
98
|
+
_globals['_TAILLOGSRESPONSE']._serialized_start=3034
|
|
99
|
+
_globals['_TAILLOGSRESPONSE']._serialized_end=3251
|
|
96
100
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -60,20 +60,29 @@ class TailTaskExecutionLogsResponse(_message.Message):
|
|
|
60
60
|
def __init__(self, logs: _Optional[_Union[TailTaskExecutionLogsResponse.Logs, _Mapping]] = ...) -> None: ...
|
|
61
61
|
|
|
62
62
|
class LoggingContext(_message.Message):
|
|
63
|
-
__slots__ = ["cluster_name", "kubernetes_namespace", "kubernetes_pod_name", "kubernetes_container_name", "execution_attempt_start_time", "execution_attempt_end_time"]
|
|
63
|
+
__slots__ = ["cluster_name", "kubernetes_namespace", "kubernetes_pod_name", "kubernetes_container_name", "execution_attempt_start_time", "execution_attempt_end_time", "kubernetes_pod_labels"]
|
|
64
|
+
class KubernetesPodLabelsEntry(_message.Message):
|
|
65
|
+
__slots__ = ["key", "value"]
|
|
66
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
67
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
68
|
+
key: str
|
|
69
|
+
value: str
|
|
70
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
|
|
64
71
|
CLUSTER_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
65
72
|
KUBERNETES_NAMESPACE_FIELD_NUMBER: _ClassVar[int]
|
|
66
73
|
KUBERNETES_POD_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
67
74
|
KUBERNETES_CONTAINER_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
68
75
|
EXECUTION_ATTEMPT_START_TIME_FIELD_NUMBER: _ClassVar[int]
|
|
69
76
|
EXECUTION_ATTEMPT_END_TIME_FIELD_NUMBER: _ClassVar[int]
|
|
77
|
+
KUBERNETES_POD_LABELS_FIELD_NUMBER: _ClassVar[int]
|
|
70
78
|
cluster_name: str
|
|
71
79
|
kubernetes_namespace: str
|
|
72
80
|
kubernetes_pod_name: str
|
|
73
81
|
kubernetes_container_name: str
|
|
74
82
|
execution_attempt_start_time: _timestamp_pb2.Timestamp
|
|
75
83
|
execution_attempt_end_time: _timestamp_pb2.Timestamp
|
|
76
|
-
|
|
84
|
+
kubernetes_pod_labels: _containers.ScalarMap[str, str]
|
|
85
|
+
def __init__(self, cluster_name: _Optional[str] = ..., kubernetes_namespace: _Optional[str] = ..., kubernetes_pod_name: _Optional[str] = ..., kubernetes_container_name: _Optional[str] = ..., execution_attempt_start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., execution_attempt_end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., kubernetes_pod_labels: _Optional[_Mapping[str, str]] = ...) -> None: ...
|
|
77
86
|
|
|
78
87
|
class ContainerIdentifier(_message.Message):
|
|
79
88
|
__slots__ = ["cluster_name", "kubernetes_namespace", "kubernetes_pod_name", "kubernetes_container_name"]
|
|
@@ -17,7 +17,7 @@ from flyte._protos.workflow import run_definition_pb2 as workflow_dot_run__defin
|
|
|
17
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/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\"\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\"
|
|
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
21
|
|
|
22
22
|
_globals = globals()
|
|
23
23
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -25,6 +25,12 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflow.queue_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\021QueueServiceProtoH\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
|
+
_WORKERIDENTIFIER.fields_by_name['organization']._options = None
|
|
29
|
+
_WORKERIDENTIFIER.fields_by_name['organization']._serialized_options = b'\372B\004r\002\020\001'
|
|
30
|
+
_WORKERIDENTIFIER.fields_by_name['cluster']._options = None
|
|
31
|
+
_WORKERIDENTIFIER.fields_by_name['cluster']._serialized_options = b'\372B\004r\002\020\001'
|
|
32
|
+
_WORKERIDENTIFIER.fields_by_name['name']._options = None
|
|
33
|
+
_WORKERIDENTIFIER.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
28
34
|
_ENQUEUEACTIONREQUEST.fields_by_name['action_id']._options = None
|
|
29
35
|
_ENQUEUEACTIONREQUEST.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
30
36
|
_ENQUEUEACTIONREQUEST.fields_by_name['input_uri']._options = None
|
|
@@ -49,22 +55,12 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
49
55
|
_CONDITIONACTION.fields_by_name['run_id']._serialized_options = b'\372B\004r\002\020\001'
|
|
50
56
|
_CONDITIONACTION.fields_by_name['action_id']._options = None
|
|
51
57
|
_CONDITIONACTION.fields_by_name['action_id']._serialized_options = b'\372B\004r\002\020\001'
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
_HEARTBEATREQUEST.oneofs_by_name['filter']._options = None
|
|
55
|
-
_HEARTBEATREQUEST.oneofs_by_name['filter']._serialized_options = b'\370B\001'
|
|
58
|
+
_ABORTQUEUEDRUNREQUEST.fields_by_name['run_id']._options = None
|
|
59
|
+
_ABORTQUEUEDRUNREQUEST.fields_by_name['run_id']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
56
60
|
_HEARTBEATREQUEST.fields_by_name['worker_id']._options = None
|
|
57
|
-
_HEARTBEATREQUEST.fields_by_name['worker_id']._serialized_options = b'\372B\
|
|
58
|
-
_HEARTBEATREQUEST.fields_by_name['cluster_id']._options = None
|
|
59
|
-
_HEARTBEATREQUEST.fields_by_name['cluster_id']._serialized_options = b'\372B\004r\002\020\001'
|
|
60
|
-
_HEARTBEATREQUEST.fields_by_name['organization']._options = None
|
|
61
|
-
_HEARTBEATREQUEST.fields_by_name['organization']._serialized_options = b'\372B\004r\002\020\001'
|
|
62
|
-
_HEARTBEATREQUEST.fields_by_name['org']._options = None
|
|
63
|
-
_HEARTBEATREQUEST.fields_by_name['org']._serialized_options = b'\372B\004r\002\020\001'
|
|
61
|
+
_HEARTBEATREQUEST.fields_by_name['worker_id']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
64
62
|
_STREAMLEASESREQUEST.fields_by_name['worker_id']._options = None
|
|
65
|
-
_STREAMLEASESREQUEST.fields_by_name['worker_id']._serialized_options = b'\372B\
|
|
66
|
-
_STREAMLEASESREQUEST.fields_by_name['org']._options = None
|
|
67
|
-
_STREAMLEASESREQUEST.fields_by_name['org']._serialized_options = b'\372B\004r\002\020\001'
|
|
63
|
+
_STREAMLEASESREQUEST.fields_by_name['worker_id']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
68
64
|
_LEASE.oneofs_by_name['spec']._options = None
|
|
69
65
|
_LEASE.oneofs_by_name['spec']._serialized_options = b'\370B\001'
|
|
70
66
|
_LEASE.fields_by_name['action_id']._options = None
|
|
@@ -77,30 +73,32 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
77
73
|
_LEASE.fields_by_name['task']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
78
74
|
_LEASE.fields_by_name['condition']._options = None
|
|
79
75
|
_LEASE.fields_by_name['condition']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
80
|
-
_globals['
|
|
81
|
-
_globals['
|
|
82
|
-
_globals['
|
|
83
|
-
_globals['
|
|
84
|
-
_globals['
|
|
85
|
-
_globals['
|
|
86
|
-
_globals['
|
|
87
|
-
_globals['
|
|
88
|
-
_globals['
|
|
89
|
-
_globals['
|
|
90
|
-
_globals['
|
|
91
|
-
_globals['
|
|
92
|
-
_globals['
|
|
93
|
-
_globals['
|
|
94
|
-
_globals['
|
|
95
|
-
_globals['
|
|
96
|
-
_globals['
|
|
97
|
-
_globals['
|
|
98
|
-
_globals['
|
|
99
|
-
_globals['
|
|
100
|
-
_globals['
|
|
101
|
-
_globals['
|
|
102
|
-
_globals['
|
|
103
|
-
_globals['
|
|
104
|
-
_globals['
|
|
105
|
-
_globals['
|
|
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
|
|
106
104
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -9,6 +9,16 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map
|
|
|
9
9
|
|
|
10
10
|
DESCRIPTOR: _descriptor.FileDescriptor
|
|
11
11
|
|
|
12
|
+
class WorkerIdentifier(_message.Message):
|
|
13
|
+
__slots__ = ["organization", "cluster", "name"]
|
|
14
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
CLUSTER_FIELD_NUMBER: _ClassVar[int]
|
|
16
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
+
organization: str
|
|
18
|
+
cluster: str
|
|
19
|
+
name: str
|
|
20
|
+
def __init__(self, organization: _Optional[str] = ..., cluster: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
|
|
21
|
+
|
|
12
22
|
class EnqueueActionRequest(_message.Message):
|
|
13
23
|
__slots__ = ["action_id", "parent_action_name", "input_uri", "run_output_base", "group", "subject", "task", "trace", "condition"]
|
|
14
24
|
ACTION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -66,51 +76,45 @@ class EnqueueActionResponse(_message.Message):
|
|
|
66
76
|
__slots__ = []
|
|
67
77
|
def __init__(self) -> None: ...
|
|
68
78
|
|
|
69
|
-
class
|
|
70
|
-
__slots__ = ["
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
def __init__(self,
|
|
79
|
+
class AbortQueuedRunRequest(_message.Message):
|
|
80
|
+
__slots__ = ["run_id"]
|
|
81
|
+
RUN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
+
run_id: _run_definition_pb2.RunIdentifier
|
|
83
|
+
def __init__(self, run_id: _Optional[_Union[_run_definition_pb2.RunIdentifier, _Mapping]] = ...) -> None: ...
|
|
74
84
|
|
|
75
|
-
class
|
|
85
|
+
class AbortQueuedRunResponse(_message.Message):
|
|
76
86
|
__slots__ = []
|
|
77
87
|
def __init__(self) -> None: ...
|
|
78
88
|
|
|
79
89
|
class HeartbeatRequest(_message.Message):
|
|
80
|
-
__slots__ = ["worker_id", "
|
|
90
|
+
__slots__ = ["worker_id", "active_action_ids", "terminal_action_ids", "aborted_action_ids", "available_capacity"]
|
|
81
91
|
WORKER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
-
CLUSTER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
83
92
|
ACTIVE_ACTION_IDS_FIELD_NUMBER: _ClassVar[int]
|
|
84
93
|
TERMINAL_ACTION_IDS_FIELD_NUMBER: _ClassVar[int]
|
|
85
|
-
|
|
94
|
+
ABORTED_ACTION_IDS_FIELD_NUMBER: _ClassVar[int]
|
|
86
95
|
AVAILABLE_CAPACITY_FIELD_NUMBER: _ClassVar[int]
|
|
87
|
-
|
|
88
|
-
worker_id: str
|
|
89
|
-
cluster_id: str
|
|
96
|
+
worker_id: WorkerIdentifier
|
|
90
97
|
active_action_ids: _containers.RepeatedCompositeFieldContainer[_run_definition_pb2.ActionIdentifier]
|
|
91
98
|
terminal_action_ids: _containers.RepeatedCompositeFieldContainer[_run_definition_pb2.ActionIdentifier]
|
|
92
|
-
|
|
99
|
+
aborted_action_ids: _containers.RepeatedCompositeFieldContainer[_run_definition_pb2.ActionIdentifier]
|
|
93
100
|
available_capacity: int
|
|
94
|
-
|
|
95
|
-
def __init__(self, worker_id: _Optional[str] = ..., cluster_id: _Optional[str] = ..., active_action_ids: _Optional[_Iterable[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]]] = ..., terminal_action_ids: _Optional[_Iterable[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]]] = ..., organization: _Optional[str] = ..., available_capacity: _Optional[int] = ..., org: _Optional[str] = ...) -> None: ...
|
|
101
|
+
def __init__(self, worker_id: _Optional[_Union[WorkerIdentifier, _Mapping]] = ..., active_action_ids: _Optional[_Iterable[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]]] = ..., terminal_action_ids: _Optional[_Iterable[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]]] = ..., aborted_action_ids: _Optional[_Iterable[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]]] = ..., available_capacity: _Optional[int] = ...) -> None: ...
|
|
96
102
|
|
|
97
103
|
class HeartbeatResponse(_message.Message):
|
|
98
|
-
__slots__ = ["new_leases", "
|
|
104
|
+
__slots__ = ["new_leases", "aborted_leases", "finalized_action_ids"]
|
|
99
105
|
NEW_LEASES_FIELD_NUMBER: _ClassVar[int]
|
|
100
|
-
|
|
106
|
+
ABORTED_LEASES_FIELD_NUMBER: _ClassVar[int]
|
|
101
107
|
FINALIZED_ACTION_IDS_FIELD_NUMBER: _ClassVar[int]
|
|
102
108
|
new_leases: _containers.RepeatedCompositeFieldContainer[Lease]
|
|
103
|
-
|
|
109
|
+
aborted_leases: _containers.RepeatedCompositeFieldContainer[Lease]
|
|
104
110
|
finalized_action_ids: _containers.RepeatedCompositeFieldContainer[_run_definition_pb2.ActionIdentifier]
|
|
105
|
-
def __init__(self, new_leases: _Optional[_Iterable[_Union[Lease, _Mapping]]] = ...,
|
|
111
|
+
def __init__(self, new_leases: _Optional[_Iterable[_Union[Lease, _Mapping]]] = ..., aborted_leases: _Optional[_Iterable[_Union[Lease, _Mapping]]] = ..., finalized_action_ids: _Optional[_Iterable[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]]] = ...) -> None: ...
|
|
106
112
|
|
|
107
113
|
class StreamLeasesRequest(_message.Message):
|
|
108
|
-
__slots__ = ["worker_id"
|
|
114
|
+
__slots__ = ["worker_id"]
|
|
109
115
|
WORKER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
110
|
-
|
|
111
|
-
worker_id:
|
|
112
|
-
org: str
|
|
113
|
-
def __init__(self, worker_id: _Optional[str] = ..., org: _Optional[str] = ...) -> None: ...
|
|
116
|
+
worker_id: WorkerIdentifier
|
|
117
|
+
def __init__(self, worker_id: _Optional[_Union[WorkerIdentifier, _Mapping]] = ...) -> None: ...
|
|
114
118
|
|
|
115
119
|
class StreamLeasesResponse(_message.Message):
|
|
116
120
|
__slots__ = ["leases"]
|
|
@@ -119,7 +123,7 @@ class StreamLeasesResponse(_message.Message):
|
|
|
119
123
|
def __init__(self, leases: _Optional[_Iterable[_Union[Lease, _Mapping]]] = ...) -> None: ...
|
|
120
124
|
|
|
121
125
|
class Lease(_message.Message):
|
|
122
|
-
__slots__ = ["action_id", "parent_action_name", "input_uri", "run_output_base", "task", "condition", "group", "subject"
|
|
126
|
+
__slots__ = ["action_id", "parent_action_name", "input_uri", "run_output_base", "task", "condition", "group", "subject"]
|
|
123
127
|
ACTION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
124
128
|
PARENT_ACTION_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
125
129
|
INPUT_URI_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -128,7 +132,6 @@ class Lease(_message.Message):
|
|
|
128
132
|
CONDITION_FIELD_NUMBER: _ClassVar[int]
|
|
129
133
|
GROUP_FIELD_NUMBER: _ClassVar[int]
|
|
130
134
|
SUBJECT_FIELD_NUMBER: _ClassVar[int]
|
|
131
|
-
PREVIOUS_STATE_FIELD_NUMBER: _ClassVar[int]
|
|
132
135
|
action_id: _run_definition_pb2.ActionIdentifier
|
|
133
136
|
parent_action_name: str
|
|
134
137
|
input_uri: str
|
|
@@ -137,5 +140,4 @@ class Lease(_message.Message):
|
|
|
137
140
|
condition: ConditionAction
|
|
138
141
|
group: str
|
|
139
142
|
subject: str
|
|
140
|
-
|
|
141
|
-
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] = ..., task: _Optional[_Union[TaskAction, _Mapping]] = ..., condition: _Optional[_Union[ConditionAction, _Mapping]] = ..., group: _Optional[str] = ..., subject: _Optional[str] = ..., previous_state: _Optional[str] = ...) -> None: ...
|
|
143
|
+
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] = ..., task: _Optional[_Union[TaskAction, _Mapping]] = ..., condition: _Optional[_Union[ConditionAction, _Mapping]] = ..., group: _Optional[str] = ..., subject: _Optional[str] = ...) -> None: ...
|
|
@@ -20,10 +20,10 @@ class QueueServiceStub(object):
|
|
|
20
20
|
request_serializer=workflow_dot_queue__service__pb2.EnqueueActionRequest.SerializeToString,
|
|
21
21
|
response_deserializer=workflow_dot_queue__service__pb2.EnqueueActionResponse.FromString,
|
|
22
22
|
)
|
|
23
|
-
self.
|
|
24
|
-
'/cloudidl.workflow.QueueService/
|
|
25
|
-
request_serializer=workflow_dot_queue__service__pb2.
|
|
26
|
-
response_deserializer=workflow_dot_queue__service__pb2.
|
|
23
|
+
self.AbortQueuedRun = channel.unary_unary(
|
|
24
|
+
'/cloudidl.workflow.QueueService/AbortQueuedRun',
|
|
25
|
+
request_serializer=workflow_dot_queue__service__pb2.AbortQueuedRunRequest.SerializeToString,
|
|
26
|
+
response_deserializer=workflow_dot_queue__service__pb2.AbortQueuedRunResponse.FromString,
|
|
27
27
|
)
|
|
28
28
|
self.Heartbeat = channel.stream_stream(
|
|
29
29
|
'/cloudidl.workflow.QueueService/Heartbeat',
|
|
@@ -48,8 +48,8 @@ class QueueServiceServicer(object):
|
|
|
48
48
|
context.set_details('Method not implemented!')
|
|
49
49
|
raise NotImplementedError('Method not implemented!')
|
|
50
50
|
|
|
51
|
-
def
|
|
52
|
-
"""abort a queued
|
|
51
|
+
def AbortQueuedRun(self, request, context):
|
|
52
|
+
"""abort a queued run.
|
|
53
53
|
"""
|
|
54
54
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
55
55
|
context.set_details('Method not implemented!')
|
|
@@ -63,7 +63,7 @@ class QueueServiceServicer(object):
|
|
|
63
63
|
raise NotImplementedError('Method not implemented!')
|
|
64
64
|
|
|
65
65
|
def StreamLeases(self, request, context):
|
|
66
|
-
"""
|
|
66
|
+
"""stream leases for a worker.
|
|
67
67
|
"""
|
|
68
68
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
69
69
|
context.set_details('Method not implemented!')
|
|
@@ -77,10 +77,10 @@ def add_QueueServiceServicer_to_server(servicer, server):
|
|
|
77
77
|
request_deserializer=workflow_dot_queue__service__pb2.EnqueueActionRequest.FromString,
|
|
78
78
|
response_serializer=workflow_dot_queue__service__pb2.EnqueueActionResponse.SerializeToString,
|
|
79
79
|
),
|
|
80
|
-
'
|
|
81
|
-
servicer.
|
|
82
|
-
request_deserializer=workflow_dot_queue__service__pb2.
|
|
83
|
-
response_serializer=workflow_dot_queue__service__pb2.
|
|
80
|
+
'AbortQueuedRun': grpc.unary_unary_rpc_method_handler(
|
|
81
|
+
servicer.AbortQueuedRun,
|
|
82
|
+
request_deserializer=workflow_dot_queue__service__pb2.AbortQueuedRunRequest.FromString,
|
|
83
|
+
response_serializer=workflow_dot_queue__service__pb2.AbortQueuedRunResponse.SerializeToString,
|
|
84
84
|
),
|
|
85
85
|
'Heartbeat': grpc.stream_stream_rpc_method_handler(
|
|
86
86
|
servicer.Heartbeat,
|
|
@@ -121,7 +121,7 @@ class QueueService(object):
|
|
|
121
121
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
122
122
|
|
|
123
123
|
@staticmethod
|
|
124
|
-
def
|
|
124
|
+
def AbortQueuedRun(request,
|
|
125
125
|
target,
|
|
126
126
|
options=(),
|
|
127
127
|
channel_credentials=None,
|
|
@@ -131,9 +131,9 @@ class QueueService(object):
|
|
|
131
131
|
wait_for_ready=None,
|
|
132
132
|
timeout=None,
|
|
133
133
|
metadata=None):
|
|
134
|
-
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.QueueService/
|
|
135
|
-
workflow_dot_queue__service__pb2.
|
|
136
|
-
workflow_dot_queue__service__pb2.
|
|
134
|
+
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.QueueService/AbortQueuedRun',
|
|
135
|
+
workflow_dot_queue__service__pb2.AbortQueuedRunRequest.SerializeToString,
|
|
136
|
+
workflow_dot_queue__service__pb2.AbortQueuedRunResponse.FromString,
|
|
137
137
|
options, channel_credentials,
|
|
138
138
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
139
139
|
|
flyte/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.2.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 2, 0, '
|
|
20
|
+
__version__ = version = '0.2.0b4'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 2, 0, 'b4')
|
flyte/cli/__init__.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
# CLI for Flyte
|
|
3
|
+
|
|
4
|
+
The flyte cli follows a simple verb based structure, where the top-level commands are verbs that describe the action
|
|
5
|
+
to be taken, and the subcommands are nouns that describe the object of the action.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from flyte.cli.main import main
|
|
9
|
+
|
|
10
|
+
__all__ = ["main"]
|
flyte/cli/_abort.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import rich_click as click
|
|
2
|
+
|
|
3
|
+
from flyte.cli import _common as common
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@click.group(name="abort")
|
|
7
|
+
def abort():
|
|
8
|
+
"""
|
|
9
|
+
Abort a run.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@abort.command(cls=common.CommandBase)
|
|
14
|
+
@click.argument("run-name", type=str, required=True)
|
|
15
|
+
@click.pass_obj
|
|
16
|
+
def run(cfg: common.CLIConfig, run_name: str, project: str | None = None, domain: str | None = None):
|
|
17
|
+
"""
|
|
18
|
+
Abort a run.
|
|
19
|
+
"""
|
|
20
|
+
from flyte.remote import Run
|
|
21
|
+
|
|
22
|
+
cfg.init(project=project, domain=domain)
|
|
23
|
+
r = Run.get(name=run_name)
|
|
24
|
+
if r:
|
|
25
|
+
r.abort(r)
|
|
26
|
+
print(f"Run '{run_name}' has been aborted.")
|
flyte/{_cli → cli}/_common.py
RENAMED
|
@@ -132,6 +132,8 @@ class InvokeBaseMixin:
|
|
|
132
132
|
raise click.ClickException(f"RPC error invoking command: {e!s}") from e
|
|
133
133
|
except flyte.errors.InitializationError:
|
|
134
134
|
raise click.ClickException("Initialize the CLI with a remote configuration. For example, pass --endpoint")
|
|
135
|
+
except flyte.errors.BaseRuntimeError as e:
|
|
136
|
+
raise click.ClickException(f"{e.kind} failure, {e.code}. {e}") from e
|
|
135
137
|
except click.exceptions.Exit as e:
|
|
136
138
|
# This is a normal exit, do nothing
|
|
137
139
|
raise e
|
flyte/{_cli → cli}/_create.py
RENAMED
flyte/{_cli → cli}/_delete.py
RENAMED
flyte/{_cli → cli}/_get.py
RENAMED
|
@@ -122,7 +122,10 @@ def action(
|
|
|
122
122
|
default=False,
|
|
123
123
|
help="Show logs in a auto scrolling box, where number of lines is limited to `--lines`",
|
|
124
124
|
)
|
|
125
|
-
@click.option(
|
|
125
|
+
@click.option(
|
|
126
|
+
"--attempt", "-a", type=int, default=None, help="Attempt number to show logs for, defaults to the latest attempt."
|
|
127
|
+
)
|
|
128
|
+
@click.option("--filter-system", is_flag=True, default=False, help="Filter all system logs from the output.")
|
|
126
129
|
@click.pass_obj
|
|
127
130
|
def logs(
|
|
128
131
|
cfg: common.CLIConfig,
|
|
@@ -134,16 +137,22 @@ def logs(
|
|
|
134
137
|
show_ts: bool = False,
|
|
135
138
|
pretty: bool = True,
|
|
136
139
|
attempt: int | None = None,
|
|
140
|
+
filter_system: bool = False,
|
|
137
141
|
):
|
|
138
142
|
"""
|
|
139
|
-
|
|
143
|
+
Stream logs for the provided run or action. If the run is provided, only the logs for the parent action will be
|
|
144
|
+
streamed.
|
|
140
145
|
"""
|
|
141
146
|
import flyte.remote as remote
|
|
142
147
|
|
|
143
148
|
cfg.init(project=project, domain=domain)
|
|
144
149
|
|
|
145
150
|
async def _run_log_view(_obj):
|
|
146
|
-
task = asyncio.create_task(
|
|
151
|
+
task = asyncio.create_task(
|
|
152
|
+
_obj.show_logs(
|
|
153
|
+
max_lines=lines, show_ts=show_ts, raw=not pretty, attempt=attempt, filter_system=filter_system
|
|
154
|
+
)
|
|
155
|
+
)
|
|
147
156
|
try:
|
|
148
157
|
await task
|
|
149
158
|
except KeyboardInterrupt:
|