tilebox-workflows 0.64.0__tar.gz → 0.65.0__tar.gz
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.
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/PKG-INFO +1 -1
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/automations/client.py +0 -8
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/automations/service.py +1 -16
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/automations/storage_event.py +1 -1
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/client.py +7 -1
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/data.py +149 -49
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/runner/executor.py +1 -1
- tilebox_workflows-0.65.0/tilebox/workflows/storage_locations/__init__.py +35 -0
- tilebox_workflows-0.65.0/tilebox/workflows/storage_locations/client.py +38 -0
- tilebox_workflows-0.65.0/tilebox/workflows/storage_locations/data.py +60 -0
- tilebox_workflows-0.65.0/tilebox/workflows/storage_locations/service.py +46 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/automation_pb2.py +2 -2
- tilebox_workflows-0.65.0/tilebox/workflows/workflows/v1/storage_location_pb2.py +114 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/storage_location_pb2.pyi +17 -13
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/workflows_connect.py +65 -0
- tilebox_workflows-0.65.0/tilebox/workflows/workflows/v1/workflows_pb2.py +115 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/workflows_pb2.pyi +23 -4
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/workflows_pb2_grpc.py +43 -0
- tilebox_workflows-0.64.0/tilebox/workflows/workflows/v1/storage_location_pb2.py +0 -114
- tilebox_workflows-0.64.0/tilebox/workflows/workflows/v1/workflows_pb2.py +0 -102
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/.gitignore +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/README.md +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/pyproject.toml +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/__init__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_codec.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_codecs/__init__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_codecs/affine.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_codecs/async_geotiff.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_codecs/odc.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_codecs/pyproj.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_codecs/rasterio.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_codecs/shapely.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_codecs/tilebox.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/_serialization.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/automations/__init__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/automations/cron.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/cache.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/clusters/__init__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/clusters/client.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/clusters/service.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/formatting/__init__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/formatting/job.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/jobs/__init__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/jobs/client.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/jobs/service.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/jobs/telemetry_service.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/observability/__init__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/observability/_log_stream.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/observability/_logging.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/observability/logging.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/observability/tracing.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/runner/__init__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/runner/__main__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/runner/runner.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/runner/task_runner.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/runner/task_service.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/runner/worker_server.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/runner/worker_service.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/task.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/__init__.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/client.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/service.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/automation_connect.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/automation_pb2.pyi +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/automation_pb2_grpc.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/core_pb2.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/core_pb2.pyi +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/core_pb2_grpc.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/diagram_connect.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/diagram_pb2.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/diagram_pb2.pyi +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/diagram_pb2_grpc.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/job_connect.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/job_pb2.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/job_pb2.pyi +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/job_pb2_grpc.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/storage_location_connect.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/storage_location_pb2_grpc.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/task_connect.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/task_pb2.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/task_pb2.pyi +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/task_pb2_grpc.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/task_release_pb2.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/task_release_pb2.pyi +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/task_release_pb2_grpc.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/telemetry_connect.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/telemetry_pb2.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/telemetry_pb2.pyi +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/telemetry_pb2_grpc.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/worker_connect.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/worker_pb2.py +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/worker_pb2.pyi +0 -0
- {tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/workflows/v1/worker_pb2_grpc.py +0 -0
{tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/automations/client.py
RENAMED
|
@@ -18,14 +18,6 @@ class AutomationClient:
|
|
|
18
18
|
def __init__(self, service: AutomationService) -> None:
|
|
19
19
|
self._service = service
|
|
20
20
|
|
|
21
|
-
def storage_locations(self) -> list[StorageLocation]:
|
|
22
|
-
"""List all available storage locations that can potentially be used as storage event triggers.
|
|
23
|
-
|
|
24
|
-
Returns:
|
|
25
|
-
A list of all available storage locations.
|
|
26
|
-
"""
|
|
27
|
-
return self._service.list_storage_locations()
|
|
28
|
-
|
|
29
21
|
def all(self) -> list[AutomationPrototype]:
|
|
30
22
|
"""List all registered automations.
|
|
31
23
|
|
{tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/automations/service.py
RENAMED
|
@@ -9,39 +9,24 @@ from _tilebox.grpc.error import with_pythonic_errors
|
|
|
9
9
|
from tilebox.datasets.uuid import uuid_to_uuid_message
|
|
10
10
|
from tilebox.workflows.data import (
|
|
11
11
|
AutomationPrototype,
|
|
12
|
-
StorageLocation,
|
|
13
12
|
)
|
|
14
13
|
from tilebox.workflows.workflows.v1.automation_pb2 import AutomationPrototype as AutomationPrototypeMessage
|
|
15
14
|
from tilebox.workflows.workflows.v1.automation_pb2 import Automations, DeleteAutomationRequest
|
|
16
15
|
from tilebox.workflows.workflows.v1.automation_pb2_grpc import AutomationServiceStub
|
|
17
|
-
from tilebox.workflows.workflows.v1.storage_location_pb2 import StorageLocations
|
|
18
|
-
from tilebox.workflows.workflows.v1.storage_location_pb2_grpc import StorageLocationServiceStub
|
|
19
16
|
|
|
20
17
|
|
|
21
18
|
class AutomationService:
|
|
22
|
-
def __init__(self, channel: Channel | Any
|
|
19
|
+
def __init__(self, channel: Channel | Any) -> None:
|
|
23
20
|
"""
|
|
24
21
|
A wrapper around the AutomationServiceStub that provides a more pythonic interface and converts the protobuf
|
|
25
22
|
messages to and from the data classes used in the rest of the tilebox-workflows codebase.
|
|
26
23
|
|
|
27
24
|
Args:
|
|
28
25
|
channel: The gRPC channel to use for the service.
|
|
29
|
-
storage_channel: Optional separate storage-location client for the Connect transport.
|
|
30
26
|
"""
|
|
31
27
|
self.service = (
|
|
32
28
|
with_pythonic_errors(AutomationServiceStub(channel)) if hasattr(channel, "unary_unary") else channel
|
|
33
29
|
)
|
|
34
|
-
if storage_channel is None:
|
|
35
|
-
storage_channel = channel
|
|
36
|
-
self.storage_service = (
|
|
37
|
-
with_pythonic_errors(StorageLocationServiceStub(storage_channel))
|
|
38
|
-
if hasattr(storage_channel, "unary_unary")
|
|
39
|
-
else storage_channel
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
def list_storage_locations(self) -> builtins.list[StorageLocation]:
|
|
43
|
-
response: StorageLocations = self.storage_service.ListStorageLocations(Empty())
|
|
44
|
-
return [StorageLocation.from_message(sl) for sl in response.locations]
|
|
45
30
|
|
|
46
31
|
def list(self) -> builtins.list[AutomationPrototype]:
|
|
47
32
|
response: Automations = self.service.ListAutomations(Empty())
|
{tilebox_workflows-0.64.0 → tilebox_workflows-0.65.0}/tilebox/workflows/automations/storage_event.py
RENAMED
|
@@ -13,7 +13,7 @@ from tilebox.workflows.workflows.v1.automation_pb2 import Automation as Automati
|
|
|
13
13
|
from tilebox.workflows.workflows.v1.storage_location_pb2 import TriggeredStorageEvent as TriggeredStorageEventMessage
|
|
14
14
|
|
|
15
15
|
_NOT_TRIGGERED = TriggeredStorageEvent(
|
|
16
|
-
StorageLocation(UUID(int=0), "", StorageType.
|
|
16
|
+
StorageLocation(UUID(int=0), "", StorageType.LOCAL),
|
|
17
17
|
StorageEventType.CREATED,
|
|
18
18
|
"",
|
|
19
19
|
)
|
|
@@ -23,6 +23,8 @@ from tilebox.workflows.observability.tracing import WorkflowTracer
|
|
|
23
23
|
from tilebox.workflows.runner.executor import LazyStorageLocations
|
|
24
24
|
from tilebox.workflows.runner.task_runner import TaskRunner, _LeaseRenewer
|
|
25
25
|
from tilebox.workflows.runner.task_service import TaskService
|
|
26
|
+
from tilebox.workflows.storage_locations.client import StorageLocationClient
|
|
27
|
+
from tilebox.workflows.storage_locations.service import StorageLocationService
|
|
26
28
|
from tilebox.workflows.task import Task
|
|
27
29
|
from tilebox.workflows.workflows.client import WorkflowClient
|
|
28
30
|
from tilebox.workflows.workflows.service import WorkflowService
|
|
@@ -207,7 +209,11 @@ class Client:
|
|
|
207
209
|
Returns:
|
|
208
210
|
A client for the automations service.
|
|
209
211
|
"""
|
|
210
|
-
return AutomationClient(AutomationService(self._automation_service
|
|
212
|
+
return AutomationClient(AutomationService(self._automation_service))
|
|
213
|
+
|
|
214
|
+
def storage_locations(self) -> StorageLocationClient:
|
|
215
|
+
"""Get a client for storage locations."""
|
|
216
|
+
return StorageLocationClient(StorageLocationService(self._storage_location_service))
|
|
211
217
|
|
|
212
218
|
|
|
213
219
|
def _token_from_env(url: str, token: str | None) -> str | None:
|
|
@@ -969,13 +969,67 @@ class QueryJobSpansResponse:
|
|
|
969
969
|
|
|
970
970
|
|
|
971
971
|
class StorageType(Enum):
|
|
972
|
-
GCS = storage_pb.
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
972
|
+
GCS = storage_pb.STORAGE_TYPE_GCS # Google Cloud Storage
|
|
973
|
+
AWS_S3 = storage_pb.STORAGE_TYPE_AWS_S3 # Amazon Web Services S3
|
|
974
|
+
LOCAL = storage_pb.STORAGE_TYPE_LOCAL # Local Filesystem
|
|
975
|
+
AZURE_BLOB = storage_pb.STORAGE_TYPE_AZURE_BLOB # Azure Blob Storage
|
|
976
976
|
|
|
977
977
|
|
|
978
|
-
|
|
978
|
+
@dataclass(frozen=True)
|
|
979
|
+
class AWSS3BucketReference:
|
|
980
|
+
bucket: str
|
|
981
|
+
region: str = ""
|
|
982
|
+
|
|
983
|
+
def to_message(self) -> storage_pb.StorageLocationReference:
|
|
984
|
+
return storage_pb.StorageLocationReference(
|
|
985
|
+
type=storage_pb.STORAGE_TYPE_AWS_S3,
|
|
986
|
+
aws_s3_bucket=storage_pb.AWSS3BucketReference(bucket=self.bucket, region=self.region),
|
|
987
|
+
)
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
@dataclass(frozen=True)
|
|
991
|
+
class GCSBucketReference:
|
|
992
|
+
bucket: str
|
|
993
|
+
project_id: str = ""
|
|
994
|
+
location: str = ""
|
|
995
|
+
|
|
996
|
+
def to_message(self) -> storage_pb.StorageLocationReference:
|
|
997
|
+
return storage_pb.StorageLocationReference(
|
|
998
|
+
type=storage_pb.STORAGE_TYPE_GCS,
|
|
999
|
+
gcs_bucket=storage_pb.GCSBucketReference(
|
|
1000
|
+
bucket=self.bucket, project_id=self.project_id, location=self.location
|
|
1001
|
+
),
|
|
1002
|
+
)
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
@dataclass(frozen=True)
|
|
1006
|
+
class AzureBlobReference:
|
|
1007
|
+
storage_account_resource_id: str
|
|
1008
|
+
container: str
|
|
1009
|
+
region: str = ""
|
|
1010
|
+
|
|
1011
|
+
def to_message(self) -> storage_pb.StorageLocationReference:
|
|
1012
|
+
return storage_pb.StorageLocationReference(
|
|
1013
|
+
type=storage_pb.STORAGE_TYPE_AZURE_BLOB,
|
|
1014
|
+
azure_blob=storage_pb.AzureBlobReference(
|
|
1015
|
+
storage_account_resource_id=self.storage_account_resource_id,
|
|
1016
|
+
container=self.container,
|
|
1017
|
+
region=self.region,
|
|
1018
|
+
),
|
|
1019
|
+
)
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
@dataclass(frozen=True)
|
|
1023
|
+
class LocalReference:
|
|
1024
|
+
path: str
|
|
1025
|
+
|
|
1026
|
+
def to_message(self) -> storage_pb.StorageLocationReference:
|
|
1027
|
+
return storage_pb.StorageLocationReference(
|
|
1028
|
+
type=storage_pb.STORAGE_TYPE_LOCAL, local=storage_pb.LocalReference(path=self.path)
|
|
1029
|
+
)
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
StorageLocationReference: TypeAlias = AWSS3BucketReference | GCSBucketReference | AzureBlobReference | LocalReference
|
|
979
1033
|
|
|
980
1034
|
|
|
981
1035
|
@total_ordering
|
|
@@ -985,53 +1039,81 @@ class StorageLocation:
|
|
|
985
1039
|
location: str
|
|
986
1040
|
type: StorageType
|
|
987
1041
|
runner_context: "RunnerContext | None" = None
|
|
1042
|
+
name: str = field(default="", kw_only=True)
|
|
988
1043
|
|
|
989
1044
|
def __lt__(self, other: object) -> bool:
|
|
990
1045
|
if not isinstance(other, StorageLocation):
|
|
991
1046
|
return NotImplemented
|
|
992
1047
|
return (self.id, self.location, self.type.value) < (other.id, other.location, other.type.value)
|
|
993
1048
|
|
|
1049
|
+
def __str__(self) -> str:
|
|
1050
|
+
match self.type:
|
|
1051
|
+
case StorageType.AWS_S3:
|
|
1052
|
+
return f"s3://{self.location}"
|
|
1053
|
+
case StorageType.GCS:
|
|
1054
|
+
return f"gs://{self.location}"
|
|
1055
|
+
case StorageType.LOCAL:
|
|
1056
|
+
return self.location
|
|
1057
|
+
case _:
|
|
1058
|
+
return self.type.name.lower().replace("_", "-")
|
|
1059
|
+
|
|
994
1060
|
@classmethod
|
|
995
1061
|
def from_message(cls, storage_location: storage_pb.StorageLocation) -> "StorageLocation":
|
|
996
1062
|
"""Convert a StorageLocation protobuf message to a StorageLocation object."""
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1063
|
+
reference = storage_location.reference
|
|
1064
|
+
match reference.type:
|
|
1065
|
+
case storage_pb.STORAGE_TYPE_AZURE_BLOB:
|
|
1066
|
+
return AzureBlobStorageLocation(
|
|
1067
|
+
id=uuid_message_to_uuid(storage_location.id),
|
|
1068
|
+
name=storage_location.name,
|
|
1069
|
+
location=reference.azure_blob.container,
|
|
1070
|
+
type=StorageType.AZURE_BLOB,
|
|
1071
|
+
storage_account_resource_id=reference.azure_blob.storage_account_resource_id,
|
|
1072
|
+
region=reference.azure_blob.region,
|
|
1073
|
+
)
|
|
1074
|
+
case storage_pb.STORAGE_TYPE_GCS:
|
|
1075
|
+
return GCSStorageLocation(
|
|
1076
|
+
id=uuid_message_to_uuid(storage_location.id),
|
|
1077
|
+
name=storage_location.name,
|
|
1078
|
+
location=reference.gcs_bucket.bucket,
|
|
1079
|
+
type=StorageType.GCS,
|
|
1080
|
+
project_id=reference.gcs_bucket.project_id,
|
|
1081
|
+
bucket_location=reference.gcs_bucket.location,
|
|
1082
|
+
)
|
|
1083
|
+
case storage_pb.STORAGE_TYPE_AWS_S3:
|
|
1084
|
+
return AWSS3StorageLocation(
|
|
1085
|
+
id=uuid_message_to_uuid(storage_location.id),
|
|
1086
|
+
name=storage_location.name,
|
|
1087
|
+
location=reference.aws_s3_bucket.bucket,
|
|
1088
|
+
type=StorageType.AWS_S3,
|
|
1089
|
+
region=reference.aws_s3_bucket.region or None,
|
|
1090
|
+
)
|
|
1091
|
+
case storage_pb.STORAGE_TYPE_LOCAL:
|
|
1092
|
+
return cls(
|
|
1093
|
+
id=uuid_message_to_uuid(storage_location.id),
|
|
1094
|
+
name=storage_location.name,
|
|
1095
|
+
location=reference.local.path,
|
|
1096
|
+
type=StorageType.LOCAL,
|
|
1097
|
+
)
|
|
1098
|
+
case _:
|
|
1099
|
+
raise ValueError(f"Unsupported storage reference type: {reference.type}")
|
|
1026
1100
|
|
|
1027
1101
|
def _with_runner_context(self, runner_context: "RunnerContext") -> "StorageLocation":
|
|
1028
1102
|
return replace(self, runner_context=runner_context)
|
|
1029
1103
|
|
|
1030
1104
|
def to_message(self) -> storage_pb.StorageLocation:
|
|
1031
1105
|
"""Convert a StorageLocation object to a StorageLocation protobuf message."""
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1106
|
+
reference = storage_pb.StorageLocationReference(type=self.type.value)
|
|
1107
|
+
match self.type:
|
|
1108
|
+
case StorageType.AWS_S3:
|
|
1109
|
+
reference.aws_s3_bucket.bucket = self.location
|
|
1110
|
+
case StorageType.GCS:
|
|
1111
|
+
reference.gcs_bucket.bucket = self.location
|
|
1112
|
+
case StorageType.AZURE_BLOB:
|
|
1113
|
+
reference.azure_blob.container = self.location
|
|
1114
|
+
case StorageType.LOCAL:
|
|
1115
|
+
reference.local.path = self.location
|
|
1116
|
+
return storage_pb.StorageLocation(id=uuid_to_uuid_message(self.id), name=self.name, reference=reference)
|
|
1035
1117
|
|
|
1036
1118
|
def read(self, path: str) -> bytes:
|
|
1037
1119
|
runner_context = self.runner_context or RunnerContext()
|
|
@@ -1042,21 +1124,26 @@ class StorageLocation:
|
|
|
1042
1124
|
case StorageType.GCS:
|
|
1043
1125
|
span.set_attribute("bucket", self.location)
|
|
1044
1126
|
store = runner_context.gcs_client(self.location)
|
|
1045
|
-
case StorageType.
|
|
1127
|
+
case StorageType.AWS_S3:
|
|
1046
1128
|
span.set_attribute("bucket", self.location)
|
|
1047
|
-
if isinstance(self,
|
|
1129
|
+
if isinstance(self, AWSS3StorageLocation) and self.region:
|
|
1048
1130
|
store = runner_context.s3_client(self.location, region=self.region)
|
|
1049
1131
|
else:
|
|
1050
1132
|
store = runner_context.s3_client(self.location)
|
|
1051
|
-
case StorageType.
|
|
1052
|
-
if not isinstance(self,
|
|
1133
|
+
case StorageType.AZURE_BLOB:
|
|
1134
|
+
if not isinstance(self, AzureBlobStorageLocation) or not self.storage_account_resource_id:
|
|
1053
1135
|
raise ValueError("Azure storage location is missing its storage account resource ID")
|
|
1054
1136
|
span.set_attribute("storage_account_resource_id", self.storage_account_resource_id)
|
|
1055
1137
|
span.set_attribute("container", self.location)
|
|
1056
1138
|
store = runner_context.azure_client(self.storage_account_resource_id, self.location)
|
|
1057
|
-
case StorageType.
|
|
1139
|
+
case StorageType.LOCAL:
|
|
1140
|
+
from obstore.store import LocalStore # noqa: PLC0415
|
|
1141
|
+
|
|
1058
1142
|
span.set_attribute("root_directory", self.location)
|
|
1059
|
-
|
|
1143
|
+
root = runner_context.local_path(self.location)
|
|
1144
|
+
if not self.location or not root.is_dir():
|
|
1145
|
+
raise ValueError(f"Local storage location root is not available: {self.location!r}")
|
|
1146
|
+
store = LocalStore(root)
|
|
1060
1147
|
|
|
1061
1148
|
import obstore # noqa: PLC0415
|
|
1062
1149
|
|
|
@@ -1064,28 +1151,41 @@ class StorageLocation:
|
|
|
1064
1151
|
|
|
1065
1152
|
|
|
1066
1153
|
@dataclass(frozen=True)
|
|
1067
|
-
class
|
|
1154
|
+
class AWSS3StorageLocation(StorageLocation):
|
|
1068
1155
|
region: str | None = field(default=None, kw_only=True)
|
|
1069
1156
|
|
|
1070
1157
|
def to_message(self) -> storage_pb.StorageLocation:
|
|
1071
1158
|
"""Include the S3 bucket and its region in the storage reference."""
|
|
1072
1159
|
message = super().to_message()
|
|
1073
|
-
message.reference.type = storage_pb.STORAGE_TYPE_AWS_S3_BUCKET
|
|
1074
|
-
message.reference.aws_s3_bucket.bucket = self.location
|
|
1075
1160
|
message.reference.aws_s3_bucket.region = self.region or ""
|
|
1076
1161
|
return message
|
|
1077
1162
|
|
|
1078
1163
|
|
|
1079
1164
|
@dataclass(frozen=True)
|
|
1080
|
-
class
|
|
1165
|
+
class GCSStorageLocation(StorageLocation):
|
|
1166
|
+
project_id: str = field(default="", kw_only=True)
|
|
1167
|
+
bucket_location: str = field(default="", kw_only=True)
|
|
1168
|
+
|
|
1169
|
+
def to_message(self) -> storage_pb.StorageLocation:
|
|
1170
|
+
message = super().to_message()
|
|
1171
|
+
message.reference.gcs_bucket.project_id = self.project_id
|
|
1172
|
+
message.reference.gcs_bucket.location = self.bucket_location
|
|
1173
|
+
return message
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
@dataclass(frozen=True)
|
|
1177
|
+
class AzureBlobStorageLocation(StorageLocation):
|
|
1081
1178
|
storage_account_resource_id: str = field(kw_only=True)
|
|
1179
|
+
region: str = field(default="", kw_only=True)
|
|
1180
|
+
|
|
1181
|
+
def __str__(self) -> str:
|
|
1182
|
+
return f"{self.storage_account_resource_id}/containers/{self.location}"
|
|
1082
1183
|
|
|
1083
1184
|
def to_message(self) -> storage_pb.StorageLocation:
|
|
1084
1185
|
"""Include the Azure account and container in the storage reference."""
|
|
1085
1186
|
message = super().to_message()
|
|
1086
|
-
message.reference.type = storage_pb.STORAGE_TYPE_AZURE_BLOB
|
|
1087
1187
|
message.reference.azure_blob.storage_account_resource_id = self.storage_account_resource_id
|
|
1088
|
-
message.reference.azure_blob.
|
|
1188
|
+
message.reference.azure_blob.region = self.region
|
|
1089
1189
|
return message
|
|
1090
1190
|
|
|
1091
1191
|
|
|
@@ -257,7 +257,7 @@ class LazyStorageLocations(MutableMapping[UUID, StorageLocation]):
|
|
|
257
257
|
return
|
|
258
258
|
self._locations = {
|
|
259
259
|
location.id: location._with_runner_context(self._runner_context) # noqa: SLF001
|
|
260
|
-
for location in self._client.
|
|
260
|
+
for location in self._client.storage_locations().all()
|
|
261
261
|
}
|
|
262
262
|
self._loaded = True
|
|
263
263
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from tilebox.workflows.data import (
|
|
2
|
+
AWSS3BucketReference,
|
|
3
|
+
AWSS3StorageLocation,
|
|
4
|
+
AzureBlobReference,
|
|
5
|
+
AzureBlobStorageLocation,
|
|
6
|
+
GCSBucketReference,
|
|
7
|
+
GCSStorageLocation,
|
|
8
|
+
LocalReference,
|
|
9
|
+
StorageEventType,
|
|
10
|
+
StorageLocation,
|
|
11
|
+
StorageLocationReference,
|
|
12
|
+
StorageType,
|
|
13
|
+
)
|
|
14
|
+
from tilebox.workflows.storage_locations.client import StorageLocationClient
|
|
15
|
+
from tilebox.workflows.storage_locations.data import (
|
|
16
|
+
StorageSubscriptionEvent,
|
|
17
|
+
TriggeredJob,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"AWSS3BucketReference",
|
|
22
|
+
"AWSS3StorageLocation",
|
|
23
|
+
"AzureBlobReference",
|
|
24
|
+
"AzureBlobStorageLocation",
|
|
25
|
+
"GCSBucketReference",
|
|
26
|
+
"GCSStorageLocation",
|
|
27
|
+
"LocalReference",
|
|
28
|
+
"StorageEventType",
|
|
29
|
+
"StorageLocation",
|
|
30
|
+
"StorageLocationClient",
|
|
31
|
+
"StorageLocationReference",
|
|
32
|
+
"StorageSubscriptionEvent",
|
|
33
|
+
"StorageType",
|
|
34
|
+
"TriggeredJob",
|
|
35
|
+
]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from typing import TypeAlias
|
|
2
|
+
from uuid import UUID
|
|
3
|
+
|
|
4
|
+
from tilebox.workflows.data import StorageLocation, StorageLocationReference
|
|
5
|
+
from tilebox.workflows.storage_locations.service import StorageLocationService
|
|
6
|
+
|
|
7
|
+
StorageLocationIDLike: TypeAlias = StorageLocation | UUID | str
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class StorageLocationClient:
|
|
11
|
+
def __init__(self, service: StorageLocationService) -> None:
|
|
12
|
+
self._service = service
|
|
13
|
+
|
|
14
|
+
def all(self) -> list[StorageLocation]:
|
|
15
|
+
"""List all available storage locations."""
|
|
16
|
+
return self._service.list()
|
|
17
|
+
|
|
18
|
+
def find(self, storage_location_id: StorageLocationIDLike) -> StorageLocation:
|
|
19
|
+
"""Find a storage location by object, UUID, or UUID string."""
|
|
20
|
+
return self._service.get_by_id(_to_uuid(storage_location_id))
|
|
21
|
+
|
|
22
|
+
def create(self, name: str, reference: StorageLocationReference) -> StorageLocation:
|
|
23
|
+
"""Create a storage location from an AWS S3, GCS, Azure Blob, or local reference.
|
|
24
|
+
|
|
25
|
+
Creating a location does not create the underlying bucket, container, or directory,
|
|
26
|
+
or configure an event subscription.
|
|
27
|
+
"""
|
|
28
|
+
return self._service.create(name, reference)
|
|
29
|
+
|
|
30
|
+
def update(self, storage_location_id: StorageLocationIDLike, name: str) -> StorageLocation:
|
|
31
|
+
"""Rename a storage location. Its storage reference cannot be changed."""
|
|
32
|
+
return self._service.update(_to_uuid(storage_location_id), name)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _to_uuid(location: StorageLocationIDLike) -> UUID:
|
|
36
|
+
if isinstance(location, StorageLocation):
|
|
37
|
+
return location.id
|
|
38
|
+
return UUID(location) if isinstance(location, str) else location
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
from tilebox.datasets.query.pagination import Pagination
|
|
6
|
+
from tilebox.datasets.query.time_interval import timestamp_to_datetime
|
|
7
|
+
from tilebox.datasets.uuid import uuid_message_to_uuid
|
|
8
|
+
from tilebox.workflows.data import StorageEventType
|
|
9
|
+
from tilebox.workflows.workflows.v1 import storage_location_pb2 as storage_pb
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass(frozen=True)
|
|
13
|
+
class TriggeredJob:
|
|
14
|
+
job_id: UUID
|
|
15
|
+
automation_id: UUID
|
|
16
|
+
glob_pattern: str
|
|
17
|
+
|
|
18
|
+
@classmethod
|
|
19
|
+
def from_message(cls, job: storage_pb.TriggeredJob) -> "TriggeredJob":
|
|
20
|
+
return cls(
|
|
21
|
+
job_id=uuid_message_to_uuid(job.job_id),
|
|
22
|
+
automation_id=uuid_message_to_uuid(job.automation_id),
|
|
23
|
+
glob_pattern=job.glob_pattern,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass(frozen=True)
|
|
28
|
+
class StorageSubscriptionEvent:
|
|
29
|
+
id: UUID
|
|
30
|
+
object_key: str
|
|
31
|
+
type: StorageEventType
|
|
32
|
+
event_time: datetime
|
|
33
|
+
received_at: datetime
|
|
34
|
+
triggered_jobs: list[TriggeredJob]
|
|
35
|
+
storage_subscription_id: UUID
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def from_message(cls, event: storage_pb.StorageSubscriptionEvent) -> "StorageSubscriptionEvent":
|
|
39
|
+
return cls(
|
|
40
|
+
id=uuid_message_to_uuid(event.id),
|
|
41
|
+
object_key=event.object_key,
|
|
42
|
+
type=StorageEventType(event.type),
|
|
43
|
+
event_time=timestamp_to_datetime(event.event_time),
|
|
44
|
+
received_at=timestamp_to_datetime(event.received_at),
|
|
45
|
+
triggered_jobs=[TriggeredJob.from_message(job) for job in event.triggered_jobs],
|
|
46
|
+
storage_subscription_id=uuid_message_to_uuid(event.storage_subscription_id),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@dataclass(frozen=True)
|
|
51
|
+
class StorageSubscriptionEvents:
|
|
52
|
+
events: list[StorageSubscriptionEvent]
|
|
53
|
+
next_page: Pagination
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_message(cls, page: storage_pb.StorageSubscriptionEvents) -> "StorageSubscriptionEvents":
|
|
57
|
+
return cls(
|
|
58
|
+
events=[StorageSubscriptionEvent.from_message(event) for event in page.events],
|
|
59
|
+
next_page=Pagination.from_message(page.next_page),
|
|
60
|
+
)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import builtins
|
|
2
|
+
from typing import Any
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
from google.protobuf.empty_pb2 import Empty
|
|
6
|
+
from grpc import Channel
|
|
7
|
+
|
|
8
|
+
from _tilebox.grpc.error import with_pythonic_errors
|
|
9
|
+
from tilebox.datasets.query.pagination import Pagination
|
|
10
|
+
from tilebox.datasets.uuid import uuid_to_uuid_message
|
|
11
|
+
from tilebox.workflows.data import StorageLocation, StorageLocationReference
|
|
12
|
+
from tilebox.workflows.storage_locations.data import StorageSubscriptionEvents
|
|
13
|
+
from tilebox.workflows.workflows.v1.storage_location_pb2 import (
|
|
14
|
+
CreateStorageLocationRequest,
|
|
15
|
+
ListStorageSubscriptionEventsRequest,
|
|
16
|
+
UpdateStorageLocationRequest,
|
|
17
|
+
)
|
|
18
|
+
from tilebox.workflows.workflows.v1.storage_location_pb2_grpc import StorageLocationServiceStub
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class StorageLocationService:
|
|
22
|
+
def __init__(self, channel: Channel | Any) -> None:
|
|
23
|
+
self.service = (
|
|
24
|
+
with_pythonic_errors(StorageLocationServiceStub(channel)) if hasattr(channel, "unary_unary") else channel
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
def list(self) -> builtins.list[StorageLocation]:
|
|
28
|
+
response = self.service.ListStorageLocations(Empty())
|
|
29
|
+
return [StorageLocation.from_message(location) for location in response.locations]
|
|
30
|
+
|
|
31
|
+
def get_by_id(self, storage_location_id: UUID) -> StorageLocation:
|
|
32
|
+
return StorageLocation.from_message(self.service.GetStorageLocation(uuid_to_uuid_message(storage_location_id)))
|
|
33
|
+
|
|
34
|
+
def create(self, name: str, reference: StorageLocationReference) -> StorageLocation:
|
|
35
|
+
request = CreateStorageLocationRequest(name=name, reference=reference.to_message())
|
|
36
|
+
return StorageLocation.from_message(self.service.CreateStorageLocation(request))
|
|
37
|
+
|
|
38
|
+
def update(self, storage_location_id: UUID, name: str) -> StorageLocation:
|
|
39
|
+
request = UpdateStorageLocationRequest(storage_location_id=uuid_to_uuid_message(storage_location_id), name=name)
|
|
40
|
+
return StorageLocation.from_message(self.service.UpdateStorageLocation(request))
|
|
41
|
+
|
|
42
|
+
def list_events(self, storage_location_id: UUID, page: Pagination) -> StorageSubscriptionEvents:
|
|
43
|
+
request = ListStorageSubscriptionEventsRequest(
|
|
44
|
+
storage_location_id=uuid_to_uuid_message(storage_location_id), page=page.to_message()
|
|
45
|
+
)
|
|
46
|
+
return StorageSubscriptionEvents.from_message(self.service.ListStorageSubscriptionEvents(request))
|
|
@@ -30,14 +30,14 @@ from tilebox.workflows.workflows.v1 import core_pb2 as workflows_dot_v1_dot_core
|
|
|
30
30
|
from tilebox.workflows.workflows.v1 import storage_location_pb2 as workflows_dot_v1_dot_storage__location__pb2
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dworkflows/v1/automation.proto\x12\x0cworkflows.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13tilebox/v1/id.proto\x1a\x17workflows/v1/core.proto\x1a#workflows/v1/storage_location.proto\"\xc0\x02\n\x13\x41utomationPrototype\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x0e.tilebox.v1.IDR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12@\n\tprototype\x18\x03 \x01(\x0b\x32\".workflows.v1.SingleTaskSubmissionR\tprototype\x12W\n\x16storage_event_triggers\x18\x04 \x03(\x0b\x32!.workflows.v1.StorageEventTriggerR\x14storageEventTriggers\x12>\n\rcron_triggers\x18\x05 \x03(\x0b\x32\x19.workflows.v1.CronTriggerR\x0c\x63ronTriggers\x12\x1a\n\x08\x64isabled\x18\x06 \x01(\x08R\x08\x64isabled\"R\n\x0b\x41utomations\x12\x43\n\x0b\x61utomations\x18\x01 \x03(\x0b\x32!.workflows.v1.AutomationPrototypeR\x0b\x61utomations\"\xa2\x01\n\x13StorageEventTrigger\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x0e.tilebox.v1.IDR\x02id\x12H\n\x10storage_location\x18\x02 \x01(\x0b\x32\x1d.workflows.v1.StorageLocationR\x0fstorageLocation\x12!\n\x0cglob_pattern\x18\x03 \x01(\tR\x0bglobPattern\"\x96\x01\n\x0b\x43ronTrigger\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x0e.tilebox.v1.IDR\x02id\x12\x1a\n\x08schedule\x18\x02 \x01(\tR\x08schedule\x12K\n\x11next_scheduled_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03R\x0fnextScheduledAt\"E\n\nAutomation\x12#\n\rtrigger_event\x18\x01 \x01(\x0cR\x0ctriggerEvent\x12\x12\n\x04\x61rgs\x18\x02 \x01(\x0cR\x04\x61rgs\"S\n\x12TriggeredCronEvent\x12=\n\x0ctrigger_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0btriggerTime\"o\n\x17\x44\x65leteAutomationRequest\x12\x33\n\rautomation_id\x18\x01 \x01(\x0b\x32\x0e.tilebox.v1.IDR\x0c\x61utomationId\x12\x1f\n\x0b\x63\x61ncel_jobs\x18\x02 \x01(\x08R\ncancelJobs2\xa4\x03\n\x11\x41utomationService\x12\x44\n\x0fListAutomations\x12\x16.google.protobuf.Empty\x1a\x19.workflows.v1.Automations\x12\x42\n\rGetAutomation\x12\x0e.tilebox.v1.ID\x1a!.workflows.v1.AutomationPrototype\x12X\n\x10\x43reateAutomation\x12!.workflows.v1.AutomationPrototype\x1a!.workflows.v1.AutomationPrototype\x12X\n\x10UpdateAutomation\x12!.workflows.v1.AutomationPrototype\x1a!.workflows.v1.AutomationPrototype\x12Q\n\x10\x44\x65leteAutomation\x12%.workflows.v1.DeleteAutomationRequest\x1a\x16.google.protobuf.
|
|
33
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dworkflows/v1/automation.proto\x12\x0cworkflows.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13tilebox/v1/id.proto\x1a\x17workflows/v1/core.proto\x1a#workflows/v1/storage_location.proto\"\xc0\x02\n\x13\x41utomationPrototype\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x0e.tilebox.v1.IDR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12@\n\tprototype\x18\x03 \x01(\x0b\x32\".workflows.v1.SingleTaskSubmissionR\tprototype\x12W\n\x16storage_event_triggers\x18\x04 \x03(\x0b\x32!.workflows.v1.StorageEventTriggerR\x14storageEventTriggers\x12>\n\rcron_triggers\x18\x05 \x03(\x0b\x32\x19.workflows.v1.CronTriggerR\x0c\x63ronTriggers\x12\x1a\n\x08\x64isabled\x18\x06 \x01(\x08R\x08\x64isabled\"R\n\x0b\x41utomations\x12\x43\n\x0b\x61utomations\x18\x01 \x03(\x0b\x32!.workflows.v1.AutomationPrototypeR\x0b\x61utomations\"\xa2\x01\n\x13StorageEventTrigger\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x0e.tilebox.v1.IDR\x02id\x12H\n\x10storage_location\x18\x02 \x01(\x0b\x32\x1d.workflows.v1.StorageLocationR\x0fstorageLocation\x12!\n\x0cglob_pattern\x18\x03 \x01(\tR\x0bglobPattern\"\x96\x01\n\x0b\x43ronTrigger\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x0e.tilebox.v1.IDR\x02id\x12\x1a\n\x08schedule\x18\x02 \x01(\tR\x08schedule\x12K\n\x11next_scheduled_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03R\x0fnextScheduledAt\"E\n\nAutomation\x12#\n\rtrigger_event\x18\x01 \x01(\x0cR\x0ctriggerEvent\x12\x12\n\x04\x61rgs\x18\x02 \x01(\x0cR\x04\x61rgs\"S\n\x12TriggeredCronEvent\x12=\n\x0ctrigger_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0btriggerTime\"o\n\x17\x44\x65leteAutomationRequest\x12\x33\n\rautomation_id\x18\x01 \x01(\x0b\x32\x0e.tilebox.v1.IDR\x0c\x61utomationId\x12\x1f\n\x0b\x63\x61ncel_jobs\x18\x02 \x01(\x08R\ncancelJobs2\xa4\x03\n\x11\x41utomationService\x12\x44\n\x0fListAutomations\x12\x16.google.protobuf.Empty\x1a\x19.workflows.v1.Automations\x12\x42\n\rGetAutomation\x12\x0e.tilebox.v1.ID\x1a!.workflows.v1.AutomationPrototype\x12X\n\x10\x43reateAutomation\x12!.workflows.v1.AutomationPrototype\x1a!.workflows.v1.AutomationPrototype\x12X\n\x10UpdateAutomation\x12!.workflows.v1.AutomationPrototype\x1a!.workflows.v1.AutomationPrototype\x12Q\n\x10\x44\x65leteAutomation\x12%.workflows.v1.DeleteAutomationRequest\x1a\x16.google.protobuf.EmptyBy\n\x10\x63om.workflows.v1B\x0f\x41utomationProtoP\x01\xa2\x02\x03WXX\xaa\x02\x0cWorkflows.V1\xca\x02\x0cWorkflows\\V1\xe2\x02\x18Workflows\\V1\\GPBMetadata\xea\x02\rWorkflows::V1\x92\x03\x02\x08\x02\x62\x08\x65\x64itionsp\xe8\x07')
|
|
34
34
|
|
|
35
35
|
_globals = globals()
|
|
36
36
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
37
37
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflows.v1.automation_pb2', _globals)
|
|
38
38
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
39
39
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
40
|
-
_globals['DESCRIPTOR']._serialized_options = b'\222\003\002\010\002'
|
|
40
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\020com.workflows.v1B\017AutomationProtoP\001\242\002\003WXX\252\002\014Workflows.V1\312\002\014Workflows\\V1\342\002\030Workflows\\V1\\GPBMetadata\352\002\rWorkflows::V1\222\003\002\010\002'
|
|
41
41
|
_globals['_CRONTRIGGER'].fields_by_name['next_scheduled_at']._loaded_options = None
|
|
42
42
|
_globals['_CRONTRIGGER'].fields_by_name['next_scheduled_at']._serialized_options = b'\340A\003'
|
|
43
43
|
_globals['_AUTOMATIONPROTOTYPE']._serialized_start=226
|