flyte 2.0.0b21__py3-none-any.whl → 2.0.0b23__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 +5 -0
- flyte/_bin/runtime.py +36 -6
- flyte/_cache/cache.py +4 -2
- flyte/_cache/local_cache.py +215 -0
- flyte/_code_bundle/bundle.py +1 -0
- flyte/_debug/constants.py +0 -1
- flyte/_debug/vscode.py +6 -1
- flyte/_deploy.py +204 -55
- flyte/_environment.py +5 -0
- flyte/_excepthook.py +1 -1
- flyte/_image.py +101 -68
- flyte/_initialize.py +30 -1
- flyte/_interface.py +3 -1
- flyte/_internal/controllers/_local_controller.py +64 -24
- flyte/_internal/controllers/remote/_action.py +4 -1
- flyte/_internal/controllers/remote/_controller.py +5 -2
- flyte/_internal/controllers/remote/_core.py +6 -3
- flyte/_internal/controllers/remote/_informer.py +1 -1
- flyte/_internal/imagebuild/docker_builder.py +95 -28
- flyte/_internal/imagebuild/image_builder.py +0 -5
- flyte/_internal/imagebuild/remote_builder.py +6 -1
- flyte/_internal/runtime/io.py +13 -1
- flyte/_internal/runtime/rusty.py +17 -2
- flyte/_internal/runtime/task_serde.py +15 -11
- flyte/_internal/runtime/taskrunner.py +1 -1
- flyte/_internal/runtime/trigger_serde.py +153 -0
- flyte/_keyring/file.py +2 -2
- flyte/_logging.py +1 -1
- flyte/_protos/common/identifier_pb2.py +19 -1
- flyte/_protos/common/identifier_pb2.pyi +22 -0
- flyte/_protos/workflow/common_pb2.py +14 -3
- flyte/_protos/workflow/common_pb2.pyi +49 -0
- flyte/_protos/workflow/queue_service_pb2.py +41 -35
- flyte/_protos/workflow/queue_service_pb2.pyi +26 -12
- flyte/_protos/workflow/queue_service_pb2_grpc.py +34 -0
- flyte/_protos/workflow/run_definition_pb2.py +38 -38
- flyte/_protos/workflow/run_definition_pb2.pyi +4 -2
- flyte/_protos/workflow/run_service_pb2.py +60 -50
- flyte/_protos/workflow/run_service_pb2.pyi +24 -6
- flyte/_protos/workflow/run_service_pb2_grpc.py +34 -0
- flyte/_protos/workflow/task_definition_pb2.py +15 -11
- flyte/_protos/workflow/task_definition_pb2.pyi +19 -2
- flyte/_protos/workflow/task_service_pb2.py +18 -17
- flyte/_protos/workflow/task_service_pb2.pyi +5 -2
- flyte/_protos/workflow/trigger_definition_pb2.py +66 -0
- flyte/_protos/workflow/trigger_definition_pb2.pyi +117 -0
- flyte/_protos/workflow/trigger_definition_pb2_grpc.py +4 -0
- flyte/_protos/workflow/trigger_service_pb2.py +96 -0
- flyte/_protos/workflow/trigger_service_pb2.pyi +110 -0
- flyte/_protos/workflow/trigger_service_pb2_grpc.py +281 -0
- flyte/_run.py +42 -15
- flyte/_task.py +35 -4
- flyte/_task_environment.py +61 -16
- flyte/_trigger.py +382 -0
- flyte/_version.py +3 -3
- flyte/cli/_abort.py +3 -3
- flyte/cli/_build.py +1 -3
- flyte/cli/_common.py +17 -4
- flyte/cli/_create.py +74 -0
- flyte/cli/_delete.py +23 -1
- flyte/cli/_deploy.py +16 -10
- flyte/cli/_get.py +75 -34
- flyte/cli/_params.py +4 -2
- flyte/cli/_run.py +25 -6
- flyte/cli/_update.py +36 -0
- flyte/cli/_user.py +17 -0
- flyte/cli/main.py +9 -1
- flyte/errors.py +9 -0
- flyte/io/_dir.py +513 -115
- flyte/io/_file.py +495 -135
- flyte/models.py +32 -0
- flyte/remote/__init__.py +6 -1
- flyte/remote/_action.py +9 -8
- flyte/remote/_client/_protocols.py +36 -2
- flyte/remote/_client/controlplane.py +19 -3
- flyte/remote/_run.py +42 -2
- flyte/remote/_task.py +14 -1
- flyte/remote/_trigger.py +308 -0
- flyte/remote/_user.py +33 -0
- flyte/storage/__init__.py +6 -1
- flyte/storage/_storage.py +119 -101
- flyte/types/_pickle.py +34 -7
- flyte/types/_type_engine.py +6 -0
- {flyte-2.0.0b21.data → flyte-2.0.0b23.data}/scripts/runtime.py +36 -6
- {flyte-2.0.0b21.dist-info → flyte-2.0.0b23.dist-info}/METADATA +3 -1
- {flyte-2.0.0b21.dist-info → flyte-2.0.0b23.dist-info}/RECORD +91 -79
- flyte/_protos/secret/secret_pb2_grpc_grpc.py +0 -198
- {flyte-2.0.0b21.data → flyte-2.0.0b23.data}/scripts/debug.py +0 -0
- {flyte-2.0.0b21.dist-info → flyte-2.0.0b23.dist-info}/WHEEL +0 -0
- {flyte-2.0.0b21.dist-info → flyte-2.0.0b23.dist-info}/entry_points.txt +0 -0
- {flyte-2.0.0b21.dist-info → flyte-2.0.0b23.dist-info}/licenses/LICENSE +0 -0
- {flyte-2.0.0b21.dist-info → flyte-2.0.0b23.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
from flyte._protos.common import identifier_pb2 as _identifier_pb2
|
|
2
|
+
from flyte._protos.common import identity_pb2 as _identity_pb2
|
|
3
|
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
|
4
|
+
from flyte._protos.validate.validate import validate_pb2 as _validate_pb2
|
|
5
|
+
from flyte._protos.workflow import common_pb2 as _common_pb2
|
|
6
|
+
from flyte._protos.workflow import run_definition_pb2 as _run_definition_pb2
|
|
7
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
8
|
+
from google.protobuf import descriptor as _descriptor
|
|
9
|
+
from google.protobuf import message as _message
|
|
10
|
+
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
11
|
+
|
|
12
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
13
|
+
|
|
14
|
+
class TriggerRevisionAction(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
15
|
+
__slots__ = []
|
|
16
|
+
TRIGGER_REVISION_ACTION_UNSPECIFIED: _ClassVar[TriggerRevisionAction]
|
|
17
|
+
TRIGGER_REVISION_ACTION_DEPLOY: _ClassVar[TriggerRevisionAction]
|
|
18
|
+
TRIGGER_REVISION_ACTION_ACTIVATE: _ClassVar[TriggerRevisionAction]
|
|
19
|
+
TRIGGER_REVISION_ACTION_DEACTIVATE: _ClassVar[TriggerRevisionAction]
|
|
20
|
+
TRIGGER_REVISION_ACTION_DELETE: _ClassVar[TriggerRevisionAction]
|
|
21
|
+
TRIGGER_REVISION_ACTION_UNSPECIFIED: TriggerRevisionAction
|
|
22
|
+
TRIGGER_REVISION_ACTION_DEPLOY: TriggerRevisionAction
|
|
23
|
+
TRIGGER_REVISION_ACTION_ACTIVATE: TriggerRevisionAction
|
|
24
|
+
TRIGGER_REVISION_ACTION_DEACTIVATE: TriggerRevisionAction
|
|
25
|
+
TRIGGER_REVISION_ACTION_DELETE: TriggerRevisionAction
|
|
26
|
+
|
|
27
|
+
class TriggerMetadata(_message.Message):
|
|
28
|
+
__slots__ = ["deployed_by", "updated_by"]
|
|
29
|
+
DEPLOYED_BY_FIELD_NUMBER: _ClassVar[int]
|
|
30
|
+
UPDATED_BY_FIELD_NUMBER: _ClassVar[int]
|
|
31
|
+
deployed_by: _identity_pb2.EnrichedIdentity
|
|
32
|
+
updated_by: _identity_pb2.EnrichedIdentity
|
|
33
|
+
def __init__(self, deployed_by: _Optional[_Union[_identity_pb2.EnrichedIdentity, _Mapping]] = ..., updated_by: _Optional[_Union[_identity_pb2.EnrichedIdentity, _Mapping]] = ...) -> None: ...
|
|
34
|
+
|
|
35
|
+
class TriggerSpec(_message.Message):
|
|
36
|
+
__slots__ = ["inputs", "run_spec", "active", "task_version"]
|
|
37
|
+
INPUTS_FIELD_NUMBER: _ClassVar[int]
|
|
38
|
+
RUN_SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
ACTIVE_FIELD_NUMBER: _ClassVar[int]
|
|
40
|
+
TASK_VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
41
|
+
inputs: _run_definition_pb2.Inputs
|
|
42
|
+
run_spec: _run_definition_pb2.RunSpec
|
|
43
|
+
active: bool
|
|
44
|
+
task_version: str
|
|
45
|
+
def __init__(self, inputs: _Optional[_Union[_run_definition_pb2.Inputs, _Mapping]] = ..., run_spec: _Optional[_Union[_run_definition_pb2.RunSpec, _Mapping]] = ..., active: bool = ..., task_version: _Optional[str] = ...) -> None: ...
|
|
46
|
+
|
|
47
|
+
class TriggerStatus(_message.Message):
|
|
48
|
+
__slots__ = ["deployed_at", "updated_at", "triggered_at", "deleted_at"]
|
|
49
|
+
DEPLOYED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
50
|
+
UPDATED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
TRIGGERED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
52
|
+
DELETED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
53
|
+
deployed_at: _timestamp_pb2.Timestamp
|
|
54
|
+
updated_at: _timestamp_pb2.Timestamp
|
|
55
|
+
triggered_at: _timestamp_pb2.Timestamp
|
|
56
|
+
deleted_at: _timestamp_pb2.Timestamp
|
|
57
|
+
def __init__(self, deployed_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., triggered_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., deleted_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
|
|
58
|
+
|
|
59
|
+
class Trigger(_message.Message):
|
|
60
|
+
__slots__ = ["id", "metadata", "status", "active", "automation_spec"]
|
|
61
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
62
|
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
|
63
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
64
|
+
ACTIVE_FIELD_NUMBER: _ClassVar[int]
|
|
65
|
+
AUTOMATION_SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
66
|
+
id: _identifier_pb2.TriggerIdentifier
|
|
67
|
+
metadata: TriggerMetadata
|
|
68
|
+
status: TriggerStatus
|
|
69
|
+
active: bool
|
|
70
|
+
automation_spec: _common_pb2.TriggerAutomationSpec
|
|
71
|
+
def __init__(self, id: _Optional[_Union[_identifier_pb2.TriggerIdentifier, _Mapping]] = ..., metadata: _Optional[_Union[TriggerMetadata, _Mapping]] = ..., status: _Optional[_Union[TriggerStatus, _Mapping]] = ..., active: bool = ..., automation_spec: _Optional[_Union[_common_pb2.TriggerAutomationSpec, _Mapping]] = ...) -> None: ...
|
|
72
|
+
|
|
73
|
+
class TriggerRevision(_message.Message):
|
|
74
|
+
__slots__ = ["id", "metadata", "status", "action"]
|
|
75
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
76
|
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
|
77
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
78
|
+
ACTION_FIELD_NUMBER: _ClassVar[int]
|
|
79
|
+
id: _identifier_pb2.TriggerIdentifier
|
|
80
|
+
metadata: TriggerMetadata
|
|
81
|
+
status: TriggerStatus
|
|
82
|
+
action: TriggerRevisionAction
|
|
83
|
+
def __init__(self, id: _Optional[_Union[_identifier_pb2.TriggerIdentifier, _Mapping]] = ..., metadata: _Optional[_Union[TriggerMetadata, _Mapping]] = ..., status: _Optional[_Union[TriggerStatus, _Mapping]] = ..., action: _Optional[_Union[TriggerRevisionAction, str]] = ...) -> None: ...
|
|
84
|
+
|
|
85
|
+
class TriggerDetails(_message.Message):
|
|
86
|
+
__slots__ = ["id", "metadata", "spec", "status", "automation_spec"]
|
|
87
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
88
|
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
|
89
|
+
SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
90
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
91
|
+
AUTOMATION_SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
92
|
+
id: _identifier_pb2.TriggerIdentifier
|
|
93
|
+
metadata: TriggerMetadata
|
|
94
|
+
spec: TriggerSpec
|
|
95
|
+
status: TriggerStatus
|
|
96
|
+
automation_spec: _common_pb2.TriggerAutomationSpec
|
|
97
|
+
def __init__(self, id: _Optional[_Union[_identifier_pb2.TriggerIdentifier, _Mapping]] = ..., metadata: _Optional[_Union[TriggerMetadata, _Mapping]] = ..., spec: _Optional[_Union[TriggerSpec, _Mapping]] = ..., status: _Optional[_Union[TriggerStatus, _Mapping]] = ..., automation_spec: _Optional[_Union[_common_pb2.TriggerAutomationSpec, _Mapping]] = ...) -> None: ...
|
|
98
|
+
|
|
99
|
+
class TaskTrigger(_message.Message):
|
|
100
|
+
__slots__ = ["name", "spec", "automation_spec"]
|
|
101
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
102
|
+
SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
103
|
+
AUTOMATION_SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
104
|
+
name: str
|
|
105
|
+
spec: TaskTriggerSpec
|
|
106
|
+
automation_spec: _common_pb2.TriggerAutomationSpec
|
|
107
|
+
def __init__(self, name: _Optional[str] = ..., spec: _Optional[_Union[TaskTriggerSpec, _Mapping]] = ..., automation_spec: _Optional[_Union[_common_pb2.TriggerAutomationSpec, _Mapping]] = ...) -> None: ...
|
|
108
|
+
|
|
109
|
+
class TaskTriggerSpec(_message.Message):
|
|
110
|
+
__slots__ = ["active", "inputs", "run_spec"]
|
|
111
|
+
ACTIVE_FIELD_NUMBER: _ClassVar[int]
|
|
112
|
+
INPUTS_FIELD_NUMBER: _ClassVar[int]
|
|
113
|
+
RUN_SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
114
|
+
active: bool
|
|
115
|
+
inputs: _run_definition_pb2.Inputs
|
|
116
|
+
run_spec: _run_definition_pb2.RunSpec
|
|
117
|
+
def __init__(self, active: bool = ..., inputs: _Optional[_Union[_run_definition_pb2.Inputs, _Mapping]] = ..., run_spec: _Optional[_Union[_run_definition_pb2.RunSpec, _Mapping]] = ...) -> None: ...
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: workflow/trigger_service.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from flyte._protos.common import identifier_pb2 as common_dot_identifier__pb2
|
|
15
|
+
from flyte._protos.common import list_pb2 as common_dot_list__pb2
|
|
16
|
+
from flyte._protos.validate.validate import validate_pb2 as validate_dot_validate__pb2
|
|
17
|
+
from flyte._protos.workflow import common_pb2 as workflow_dot_common__pb2
|
|
18
|
+
from flyte._protos.workflow import task_definition_pb2 as workflow_dot_task__definition__pb2
|
|
19
|
+
from flyte._protos.workflow import trigger_definition_pb2 as workflow_dot_trigger__definition__pb2
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eworkflow/trigger_service.proto\x12\x11\x63loudidl.workflow\x1a\x17\x63ommon/identifier.proto\x1a\x11\x63ommon/list.proto\x1a\x17validate/validate.proto\x1a\x15workflow/common.proto\x1a\x1eworkflow/task_definition.proto\x1a!workflow/trigger_definition.proto\"\xe5\x01\n\x14\x44\x65ployTriggerRequest\x12<\n\x02id\x18\x01 \x01(\x0b\x32\".cloudidl.common.TriggerIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x02id\x12<\n\x04spec\x18\x02 \x01(\x0b\x32\x1e.cloudidl.workflow.TriggerSpecB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x04spec\x12Q\n\x0f\x61utomation_spec\x18\x03 \x01(\x0b\x32(.cloudidl.workflow.TriggerAutomationSpecR\x0e\x61utomationSpec\"^\n\x15\x44\x65ployTriggerResponse\x12\x45\n\x07trigger\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TriggerDetailsB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07trigger\"V\n\x18GetTriggerDetailsRequest\x12:\n\x04name\x18\x01 \x01(\x0b\x32\x1c.cloudidl.common.TriggerNameB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x04name\"b\n\x19GetTriggerDetailsResponse\x12\x45\n\x07trigger\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TriggerDetailsB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07trigger\"`\n GetTriggerRevisionDetailsRequest\x12<\n\x02id\x18\x01 \x01(\x0b\x32\".cloudidl.common.TriggerIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x02id\"j\n!GetTriggerRevisionDetailsResponse\x12\x45\n\x07trigger\x18\x01 \x01(\x0b\x32!.cloudidl.workflow.TriggerDetailsB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07trigger\"\x92\x02\n\x13ListTriggersRequest\x12\x36\n\x07request\x18\x01 \x01(\x0b\x32\x1c.cloudidl.common.ListRequestR\x07request\x12\x1b\n\x03org\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01H\x00R\x03org\x12M\n\nproject_id\x18\x03 \x01(\x0b\x32\".cloudidl.common.ProjectIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\tprojectId\x12\x46\n\x07task_id\x18\x04 \x01(\x0b\x32!.cloudidl.workflow.TaskIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x06taskIdB\x0f\n\x08scope_by\x12\x03\xf8\x42\x01\"d\n\x14ListTriggersResponse\x12\x36\n\x08triggers\x18\x01 \x03(\x0b\x32\x1a.cloudidl.workflow.TriggerR\x08triggers\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"\x96\x01\n GetTriggerRevisionHistoryRequest\x12\x36\n\x07request\x18\x01 \x01(\x0b\x32\x1c.cloudidl.common.ListRequestR\x07request\x12:\n\x04name\x18\x02 \x01(\x0b\x32\x1c.cloudidl.common.TriggerNameB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x04name\"y\n!GetTriggerRevisionHistoryResponse\x12>\n\x08triggers\x18\x01 \x03(\x0b\x32\".cloudidl.workflow.TriggerRevisionR\x08triggers\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\"o\n\x15UpdateTriggersRequest\x12>\n\x05names\x18\x01 \x03(\x0b\x32\x1c.cloudidl.common.TriggerNameB\n\xfa\x42\x07\x92\x01\x04\x08\x01\x10\x64R\x05names\x12\x16\n\x06\x61\x63tive\x18\x02 \x01(\x08R\x06\x61\x63tive\"\x18\n\x16UpdateTriggersResponse\"W\n\x15\x44\x65leteTriggersRequest\x12>\n\x05names\x18\x01 \x03(\x0b\x32\x1c.cloudidl.common.TriggerNameB\n\xfa\x42\x07\x92\x01\x04\x08\x01\x10\x64R\x05names\"\x18\n\x16\x44\x65leteTriggersResponse2\xbf\x06\n\x0eTriggerService\x12\x64\n\rDeployTrigger\x12\'.cloudidl.workflow.DeployTriggerRequest\x1a(.cloudidl.workflow.DeployTriggerResponse\"\x00\x12s\n\x11GetTriggerDetails\x12+.cloudidl.workflow.GetTriggerDetailsRequest\x1a,.cloudidl.workflow.GetTriggerDetailsResponse\"\x03\x90\x02\x01\x12\x8b\x01\n\x19GetTriggerRevisionDetails\x12\x33.cloudidl.workflow.GetTriggerRevisionDetailsRequest\x1a\x34.cloudidl.workflow.GetTriggerRevisionDetailsResponse\"\x03\x90\x02\x01\x12\x64\n\x0cListTriggers\x12&.cloudidl.workflow.ListTriggersRequest\x1a\'.cloudidl.workflow.ListTriggersResponse\"\x03\x90\x02\x01\x12\x8b\x01\n\x19GetTriggerRevisionHistory\x12\x33.cloudidl.workflow.GetTriggerRevisionHistoryRequest\x1a\x34.cloudidl.workflow.GetTriggerRevisionHistoryResponse\"\x03\x90\x02\x01\x12g\n\x0eUpdateTriggers\x12(.cloudidl.workflow.UpdateTriggersRequest\x1a).cloudidl.workflow.UpdateTriggersResponse\"\x00\x12g\n\x0e\x44\x65leteTriggers\x12(.cloudidl.workflow.DeleteTriggersRequest\x1a).cloudidl.workflow.DeleteTriggersResponse\"\x00\x42\xc0\x01\n\x15\x63om.cloudidl.workflowB\x13TriggerServiceProtoH\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')
|
|
23
|
+
|
|
24
|
+
_globals = globals()
|
|
25
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
26
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflow.trigger_service_pb2', _globals)
|
|
27
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
28
|
+
DESCRIPTOR._options = None
|
|
29
|
+
DESCRIPTOR._serialized_options = b'\n\025com.cloudidl.workflowB\023TriggerServiceProtoH\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'
|
|
30
|
+
_DEPLOYTRIGGERREQUEST.fields_by_name['id']._options = None
|
|
31
|
+
_DEPLOYTRIGGERREQUEST.fields_by_name['id']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
32
|
+
_DEPLOYTRIGGERREQUEST.fields_by_name['spec']._options = None
|
|
33
|
+
_DEPLOYTRIGGERREQUEST.fields_by_name['spec']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
34
|
+
_DEPLOYTRIGGERRESPONSE.fields_by_name['trigger']._options = None
|
|
35
|
+
_DEPLOYTRIGGERRESPONSE.fields_by_name['trigger']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
36
|
+
_GETTRIGGERDETAILSREQUEST.fields_by_name['name']._options = None
|
|
37
|
+
_GETTRIGGERDETAILSREQUEST.fields_by_name['name']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
38
|
+
_GETTRIGGERDETAILSRESPONSE.fields_by_name['trigger']._options = None
|
|
39
|
+
_GETTRIGGERDETAILSRESPONSE.fields_by_name['trigger']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
40
|
+
_GETTRIGGERREVISIONDETAILSREQUEST.fields_by_name['id']._options = None
|
|
41
|
+
_GETTRIGGERREVISIONDETAILSREQUEST.fields_by_name['id']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
42
|
+
_GETTRIGGERREVISIONDETAILSRESPONSE.fields_by_name['trigger']._options = None
|
|
43
|
+
_GETTRIGGERREVISIONDETAILSRESPONSE.fields_by_name['trigger']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
44
|
+
_LISTTRIGGERSREQUEST.oneofs_by_name['scope_by']._options = None
|
|
45
|
+
_LISTTRIGGERSREQUEST.oneofs_by_name['scope_by']._serialized_options = b'\370B\001'
|
|
46
|
+
_LISTTRIGGERSREQUEST.fields_by_name['org']._options = None
|
|
47
|
+
_LISTTRIGGERSREQUEST.fields_by_name['org']._serialized_options = b'\372B\004r\002\020\001'
|
|
48
|
+
_LISTTRIGGERSREQUEST.fields_by_name['project_id']._options = None
|
|
49
|
+
_LISTTRIGGERSREQUEST.fields_by_name['project_id']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
50
|
+
_LISTTRIGGERSREQUEST.fields_by_name['task_id']._options = None
|
|
51
|
+
_LISTTRIGGERSREQUEST.fields_by_name['task_id']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
52
|
+
_GETTRIGGERREVISIONHISTORYREQUEST.fields_by_name['name']._options = None
|
|
53
|
+
_GETTRIGGERREVISIONHISTORYREQUEST.fields_by_name['name']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
54
|
+
_UPDATETRIGGERSREQUEST.fields_by_name['names']._options = None
|
|
55
|
+
_UPDATETRIGGERSREQUEST.fields_by_name['names']._serialized_options = b'\372B\007\222\001\004\010\001\020d'
|
|
56
|
+
_DELETETRIGGERSREQUEST.fields_by_name['names']._options = None
|
|
57
|
+
_DELETETRIGGERSREQUEST.fields_by_name['names']._serialized_options = b'\372B\007\222\001\004\010\001\020d'
|
|
58
|
+
_TRIGGERSERVICE.methods_by_name['GetTriggerDetails']._options = None
|
|
59
|
+
_TRIGGERSERVICE.methods_by_name['GetTriggerDetails']._serialized_options = b'\220\002\001'
|
|
60
|
+
_TRIGGERSERVICE.methods_by_name['GetTriggerRevisionDetails']._options = None
|
|
61
|
+
_TRIGGERSERVICE.methods_by_name['GetTriggerRevisionDetails']._serialized_options = b'\220\002\001'
|
|
62
|
+
_TRIGGERSERVICE.methods_by_name['ListTriggers']._options = None
|
|
63
|
+
_TRIGGERSERVICE.methods_by_name['ListTriggers']._serialized_options = b'\220\002\001'
|
|
64
|
+
_TRIGGERSERVICE.methods_by_name['GetTriggerRevisionHistory']._options = None
|
|
65
|
+
_TRIGGERSERVICE.methods_by_name['GetTriggerRevisionHistory']._serialized_options = b'\220\002\001'
|
|
66
|
+
_globals['_DEPLOYTRIGGERREQUEST']._serialized_start=213
|
|
67
|
+
_globals['_DEPLOYTRIGGERREQUEST']._serialized_end=442
|
|
68
|
+
_globals['_DEPLOYTRIGGERRESPONSE']._serialized_start=444
|
|
69
|
+
_globals['_DEPLOYTRIGGERRESPONSE']._serialized_end=538
|
|
70
|
+
_globals['_GETTRIGGERDETAILSREQUEST']._serialized_start=540
|
|
71
|
+
_globals['_GETTRIGGERDETAILSREQUEST']._serialized_end=626
|
|
72
|
+
_globals['_GETTRIGGERDETAILSRESPONSE']._serialized_start=628
|
|
73
|
+
_globals['_GETTRIGGERDETAILSRESPONSE']._serialized_end=726
|
|
74
|
+
_globals['_GETTRIGGERREVISIONDETAILSREQUEST']._serialized_start=728
|
|
75
|
+
_globals['_GETTRIGGERREVISIONDETAILSREQUEST']._serialized_end=824
|
|
76
|
+
_globals['_GETTRIGGERREVISIONDETAILSRESPONSE']._serialized_start=826
|
|
77
|
+
_globals['_GETTRIGGERREVISIONDETAILSRESPONSE']._serialized_end=932
|
|
78
|
+
_globals['_LISTTRIGGERSREQUEST']._serialized_start=935
|
|
79
|
+
_globals['_LISTTRIGGERSREQUEST']._serialized_end=1209
|
|
80
|
+
_globals['_LISTTRIGGERSRESPONSE']._serialized_start=1211
|
|
81
|
+
_globals['_LISTTRIGGERSRESPONSE']._serialized_end=1311
|
|
82
|
+
_globals['_GETTRIGGERREVISIONHISTORYREQUEST']._serialized_start=1314
|
|
83
|
+
_globals['_GETTRIGGERREVISIONHISTORYREQUEST']._serialized_end=1464
|
|
84
|
+
_globals['_GETTRIGGERREVISIONHISTORYRESPONSE']._serialized_start=1466
|
|
85
|
+
_globals['_GETTRIGGERREVISIONHISTORYRESPONSE']._serialized_end=1587
|
|
86
|
+
_globals['_UPDATETRIGGERSREQUEST']._serialized_start=1589
|
|
87
|
+
_globals['_UPDATETRIGGERSREQUEST']._serialized_end=1700
|
|
88
|
+
_globals['_UPDATETRIGGERSRESPONSE']._serialized_start=1702
|
|
89
|
+
_globals['_UPDATETRIGGERSRESPONSE']._serialized_end=1726
|
|
90
|
+
_globals['_DELETETRIGGERSREQUEST']._serialized_start=1728
|
|
91
|
+
_globals['_DELETETRIGGERSREQUEST']._serialized_end=1815
|
|
92
|
+
_globals['_DELETETRIGGERSRESPONSE']._serialized_start=1817
|
|
93
|
+
_globals['_DELETETRIGGERSRESPONSE']._serialized_end=1841
|
|
94
|
+
_globals['_TRIGGERSERVICE']._serialized_start=1844
|
|
95
|
+
_globals['_TRIGGERSERVICE']._serialized_end=2675
|
|
96
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
from flyte._protos.common import identifier_pb2 as _identifier_pb2
|
|
2
|
+
from flyte._protos.common import list_pb2 as _list_pb2
|
|
3
|
+
from flyte._protos.validate.validate import validate_pb2 as _validate_pb2
|
|
4
|
+
from flyte._protos.workflow import common_pb2 as _common_pb2
|
|
5
|
+
from flyte._protos.workflow import task_definition_pb2 as _task_definition_pb2
|
|
6
|
+
from flyte._protos.workflow import trigger_definition_pb2 as _trigger_definition_pb2
|
|
7
|
+
from google.protobuf.internal import containers as _containers
|
|
8
|
+
from google.protobuf import descriptor as _descriptor
|
|
9
|
+
from google.protobuf import message as _message
|
|
10
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
11
|
+
|
|
12
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
13
|
+
|
|
14
|
+
class DeployTriggerRequest(_message.Message):
|
|
15
|
+
__slots__ = ["id", "spec", "automation_spec"]
|
|
16
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
+
SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
18
|
+
AUTOMATION_SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
id: _identifier_pb2.TriggerIdentifier
|
|
20
|
+
spec: _trigger_definition_pb2.TriggerSpec
|
|
21
|
+
automation_spec: _common_pb2.TriggerAutomationSpec
|
|
22
|
+
def __init__(self, id: _Optional[_Union[_identifier_pb2.TriggerIdentifier, _Mapping]] = ..., spec: _Optional[_Union[_trigger_definition_pb2.TriggerSpec, _Mapping]] = ..., automation_spec: _Optional[_Union[_common_pb2.TriggerAutomationSpec, _Mapping]] = ...) -> None: ...
|
|
23
|
+
|
|
24
|
+
class DeployTriggerResponse(_message.Message):
|
|
25
|
+
__slots__ = ["trigger"]
|
|
26
|
+
TRIGGER_FIELD_NUMBER: _ClassVar[int]
|
|
27
|
+
trigger: _trigger_definition_pb2.TriggerDetails
|
|
28
|
+
def __init__(self, trigger: _Optional[_Union[_trigger_definition_pb2.TriggerDetails, _Mapping]] = ...) -> None: ...
|
|
29
|
+
|
|
30
|
+
class GetTriggerDetailsRequest(_message.Message):
|
|
31
|
+
__slots__ = ["name"]
|
|
32
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
33
|
+
name: _identifier_pb2.TriggerName
|
|
34
|
+
def __init__(self, name: _Optional[_Union[_identifier_pb2.TriggerName, _Mapping]] = ...) -> None: ...
|
|
35
|
+
|
|
36
|
+
class GetTriggerDetailsResponse(_message.Message):
|
|
37
|
+
__slots__ = ["trigger"]
|
|
38
|
+
TRIGGER_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
trigger: _trigger_definition_pb2.TriggerDetails
|
|
40
|
+
def __init__(self, trigger: _Optional[_Union[_trigger_definition_pb2.TriggerDetails, _Mapping]] = ...) -> None: ...
|
|
41
|
+
|
|
42
|
+
class GetTriggerRevisionDetailsRequest(_message.Message):
|
|
43
|
+
__slots__ = ["id"]
|
|
44
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
id: _identifier_pb2.TriggerIdentifier
|
|
46
|
+
def __init__(self, id: _Optional[_Union[_identifier_pb2.TriggerIdentifier, _Mapping]] = ...) -> None: ...
|
|
47
|
+
|
|
48
|
+
class GetTriggerRevisionDetailsResponse(_message.Message):
|
|
49
|
+
__slots__ = ["trigger"]
|
|
50
|
+
TRIGGER_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
trigger: _trigger_definition_pb2.TriggerDetails
|
|
52
|
+
def __init__(self, trigger: _Optional[_Union[_trigger_definition_pb2.TriggerDetails, _Mapping]] = ...) -> None: ...
|
|
53
|
+
|
|
54
|
+
class ListTriggersRequest(_message.Message):
|
|
55
|
+
__slots__ = ["request", "org", "project_id", "task_id"]
|
|
56
|
+
REQUEST_FIELD_NUMBER: _ClassVar[int]
|
|
57
|
+
ORG_FIELD_NUMBER: _ClassVar[int]
|
|
58
|
+
PROJECT_ID_FIELD_NUMBER: _ClassVar[int]
|
|
59
|
+
TASK_ID_FIELD_NUMBER: _ClassVar[int]
|
|
60
|
+
request: _list_pb2.ListRequest
|
|
61
|
+
org: str
|
|
62
|
+
project_id: _identifier_pb2.ProjectIdentifier
|
|
63
|
+
task_id: _task_definition_pb2.TaskIdentifier
|
|
64
|
+
def __init__(self, request: _Optional[_Union[_list_pb2.ListRequest, _Mapping]] = ..., org: _Optional[str] = ..., project_id: _Optional[_Union[_identifier_pb2.ProjectIdentifier, _Mapping]] = ..., task_id: _Optional[_Union[_task_definition_pb2.TaskIdentifier, _Mapping]] = ...) -> None: ...
|
|
65
|
+
|
|
66
|
+
class ListTriggersResponse(_message.Message):
|
|
67
|
+
__slots__ = ["triggers", "token"]
|
|
68
|
+
TRIGGERS_FIELD_NUMBER: _ClassVar[int]
|
|
69
|
+
TOKEN_FIELD_NUMBER: _ClassVar[int]
|
|
70
|
+
triggers: _containers.RepeatedCompositeFieldContainer[_trigger_definition_pb2.Trigger]
|
|
71
|
+
token: str
|
|
72
|
+
def __init__(self, triggers: _Optional[_Iterable[_Union[_trigger_definition_pb2.Trigger, _Mapping]]] = ..., token: _Optional[str] = ...) -> None: ...
|
|
73
|
+
|
|
74
|
+
class GetTriggerRevisionHistoryRequest(_message.Message):
|
|
75
|
+
__slots__ = ["request", "name"]
|
|
76
|
+
REQUEST_FIELD_NUMBER: _ClassVar[int]
|
|
77
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
78
|
+
request: _list_pb2.ListRequest
|
|
79
|
+
name: _identifier_pb2.TriggerName
|
|
80
|
+
def __init__(self, request: _Optional[_Union[_list_pb2.ListRequest, _Mapping]] = ..., name: _Optional[_Union[_identifier_pb2.TriggerName, _Mapping]] = ...) -> None: ...
|
|
81
|
+
|
|
82
|
+
class GetTriggerRevisionHistoryResponse(_message.Message):
|
|
83
|
+
__slots__ = ["triggers", "token"]
|
|
84
|
+
TRIGGERS_FIELD_NUMBER: _ClassVar[int]
|
|
85
|
+
TOKEN_FIELD_NUMBER: _ClassVar[int]
|
|
86
|
+
triggers: _containers.RepeatedCompositeFieldContainer[_trigger_definition_pb2.TriggerRevision]
|
|
87
|
+
token: str
|
|
88
|
+
def __init__(self, triggers: _Optional[_Iterable[_Union[_trigger_definition_pb2.TriggerRevision, _Mapping]]] = ..., token: _Optional[str] = ...) -> None: ...
|
|
89
|
+
|
|
90
|
+
class UpdateTriggersRequest(_message.Message):
|
|
91
|
+
__slots__ = ["names", "active"]
|
|
92
|
+
NAMES_FIELD_NUMBER: _ClassVar[int]
|
|
93
|
+
ACTIVE_FIELD_NUMBER: _ClassVar[int]
|
|
94
|
+
names: _containers.RepeatedCompositeFieldContainer[_identifier_pb2.TriggerName]
|
|
95
|
+
active: bool
|
|
96
|
+
def __init__(self, names: _Optional[_Iterable[_Union[_identifier_pb2.TriggerName, _Mapping]]] = ..., active: bool = ...) -> None: ...
|
|
97
|
+
|
|
98
|
+
class UpdateTriggersResponse(_message.Message):
|
|
99
|
+
__slots__ = []
|
|
100
|
+
def __init__(self) -> None: ...
|
|
101
|
+
|
|
102
|
+
class DeleteTriggersRequest(_message.Message):
|
|
103
|
+
__slots__ = ["names"]
|
|
104
|
+
NAMES_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
+
names: _containers.RepeatedCompositeFieldContainer[_identifier_pb2.TriggerName]
|
|
106
|
+
def __init__(self, names: _Optional[_Iterable[_Union[_identifier_pb2.TriggerName, _Mapping]]] = ...) -> None: ...
|
|
107
|
+
|
|
108
|
+
class DeleteTriggersResponse(_message.Message):
|
|
109
|
+
__slots__ = []
|
|
110
|
+
def __init__(self) -> None: ...
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from flyte._protos.workflow import trigger_service_pb2 as workflow_dot_trigger__service__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TriggerServiceStub(object):
|
|
9
|
+
"""TriggerService provides an interface for managing triggers.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, channel):
|
|
13
|
+
"""Constructor.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
channel: A grpc.Channel.
|
|
17
|
+
"""
|
|
18
|
+
self.DeployTrigger = channel.unary_unary(
|
|
19
|
+
'/cloudidl.workflow.TriggerService/DeployTrigger',
|
|
20
|
+
request_serializer=workflow_dot_trigger__service__pb2.DeployTriggerRequest.SerializeToString,
|
|
21
|
+
response_deserializer=workflow_dot_trigger__service__pb2.DeployTriggerResponse.FromString,
|
|
22
|
+
)
|
|
23
|
+
self.GetTriggerDetails = channel.unary_unary(
|
|
24
|
+
'/cloudidl.workflow.TriggerService/GetTriggerDetails',
|
|
25
|
+
request_serializer=workflow_dot_trigger__service__pb2.GetTriggerDetailsRequest.SerializeToString,
|
|
26
|
+
response_deserializer=workflow_dot_trigger__service__pb2.GetTriggerDetailsResponse.FromString,
|
|
27
|
+
)
|
|
28
|
+
self.GetTriggerRevisionDetails = channel.unary_unary(
|
|
29
|
+
'/cloudidl.workflow.TriggerService/GetTriggerRevisionDetails',
|
|
30
|
+
request_serializer=workflow_dot_trigger__service__pb2.GetTriggerRevisionDetailsRequest.SerializeToString,
|
|
31
|
+
response_deserializer=workflow_dot_trigger__service__pb2.GetTriggerRevisionDetailsResponse.FromString,
|
|
32
|
+
)
|
|
33
|
+
self.ListTriggers = channel.unary_unary(
|
|
34
|
+
'/cloudidl.workflow.TriggerService/ListTriggers',
|
|
35
|
+
request_serializer=workflow_dot_trigger__service__pb2.ListTriggersRequest.SerializeToString,
|
|
36
|
+
response_deserializer=workflow_dot_trigger__service__pb2.ListTriggersResponse.FromString,
|
|
37
|
+
)
|
|
38
|
+
self.GetTriggerRevisionHistory = channel.unary_unary(
|
|
39
|
+
'/cloudidl.workflow.TriggerService/GetTriggerRevisionHistory',
|
|
40
|
+
request_serializer=workflow_dot_trigger__service__pb2.GetTriggerRevisionHistoryRequest.SerializeToString,
|
|
41
|
+
response_deserializer=workflow_dot_trigger__service__pb2.GetTriggerRevisionHistoryResponse.FromString,
|
|
42
|
+
)
|
|
43
|
+
self.UpdateTriggers = channel.unary_unary(
|
|
44
|
+
'/cloudidl.workflow.TriggerService/UpdateTriggers',
|
|
45
|
+
request_serializer=workflow_dot_trigger__service__pb2.UpdateTriggersRequest.SerializeToString,
|
|
46
|
+
response_deserializer=workflow_dot_trigger__service__pb2.UpdateTriggersResponse.FromString,
|
|
47
|
+
)
|
|
48
|
+
self.DeleteTriggers = channel.unary_unary(
|
|
49
|
+
'/cloudidl.workflow.TriggerService/DeleteTriggers',
|
|
50
|
+
request_serializer=workflow_dot_trigger__service__pb2.DeleteTriggersRequest.SerializeToString,
|
|
51
|
+
response_deserializer=workflow_dot_trigger__service__pb2.DeleteTriggersResponse.FromString,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class TriggerServiceServicer(object):
|
|
56
|
+
"""TriggerService provides an interface for managing triggers.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
def DeployTrigger(self, request, context):
|
|
60
|
+
"""Create if trigger didn't exist previously.
|
|
61
|
+
Update if it already exists.
|
|
62
|
+
Re-create(or undelete) if it was soft-deleted.
|
|
63
|
+
Client must fetch the latest trigger in order to obtain the latest `trigger.id.revision`.
|
|
64
|
+
If trigger is not found, client can set `trigger.id.revision` to 1, it is ignored and set automatically by backend.
|
|
65
|
+
If trigger is found, client should set `trigger.id.revision` to the <latest>.
|
|
66
|
+
Backend validates that version is the latest and creates a new revision of the trigger.
|
|
67
|
+
Otherwise, operation is rejected(optimistic locking) and client must re-fetch trigger again.
|
|
68
|
+
"""
|
|
69
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
70
|
+
context.set_details('Method not implemented!')
|
|
71
|
+
raise NotImplementedError('Method not implemented!')
|
|
72
|
+
|
|
73
|
+
def GetTriggerDetails(self, request, context):
|
|
74
|
+
"""Get detailed info about the latest trigger revision
|
|
75
|
+
"""
|
|
76
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
77
|
+
context.set_details('Method not implemented!')
|
|
78
|
+
raise NotImplementedError('Method not implemented!')
|
|
79
|
+
|
|
80
|
+
def GetTriggerRevisionDetails(self, request, context):
|
|
81
|
+
"""Get detailed info about a specific trigger revision
|
|
82
|
+
"""
|
|
83
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
84
|
+
context.set_details('Method not implemented!')
|
|
85
|
+
raise NotImplementedError('Method not implemented!')
|
|
86
|
+
|
|
87
|
+
def ListTriggers(self, request, context):
|
|
88
|
+
"""List basic info about triggers based on various filtering and sorting rules.
|
|
89
|
+
"""
|
|
90
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
91
|
+
context.set_details('Method not implemented!')
|
|
92
|
+
raise NotImplementedError('Method not implemented!')
|
|
93
|
+
|
|
94
|
+
def GetTriggerRevisionHistory(self, request, context):
|
|
95
|
+
"""GetTriggerRevisionHistory returns all revisions for a given trigger
|
|
96
|
+
"""
|
|
97
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
98
|
+
context.set_details('Method not implemented!')
|
|
99
|
+
raise NotImplementedError('Method not implemented!')
|
|
100
|
+
|
|
101
|
+
def UpdateTriggers(self, request, context):
|
|
102
|
+
"""Update some trigger spec fields for multiple triggers at once
|
|
103
|
+
"""
|
|
104
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
105
|
+
context.set_details('Method not implemented!')
|
|
106
|
+
raise NotImplementedError('Method not implemented!')
|
|
107
|
+
|
|
108
|
+
def DeleteTriggers(self, request, context):
|
|
109
|
+
"""Soft-delete multiple triggers at once.
|
|
110
|
+
"""
|
|
111
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
112
|
+
context.set_details('Method not implemented!')
|
|
113
|
+
raise NotImplementedError('Method not implemented!')
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def add_TriggerServiceServicer_to_server(servicer, server):
|
|
117
|
+
rpc_method_handlers = {
|
|
118
|
+
'DeployTrigger': grpc.unary_unary_rpc_method_handler(
|
|
119
|
+
servicer.DeployTrigger,
|
|
120
|
+
request_deserializer=workflow_dot_trigger__service__pb2.DeployTriggerRequest.FromString,
|
|
121
|
+
response_serializer=workflow_dot_trigger__service__pb2.DeployTriggerResponse.SerializeToString,
|
|
122
|
+
),
|
|
123
|
+
'GetTriggerDetails': grpc.unary_unary_rpc_method_handler(
|
|
124
|
+
servicer.GetTriggerDetails,
|
|
125
|
+
request_deserializer=workflow_dot_trigger__service__pb2.GetTriggerDetailsRequest.FromString,
|
|
126
|
+
response_serializer=workflow_dot_trigger__service__pb2.GetTriggerDetailsResponse.SerializeToString,
|
|
127
|
+
),
|
|
128
|
+
'GetTriggerRevisionDetails': grpc.unary_unary_rpc_method_handler(
|
|
129
|
+
servicer.GetTriggerRevisionDetails,
|
|
130
|
+
request_deserializer=workflow_dot_trigger__service__pb2.GetTriggerRevisionDetailsRequest.FromString,
|
|
131
|
+
response_serializer=workflow_dot_trigger__service__pb2.GetTriggerRevisionDetailsResponse.SerializeToString,
|
|
132
|
+
),
|
|
133
|
+
'ListTriggers': grpc.unary_unary_rpc_method_handler(
|
|
134
|
+
servicer.ListTriggers,
|
|
135
|
+
request_deserializer=workflow_dot_trigger__service__pb2.ListTriggersRequest.FromString,
|
|
136
|
+
response_serializer=workflow_dot_trigger__service__pb2.ListTriggersResponse.SerializeToString,
|
|
137
|
+
),
|
|
138
|
+
'GetTriggerRevisionHistory': grpc.unary_unary_rpc_method_handler(
|
|
139
|
+
servicer.GetTriggerRevisionHistory,
|
|
140
|
+
request_deserializer=workflow_dot_trigger__service__pb2.GetTriggerRevisionHistoryRequest.FromString,
|
|
141
|
+
response_serializer=workflow_dot_trigger__service__pb2.GetTriggerRevisionHistoryResponse.SerializeToString,
|
|
142
|
+
),
|
|
143
|
+
'UpdateTriggers': grpc.unary_unary_rpc_method_handler(
|
|
144
|
+
servicer.UpdateTriggers,
|
|
145
|
+
request_deserializer=workflow_dot_trigger__service__pb2.UpdateTriggersRequest.FromString,
|
|
146
|
+
response_serializer=workflow_dot_trigger__service__pb2.UpdateTriggersResponse.SerializeToString,
|
|
147
|
+
),
|
|
148
|
+
'DeleteTriggers': grpc.unary_unary_rpc_method_handler(
|
|
149
|
+
servicer.DeleteTriggers,
|
|
150
|
+
request_deserializer=workflow_dot_trigger__service__pb2.DeleteTriggersRequest.FromString,
|
|
151
|
+
response_serializer=workflow_dot_trigger__service__pb2.DeleteTriggersResponse.SerializeToString,
|
|
152
|
+
),
|
|
153
|
+
}
|
|
154
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
155
|
+
'cloudidl.workflow.TriggerService', rpc_method_handlers)
|
|
156
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
# This class is part of an EXPERIMENTAL API.
|
|
160
|
+
class TriggerService(object):
|
|
161
|
+
"""TriggerService provides an interface for managing triggers.
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
@staticmethod
|
|
165
|
+
def DeployTrigger(request,
|
|
166
|
+
target,
|
|
167
|
+
options=(),
|
|
168
|
+
channel_credentials=None,
|
|
169
|
+
call_credentials=None,
|
|
170
|
+
insecure=False,
|
|
171
|
+
compression=None,
|
|
172
|
+
wait_for_ready=None,
|
|
173
|
+
timeout=None,
|
|
174
|
+
metadata=None):
|
|
175
|
+
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.TriggerService/DeployTrigger',
|
|
176
|
+
workflow_dot_trigger__service__pb2.DeployTriggerRequest.SerializeToString,
|
|
177
|
+
workflow_dot_trigger__service__pb2.DeployTriggerResponse.FromString,
|
|
178
|
+
options, channel_credentials,
|
|
179
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
180
|
+
|
|
181
|
+
@staticmethod
|
|
182
|
+
def GetTriggerDetails(request,
|
|
183
|
+
target,
|
|
184
|
+
options=(),
|
|
185
|
+
channel_credentials=None,
|
|
186
|
+
call_credentials=None,
|
|
187
|
+
insecure=False,
|
|
188
|
+
compression=None,
|
|
189
|
+
wait_for_ready=None,
|
|
190
|
+
timeout=None,
|
|
191
|
+
metadata=None):
|
|
192
|
+
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.TriggerService/GetTriggerDetails',
|
|
193
|
+
workflow_dot_trigger__service__pb2.GetTriggerDetailsRequest.SerializeToString,
|
|
194
|
+
workflow_dot_trigger__service__pb2.GetTriggerDetailsResponse.FromString,
|
|
195
|
+
options, channel_credentials,
|
|
196
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
197
|
+
|
|
198
|
+
@staticmethod
|
|
199
|
+
def GetTriggerRevisionDetails(request,
|
|
200
|
+
target,
|
|
201
|
+
options=(),
|
|
202
|
+
channel_credentials=None,
|
|
203
|
+
call_credentials=None,
|
|
204
|
+
insecure=False,
|
|
205
|
+
compression=None,
|
|
206
|
+
wait_for_ready=None,
|
|
207
|
+
timeout=None,
|
|
208
|
+
metadata=None):
|
|
209
|
+
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.TriggerService/GetTriggerRevisionDetails',
|
|
210
|
+
workflow_dot_trigger__service__pb2.GetTriggerRevisionDetailsRequest.SerializeToString,
|
|
211
|
+
workflow_dot_trigger__service__pb2.GetTriggerRevisionDetailsResponse.FromString,
|
|
212
|
+
options, channel_credentials,
|
|
213
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
214
|
+
|
|
215
|
+
@staticmethod
|
|
216
|
+
def ListTriggers(request,
|
|
217
|
+
target,
|
|
218
|
+
options=(),
|
|
219
|
+
channel_credentials=None,
|
|
220
|
+
call_credentials=None,
|
|
221
|
+
insecure=False,
|
|
222
|
+
compression=None,
|
|
223
|
+
wait_for_ready=None,
|
|
224
|
+
timeout=None,
|
|
225
|
+
metadata=None):
|
|
226
|
+
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.TriggerService/ListTriggers',
|
|
227
|
+
workflow_dot_trigger__service__pb2.ListTriggersRequest.SerializeToString,
|
|
228
|
+
workflow_dot_trigger__service__pb2.ListTriggersResponse.FromString,
|
|
229
|
+
options, channel_credentials,
|
|
230
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
231
|
+
|
|
232
|
+
@staticmethod
|
|
233
|
+
def GetTriggerRevisionHistory(request,
|
|
234
|
+
target,
|
|
235
|
+
options=(),
|
|
236
|
+
channel_credentials=None,
|
|
237
|
+
call_credentials=None,
|
|
238
|
+
insecure=False,
|
|
239
|
+
compression=None,
|
|
240
|
+
wait_for_ready=None,
|
|
241
|
+
timeout=None,
|
|
242
|
+
metadata=None):
|
|
243
|
+
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.TriggerService/GetTriggerRevisionHistory',
|
|
244
|
+
workflow_dot_trigger__service__pb2.GetTriggerRevisionHistoryRequest.SerializeToString,
|
|
245
|
+
workflow_dot_trigger__service__pb2.GetTriggerRevisionHistoryResponse.FromString,
|
|
246
|
+
options, channel_credentials,
|
|
247
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
248
|
+
|
|
249
|
+
@staticmethod
|
|
250
|
+
def UpdateTriggers(request,
|
|
251
|
+
target,
|
|
252
|
+
options=(),
|
|
253
|
+
channel_credentials=None,
|
|
254
|
+
call_credentials=None,
|
|
255
|
+
insecure=False,
|
|
256
|
+
compression=None,
|
|
257
|
+
wait_for_ready=None,
|
|
258
|
+
timeout=None,
|
|
259
|
+
metadata=None):
|
|
260
|
+
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.TriggerService/UpdateTriggers',
|
|
261
|
+
workflow_dot_trigger__service__pb2.UpdateTriggersRequest.SerializeToString,
|
|
262
|
+
workflow_dot_trigger__service__pb2.UpdateTriggersResponse.FromString,
|
|
263
|
+
options, channel_credentials,
|
|
264
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
265
|
+
|
|
266
|
+
@staticmethod
|
|
267
|
+
def DeleteTriggers(request,
|
|
268
|
+
target,
|
|
269
|
+
options=(),
|
|
270
|
+
channel_credentials=None,
|
|
271
|
+
call_credentials=None,
|
|
272
|
+
insecure=False,
|
|
273
|
+
compression=None,
|
|
274
|
+
wait_for_ready=None,
|
|
275
|
+
timeout=None,
|
|
276
|
+
metadata=None):
|
|
277
|
+
return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.TriggerService/DeleteTriggers',
|
|
278
|
+
workflow_dot_trigger__service__pb2.DeleteTriggersRequest.SerializeToString,
|
|
279
|
+
workflow_dot_trigger__service__pb2.DeleteTriggersResponse.FromString,
|
|
280
|
+
options, channel_credentials,
|
|
281
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|