tracdap-runtime 0.6.0rc1__py3-none-any.whl → 0.6.0rc3__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.
- tracdap/rt/_impl/data.py +53 -16
- tracdap/rt/_impl/storage.py +92 -27
- tracdap/rt/_plugins/storage_aws.py +158 -142
- tracdap/rt/_plugins/storage_azure.py +155 -0
- tracdap/rt/_plugins/storage_gcp.py +72 -15
- tracdap/rt/_plugins/storage_local.py +11 -6
- tracdap/rt/_version.py +1 -1
- tracdap/rt/config/__init__.py +12 -17
- tracdap/rt/config/common.py +10 -0
- tracdap/rt/config/common_pb2.py +38 -31
- tracdap/rt/config/job_pb2.py +21 -20
- tracdap/rt/config/platform.py +60 -25
- tracdap/rt/config/platform_pb2.py +52 -45
- tracdap/rt/config/result_pb2.py +15 -14
- tracdap/rt/config/runtime.py +0 -1
- tracdap/rt/config/runtime_pb2.py +24 -24
- tracdap/rt/ext/storage.py +2 -2
- tracdap/rt/metadata/__init__.py +20 -20
- tracdap/rt/metadata/common_pb2.py +15 -14
- tracdap/rt/metadata/custom_pb2.py +9 -8
- tracdap/rt/metadata/data_pb2.py +31 -30
- tracdap/rt/metadata/file_pb2.py +9 -8
- tracdap/rt/metadata/flow_pb2.py +33 -32
- tracdap/rt/metadata/job_pb2.py +55 -54
- tracdap/rt/metadata/model_pb2.py +31 -30
- tracdap/rt/metadata/object_id_pb2.py +13 -12
- tracdap/rt/metadata/object_pb2.py +9 -8
- tracdap/rt/metadata/search_pb2.py +19 -18
- tracdap/rt/metadata/stoarge_pb2.py +31 -30
- tracdap/rt/metadata/tag_pb2.py +13 -12
- tracdap/rt/metadata/tag_update_pb2.py +11 -10
- tracdap/rt/metadata/type_pb2.py +29 -28
- {tracdap_runtime-0.6.0rc1.dist-info → tracdap_runtime-0.6.0rc3.dist-info}/METADATA +27 -15
- {tracdap_runtime-0.6.0rc1.dist-info → tracdap_runtime-0.6.0rc3.dist-info}/RECORD +37 -38
- {tracdap_runtime-0.6.0rc1.dist-info → tracdap_runtime-0.6.0rc3.dist-info}/WHEEL +1 -1
- tracdap/rt/config/gateway.py +0 -104
- tracdap/rt/config/gateway_pb2.py +0 -45
- {tracdap_runtime-0.6.0rc1.dist-info → tracdap_runtime-0.6.0rc3.dist-info}/LICENSE +0 -0
- {tracdap_runtime-0.6.0rc1.dist-info → tracdap_runtime-0.6.0rc3.dist-info}/top_level.txt +0 -0
@@ -21,16 +21,25 @@ import tracdap.rt.exceptions as ex
|
|
21
21
|
import tracdap.rt.ext.plugins as plugins
|
22
22
|
from tracdap.rt.ext.storage import *
|
23
23
|
|
24
|
-
from pyarrow import fs as
|
24
|
+
from pyarrow import fs as pa_fs
|
25
25
|
|
26
26
|
# Set of common helpers across the core plugins (do not reference rt._impl)
|
27
27
|
from . import _helpers
|
28
28
|
|
29
29
|
|
30
|
-
|
30
|
+
try:
|
31
|
+
# These dependencies are provided by the optional [gcp] feature
|
32
|
+
# For local development, pip install -r requirements_plugins.txt
|
33
|
+
import google.cloud.storage as gcs # noqa
|
34
|
+
import gcsfs # noqa
|
35
|
+
__gcp_available = True
|
36
|
+
except ImportError:
|
37
|
+
gcs = None
|
38
|
+
gcsfs = None
|
39
|
+
__gcp_available = False
|
40
|
+
|
31
41
|
|
32
|
-
|
33
|
-
ARROW_NATIVE_FS_DEFAULT = False
|
42
|
+
class GcpStorageProvider(IStorageProvider):
|
34
43
|
|
35
44
|
BUCKET_PROPERTY = "bucket"
|
36
45
|
PREFIX_PROPERTY = "prefix"
|
@@ -45,35 +54,78 @@ class GcpStorageProvider(IStorageProvider):
|
|
45
54
|
ACCESS_TOKEN_EXPIRY = "accessTokenExpiry"
|
46
55
|
ACCESS_TOKEN_EXPIRY_DEFAULT = 3600
|
47
56
|
|
57
|
+
RUNTIME_FS_PROPERTY = "runtimeFs"
|
58
|
+
RUNTIME_FS_AUTO = "auto"
|
59
|
+
RUNTIME_FS_ARROW = "arrow"
|
60
|
+
RUNTIME_FS_FSSPEC = "fsspec"
|
61
|
+
RUNTIME_FS_DEFAULT = RUNTIME_FS_AUTO
|
62
|
+
|
63
|
+
ARROW_CLIENT_ARGS = {
|
64
|
+
REGION_PROPERTY: "default_bucket_location",
|
65
|
+
ENDPOINT_PROPERTY: "endpoint_override"
|
66
|
+
}
|
67
|
+
|
68
|
+
FSSPEC_CLIENT_ARGS = {
|
69
|
+
REGION_PROPERTY: "default_location",
|
70
|
+
ENDPOINT_PROPERTY: "endpoint_url"
|
71
|
+
}
|
72
|
+
|
73
|
+
try:
|
74
|
+
__arrow_available = pa_fs.GcsFileSystem is not None
|
75
|
+
except ImportError:
|
76
|
+
__arrow_available = False
|
77
|
+
|
48
78
|
def __init__(self, properties: tp.Dict[str, str]):
|
49
79
|
|
50
80
|
self._log = _helpers.logger_for_object(self)
|
51
81
|
self._properties = properties
|
52
82
|
|
53
|
-
self.
|
54
|
-
properties, self.
|
83
|
+
self._runtime_fs = _helpers.get_plugin_property(
|
84
|
+
properties, self.RUNTIME_FS_PROPERTY) \
|
85
|
+
or self.RUNTIME_FS_DEFAULT
|
55
86
|
|
56
87
|
def has_arrow_native(self) -> bool:
|
57
88
|
return True
|
58
89
|
|
59
|
-
def get_arrow_native(self) ->
|
90
|
+
def get_arrow_native(self) -> pa_fs.SubTreeFileSystem:
|
60
91
|
|
61
|
-
|
62
|
-
|
92
|
+
if self._runtime_fs == self.RUNTIME_FS_AUTO:
|
93
|
+
gcs_fs = self.create_arrow() if self.__arrow_available else self.create_fsspec()
|
94
|
+
elif self._runtime_fs == self.RUNTIME_FS_ARROW:
|
95
|
+
gcs_fs = self.create_arrow()
|
96
|
+
elif self._runtime_fs == self.RUNTIME_FS_FSSPEC:
|
97
|
+
gcs_fs = self.create_fsspec()
|
98
|
+
else:
|
99
|
+
message = f"Requested runtime FS [{self._runtime_fs}] is not available for GCP storage"
|
100
|
+
self._log.error(message)
|
101
|
+
raise ex.EStartup(message)
|
63
102
|
|
64
103
|
bucket = _helpers.get_plugin_property(self._properties, self.BUCKET_PROPERTY)
|
104
|
+
prefix = _helpers.get_plugin_property(self._properties, self.PREFIX_PROPERTY)
|
65
105
|
|
66
106
|
if bucket is None or len(bucket.strip()) == 0:
|
67
107
|
message = f"Missing required config property [{self.BUCKET_PROPERTY}] for GCP storage"
|
68
108
|
self._log.error(message)
|
69
109
|
raise ex.EConfigParse(message)
|
70
110
|
|
71
|
-
prefix = _helpers.get_plugin_property(self._properties, self.PREFIX_PROPERTY)
|
72
111
|
root_path = f"{bucket}/{prefix}" if prefix else bucket
|
73
112
|
|
74
|
-
return
|
113
|
+
return pa_fs.SubTreeFileSystem(root_path, gcs_fs)
|
114
|
+
|
115
|
+
def create_arrow(self) -> pa_fs.FileSystem:
|
116
|
+
|
117
|
+
gcs_arrow_args = self.setup_client_args(self.ARROW_CLIENT_ARGS)
|
118
|
+
|
119
|
+
return pa_fs.GcsFileSystem(**gcs_arrow_args)
|
75
120
|
|
76
|
-
def
|
121
|
+
def create_fsspec(self) -> pa_fs.FileSystem:
|
122
|
+
|
123
|
+
gcs_fsspec_args = self.setup_client_args(self.FSSPEC_CLIENT_ARGS)
|
124
|
+
gcs_fsspec = gcsfs.GCSFileSystem(**gcs_fsspec_args)
|
125
|
+
|
126
|
+
return pa_fs.PyFileSystem(pa_fs.FSSpecHandler(gcs_fsspec))
|
127
|
+
|
128
|
+
def setup_client_args(self, arg_mapping: tp.Dict[str, str]) -> tp.Dict[str, tp.Any]:
|
77
129
|
|
78
130
|
client_args = dict()
|
79
131
|
|
@@ -81,10 +133,12 @@ class GcpStorageProvider(IStorageProvider):
|
|
81
133
|
endpoint = _helpers.get_plugin_property(self._properties, self.ENDPOINT_PROPERTY)
|
82
134
|
|
83
135
|
if region is not None:
|
84
|
-
|
136
|
+
region_key = arg_mapping[self.REGION_PROPERTY]
|
137
|
+
client_args[region_key] = region
|
85
138
|
|
86
139
|
if endpoint is not None:
|
87
|
-
|
140
|
+
endpoint_key = arg_mapping[self.ENDPOINT_PROPERTY]
|
141
|
+
client_args[endpoint_key] = endpoint
|
88
142
|
|
89
143
|
credentials = self.setup_credentials()
|
90
144
|
client_args.update(credentials)
|
@@ -104,6 +158,8 @@ class GcpStorageProvider(IStorageProvider):
|
|
104
158
|
|
105
159
|
if mechanism == self.CREDENTIALS_ACCESS_TOKEN:
|
106
160
|
|
161
|
+
self._log.info(f"Using [{self.CREDENTIALS_ACCESS_TOKEN}] credentials mechanism")
|
162
|
+
|
107
163
|
access_token = _helpers.get_plugin_property(self._properties, self.ACCESS_TOKEN)
|
108
164
|
access_token_expiry = _helpers.get_plugin_property(self._properties, self.ACCESS_TOKEN_EXPIRY)
|
109
165
|
|
@@ -123,4 +179,5 @@ class GcpStorageProvider(IStorageProvider):
|
|
123
179
|
raise ex.EStartup(message)
|
124
180
|
|
125
181
|
|
126
|
-
|
182
|
+
if __gcp_available:
|
183
|
+
plugins.PluginManager.register_plugin(IStorageProvider, GcpStorageProvider, ["GCS"])
|
@@ -35,8 +35,12 @@ from . import _helpers
|
|
35
35
|
class LocalStorageProvider(IStorageProvider):
|
36
36
|
|
37
37
|
ROOT_PATH_PROPERTY = "rootPath"
|
38
|
-
|
39
|
-
|
38
|
+
|
39
|
+
RUNTIME_FS_PROPERTY = "runtimeFs"
|
40
|
+
RUNTIME_FS_AUTO = "auto"
|
41
|
+
RUNTIME_FS_ARROW = "arrow"
|
42
|
+
RUNTIME_FS_PYTHON = "python"
|
43
|
+
RUNTIME_FS_DEFAULT = RUNTIME_FS_AUTO
|
40
44
|
|
41
45
|
def __init__(self, properties: tp.Dict[str, str]):
|
42
46
|
|
@@ -45,14 +49,15 @@ class LocalStorageProvider(IStorageProvider):
|
|
45
49
|
|
46
50
|
self._root_path = self.check_root_path(self._properties, self._log)
|
47
51
|
|
48
|
-
self.
|
49
|
-
properties, self.
|
52
|
+
self._runtime_fs = _helpers.get_plugin_property(
|
53
|
+
properties, self.RUNTIME_FS_PROPERTY) \
|
54
|
+
or self.RUNTIME_FS_DEFAULT
|
50
55
|
|
51
56
|
def has_arrow_native(self) -> bool:
|
52
|
-
return
|
57
|
+
return self._runtime_fs in [self.RUNTIME_FS_ARROW, self.RUNTIME_FS_AUTO]
|
53
58
|
|
54
59
|
def has_file_storage(self) -> bool:
|
55
|
-
return
|
60
|
+
return self._runtime_fs == self.RUNTIME_FS_PYTHON
|
56
61
|
|
57
62
|
def get_arrow_native(self) -> afs.SubTreeFileSystem:
|
58
63
|
root_fs = afs.LocalFileSystem()
|
tracdap/rt/_version.py
CHANGED
tracdap/rt/config/__init__.py
CHANGED
@@ -1,35 +1,30 @@
|
|
1
1
|
# Code generated by TRAC
|
2
2
|
|
3
|
-
from .job import JobConfig
|
4
|
-
|
5
|
-
from .result import TagUpdateList
|
6
|
-
from .result import JobResult
|
7
|
-
|
8
3
|
from .common import _ConfigFile
|
9
4
|
from .common import PluginConfig
|
10
5
|
from .common import PlatformInfo
|
11
6
|
from .common import AuthenticationConfig
|
7
|
+
from .common import StorageConfig
|
12
8
|
|
9
|
+
from .platform import RoutingProtocol
|
10
|
+
from .platform import DeploymentLayout
|
13
11
|
from .platform import PlatformConfig
|
14
12
|
from .platform import MetadataConfig
|
15
|
-
from .platform import StorageConfig
|
16
13
|
from .platform import TenantConfig
|
17
14
|
from .platform import WebServerConfig
|
18
15
|
from .platform import WebServerRewriteRule
|
19
16
|
from .platform import WebServerRedirect
|
20
|
-
from .platform import
|
21
|
-
from .platform import
|
22
|
-
from .platform import
|
17
|
+
from .platform import GatewayConfig
|
18
|
+
from .platform import RouteConfig
|
19
|
+
from .platform import RoutingMatch
|
20
|
+
from .platform import RoutingTarget
|
23
21
|
from .platform import ServiceConfig
|
22
|
+
from .platform import DeploymentConfig
|
23
|
+
|
24
|
+
from .result import TagUpdateList
|
25
|
+
from .result import JobResult
|
24
26
|
|
25
27
|
from .runtime import RuntimeConfig
|
26
28
|
from .runtime import SparkSettings
|
27
29
|
|
28
|
-
from .
|
29
|
-
from .gateway import GwRestMapping
|
30
|
-
from .gateway import GatewayConfig
|
31
|
-
from .gateway import GwRoute
|
32
|
-
from .gateway import GwMatch
|
33
|
-
from .gateway import GwTarget
|
34
|
-
from .gateway import GwServiceMap
|
35
|
-
from .gateway import GwService
|
30
|
+
from .job import JobConfig
|
tracdap/rt/config/common.py
CHANGED
@@ -56,3 +56,13 @@ class AuthenticationConfig:
|
|
56
56
|
systemTicketDuration: int = None
|
57
57
|
|
58
58
|
systemTicketRefresh: int = None
|
59
|
+
|
60
|
+
|
61
|
+
@_dc.dataclass
|
62
|
+
class StorageConfig:
|
63
|
+
|
64
|
+
buckets: _tp.Dict[str, PluginConfig] = _dc.field(default_factory=dict)
|
65
|
+
|
66
|
+
defaultBucket: str = None
|
67
|
+
|
68
|
+
defaultFormat: str = None
|
tracdap/rt/config/common_pb2.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
3
|
# source: tracdap/config/common.proto
|
4
|
+
# Protobuf Python Version: 4.25.3
|
4
5
|
"""Generated protocol buffer code."""
|
5
|
-
from google.protobuf.internal import builder as _builder
|
6
6
|
from google.protobuf import descriptor as _descriptor
|
7
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
8
8
|
from google.protobuf import symbol_database as _symbol_database
|
9
|
+
from google.protobuf.internal import builder as _builder
|
9
10
|
# @@protoc_insertion_point(imports)
|
10
11
|
|
11
12
|
_sym_db = _symbol_database.Default()
|
@@ -13,36 +14,42 @@ _sym_db = _symbol_database.Default()
|
|
13
14
|
|
14
15
|
|
15
16
|
|
16
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1btracdap/config/common.proto\x12\x0etracdap.config\"u\n\x0b_ConfigFile\x12\x37\n\x06\x63onfig\x18\x01 \x03(\x0b\x32\'.tracdap.config._ConfigFile.ConfigEntry\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x81\x02\n\x0cPluginConfig\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12@\n\nproperties\x18\x02 \x03(\x0b\x32,.tracdap.config.PluginConfig.PropertiesEntry\x12:\n\x07secrets\x18\x03 \x03(\x0b\x32).tracdap.config.PluginConfig.SecretsEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a.\n\x0cSecretsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb8\x01\n\x0cPlatformInfo\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x12\n\nproduction\x18\x02 \x01(\x08\x12H\n\x0e\x64\x65ploymentInfo\x18\x03 \x03(\x0b\x32\x30.tracdap.config.PlatformInfo.DeploymentInfoEntry\x1a\x35\n\x13\x44\x65ploymentInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xba\x02\n\x14\x41uthenticationConfig\x12\x11\n\tjwtIssuer\x18\x01 \x01(\t\x12\x11\n\tjwtExpiry\x18\x02 \x01(\x11\x12\x10\n\x08jwtLimit\x18\x06 \x01(\x11\x12\x12\n\njwtRefresh\x18\x07 \x01(\x11\x12\x33\n\x08provider\x18\x03 \x01(\x0b\x32\x1c.tracdap.config.PluginConfigH\x00\x88\x01\x01\x12\x13\n\x0b\x64isableAuth\x18\x04 \x01(\x08\x12\x16\n\x0e\x64isableSigning\x18\x05 \x01(\x08\x12\x14\n\x0csystemUserId\x18\x08 \x01(\t\x12\x16\n\x0esystemUserName\x18\t \x01(\t\x12\x1c\n\x14systemTicketDuration\x18\n \x01(\x11\x12\x1b\n\x13systemTicketRefresh\x18\x0b \x01(\x11\x42\x0b\n\
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1btracdap/config/common.proto\x12\x0etracdap.config\"u\n\x0b_ConfigFile\x12\x37\n\x06\x63onfig\x18\x01 \x03(\x0b\x32\'.tracdap.config._ConfigFile.ConfigEntry\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x81\x02\n\x0cPluginConfig\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12@\n\nproperties\x18\x02 \x03(\x0b\x32,.tracdap.config.PluginConfig.PropertiesEntry\x12:\n\x07secrets\x18\x03 \x03(\x0b\x32).tracdap.config.PluginConfig.SecretsEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a.\n\x0cSecretsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb8\x01\n\x0cPlatformInfo\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x12\n\nproduction\x18\x02 \x01(\x08\x12H\n\x0e\x64\x65ploymentInfo\x18\x03 \x03(\x0b\x32\x30.tracdap.config.PlatformInfo.DeploymentInfoEntry\x1a\x35\n\x13\x44\x65ploymentInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xba\x02\n\x14\x41uthenticationConfig\x12\x11\n\tjwtIssuer\x18\x01 \x01(\t\x12\x11\n\tjwtExpiry\x18\x02 \x01(\x11\x12\x10\n\x08jwtLimit\x18\x06 \x01(\x11\x12\x12\n\njwtRefresh\x18\x07 \x01(\x11\x12\x33\n\x08provider\x18\x03 \x01(\x0b\x32\x1c.tracdap.config.PluginConfigH\x00\x88\x01\x01\x12\x13\n\x0b\x64isableAuth\x18\x04 \x01(\x08\x12\x16\n\x0e\x64isableSigning\x18\x05 \x01(\x08\x12\x14\n\x0csystemUserId\x18\x08 \x01(\t\x12\x16\n\x0esystemUserName\x18\t \x01(\t\x12\x1c\n\x14systemTicketDuration\x18\n \x01(\x11\x12\x1b\n\x13systemTicketRefresh\x18\x0b \x01(\x11\x42\x0b\n\t_provider\"\xc8\x01\n\rStorageConfig\x12;\n\x07\x62uckets\x18\x01 \x03(\x0b\x32*.tracdap.config.StorageConfig.BucketsEntry\x12\x15\n\rdefaultBucket\x18\x02 \x01(\t\x12\x15\n\rdefaultFormat\x18\x03 \x01(\t\x1aL\n\x0c\x42ucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.tracdap.config.PluginConfig:\x02\x38\x01\x42\x1c\n\x18org.finos.tracdap.configP\x01\x62\x06proto3')
|
17
18
|
|
18
|
-
|
19
|
-
_builder.
|
19
|
+
_globals = globals()
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'tracdap.config.common_pb2', _globals)
|
20
22
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
21
|
-
|
22
|
-
DESCRIPTOR.
|
23
|
-
|
24
|
-
__CONFIGFILE_CONFIGENTRY.
|
25
|
-
|
26
|
-
_PLUGINCONFIG_PROPERTIESENTRY.
|
27
|
-
|
28
|
-
_PLUGINCONFIG_SECRETSENTRY.
|
29
|
-
|
30
|
-
_PLATFORMINFO_DEPLOYMENTINFOENTRY.
|
31
|
-
|
32
|
-
|
33
|
-
__CONFIGFILE.
|
34
|
-
|
35
|
-
__CONFIGFILE_CONFIGENTRY.
|
36
|
-
|
37
|
-
_PLUGINCONFIG.
|
38
|
-
|
39
|
-
_PLUGINCONFIG_PROPERTIESENTRY.
|
40
|
-
|
41
|
-
_PLUGINCONFIG_SECRETSENTRY.
|
42
|
-
|
43
|
-
_PLATFORMINFO.
|
44
|
-
|
45
|
-
_PLATFORMINFO_DEPLOYMENTINFOENTRY.
|
46
|
-
|
47
|
-
_AUTHENTICATIONCONFIG.
|
23
|
+
_globals['DESCRIPTOR']._options = None
|
24
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\030org.finos.tracdap.configP\001'
|
25
|
+
_globals['__CONFIGFILE_CONFIGENTRY']._options = None
|
26
|
+
_globals['__CONFIGFILE_CONFIGENTRY']._serialized_options = b'8\001'
|
27
|
+
_globals['_PLUGINCONFIG_PROPERTIESENTRY']._options = None
|
28
|
+
_globals['_PLUGINCONFIG_PROPERTIESENTRY']._serialized_options = b'8\001'
|
29
|
+
_globals['_PLUGINCONFIG_SECRETSENTRY']._options = None
|
30
|
+
_globals['_PLUGINCONFIG_SECRETSENTRY']._serialized_options = b'8\001'
|
31
|
+
_globals['_PLATFORMINFO_DEPLOYMENTINFOENTRY']._options = None
|
32
|
+
_globals['_PLATFORMINFO_DEPLOYMENTINFOENTRY']._serialized_options = b'8\001'
|
33
|
+
_globals['_STORAGECONFIG_BUCKETSENTRY']._options = None
|
34
|
+
_globals['_STORAGECONFIG_BUCKETSENTRY']._serialized_options = b'8\001'
|
35
|
+
_globals['__CONFIGFILE']._serialized_start=47
|
36
|
+
_globals['__CONFIGFILE']._serialized_end=164
|
37
|
+
_globals['__CONFIGFILE_CONFIGENTRY']._serialized_start=119
|
38
|
+
_globals['__CONFIGFILE_CONFIGENTRY']._serialized_end=164
|
39
|
+
_globals['_PLUGINCONFIG']._serialized_start=167
|
40
|
+
_globals['_PLUGINCONFIG']._serialized_end=424
|
41
|
+
_globals['_PLUGINCONFIG_PROPERTIESENTRY']._serialized_start=327
|
42
|
+
_globals['_PLUGINCONFIG_PROPERTIESENTRY']._serialized_end=376
|
43
|
+
_globals['_PLUGINCONFIG_SECRETSENTRY']._serialized_start=378
|
44
|
+
_globals['_PLUGINCONFIG_SECRETSENTRY']._serialized_end=424
|
45
|
+
_globals['_PLATFORMINFO']._serialized_start=427
|
46
|
+
_globals['_PLATFORMINFO']._serialized_end=611
|
47
|
+
_globals['_PLATFORMINFO_DEPLOYMENTINFOENTRY']._serialized_start=558
|
48
|
+
_globals['_PLATFORMINFO_DEPLOYMENTINFOENTRY']._serialized_end=611
|
49
|
+
_globals['_AUTHENTICATIONCONFIG']._serialized_start=614
|
50
|
+
_globals['_AUTHENTICATIONCONFIG']._serialized_end=928
|
51
|
+
_globals['_STORAGECONFIG']._serialized_start=931
|
52
|
+
_globals['_STORAGECONFIG']._serialized_end=1131
|
53
|
+
_globals['_STORAGECONFIG_BUCKETSENTRY']._serialized_start=1055
|
54
|
+
_globals['_STORAGECONFIG_BUCKETSENTRY']._serialized_end=1131
|
48
55
|
# @@protoc_insertion_point(module_scope)
|
tracdap/rt/config/job_pb2.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
3
|
# source: tracdap/config/job.proto
|
4
|
+
# Protobuf Python Version: 4.25.3
|
4
5
|
"""Generated protocol buffer code."""
|
5
|
-
from google.protobuf.internal import builder as _builder
|
6
6
|
from google.protobuf import descriptor as _descriptor
|
7
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
8
8
|
from google.protobuf import symbol_database as _symbol_database
|
9
|
+
from google.protobuf.internal import builder as _builder
|
9
10
|
# @@protoc_insertion_point(imports)
|
10
11
|
|
11
12
|
_sym_db = _symbol_database.Default()
|
@@ -18,24 +19,24 @@ from tracdap.metadata import job_pb2 as tracdap_dot_metadata_dot_job__pb2
|
|
18
19
|
|
19
20
|
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18tracdap/config/job.proto\x12\x0etracdap.config\x1a tracdap/metadata/object_id.proto\x1a\x1dtracdap/metadata/object.proto\x1a\x1atracdap/metadata/job.proto\"\xae\x04\n\tJobConfig\x12*\n\x05jobId\x18\x01 \x01(\x0b\x32\x1b.tracdap.metadata.TagHeader\x12,\n\x03job\x18\x02 \x01(\x0b\x32\x1f.tracdap.metadata.JobDefinition\x12;\n\tresources\x18\x03 \x03(\x0b\x32(.tracdap.config.JobConfig.ResourcesEntry\x12G\n\x0fresourceMapping\x18\x04 \x03(\x0b\x32..tracdap.config.JobConfig.ResourceMappingEntry\x12\x43\n\rresultMapping\x18\x05 \x03(\x0b\x32,.tracdap.config.JobConfig.ResultMappingEntry\x1aT\n\x0eResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0b\x32\".tracdap.metadata.ObjectDefinition:\x02\x38\x01\x1aS\n\x14ResourceMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x05value\x18\x02 \x01(\x0b\x32\x1b.tracdap.metadata.TagHeader:\x02\x38\x01\x1aQ\n\x12ResultMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x05value\x18\x02 \x01(\x0b\x32\x1b.tracdap.metadata.TagHeader:\x02\x38\x01\x42\x1c\n\x18org.finos.tracdap.configP\x01\x62\x06proto3')
|
20
21
|
|
21
|
-
|
22
|
-
_builder.
|
22
|
+
_globals = globals()
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'tracdap.config.job_pb2', _globals)
|
23
25
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
24
|
-
|
25
|
-
DESCRIPTOR.
|
26
|
-
|
27
|
-
_JOBCONFIG_RESOURCESENTRY.
|
28
|
-
|
29
|
-
_JOBCONFIG_RESOURCEMAPPINGENTRY.
|
30
|
-
|
31
|
-
_JOBCONFIG_RESULTMAPPINGENTRY.
|
32
|
-
|
33
|
-
_JOBCONFIG.
|
34
|
-
|
35
|
-
_JOBCONFIG_RESOURCESENTRY.
|
36
|
-
|
37
|
-
_JOBCONFIG_RESOURCEMAPPINGENTRY.
|
38
|
-
|
39
|
-
_JOBCONFIG_RESULTMAPPINGENTRY.
|
40
|
-
_JOBCONFIG_RESULTMAPPINGENTRY._serialized_end=696
|
26
|
+
_globals['DESCRIPTOR']._options = None
|
27
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\030org.finos.tracdap.configP\001'
|
28
|
+
_globals['_JOBCONFIG_RESOURCESENTRY']._options = None
|
29
|
+
_globals['_JOBCONFIG_RESOURCESENTRY']._serialized_options = b'8\001'
|
30
|
+
_globals['_JOBCONFIG_RESOURCEMAPPINGENTRY']._options = None
|
31
|
+
_globals['_JOBCONFIG_RESOURCEMAPPINGENTRY']._serialized_options = b'8\001'
|
32
|
+
_globals['_JOBCONFIG_RESULTMAPPINGENTRY']._options = None
|
33
|
+
_globals['_JOBCONFIG_RESULTMAPPINGENTRY']._serialized_options = b'8\001'
|
34
|
+
_globals['_JOBCONFIG']._serialized_start=138
|
35
|
+
_globals['_JOBCONFIG']._serialized_end=696
|
36
|
+
_globals['_JOBCONFIG_RESOURCESENTRY']._serialized_start=444
|
37
|
+
_globals['_JOBCONFIG_RESOURCESENTRY']._serialized_end=528
|
38
|
+
_globals['_JOBCONFIG_RESOURCEMAPPINGENTRY']._serialized_start=530
|
39
|
+
_globals['_JOBCONFIG_RESOURCEMAPPINGENTRY']._serialized_end=613
|
40
|
+
_globals['_JOBCONFIG_RESULTMAPPINGENTRY']._serialized_start=615
|
41
|
+
_globals['_JOBCONFIG_RESULTMAPPINGENTRY']._serialized_end=696
|
41
42
|
# @@protoc_insertion_point(module_scope)
|
tracdap/rt/config/platform.py
CHANGED
@@ -9,6 +9,29 @@ import tracdap.rt.metadata as metadata
|
|
9
9
|
from .common import * # noqa
|
10
10
|
|
11
11
|
|
12
|
+
class RoutingProtocol(_enum.Enum):
|
13
|
+
|
14
|
+
PROTOCOL_NOT_SET = 0,
|
15
|
+
|
16
|
+
HTTP = 1,
|
17
|
+
|
18
|
+
GRPC = 2,
|
19
|
+
|
20
|
+
GRPC_WEB = 3,
|
21
|
+
|
22
|
+
REST = 4,
|
23
|
+
|
24
|
+
|
25
|
+
class DeploymentLayout(_enum.Enum):
|
26
|
+
|
27
|
+
LAYOUT_NOT_SET = 0,
|
28
|
+
|
29
|
+
SANDBOX = 1,
|
30
|
+
|
31
|
+
HOSTED = 2,
|
32
|
+
|
33
|
+
CUSTOM = 3,
|
34
|
+
|
12
35
|
|
13
36
|
@_dc.dataclass
|
14
37
|
class PlatformConfig:
|
@@ -33,9 +56,11 @@ class PlatformConfig:
|
|
33
56
|
|
34
57
|
webServer: _tp.Optional[WebServerConfig] = None
|
35
58
|
|
36
|
-
|
59
|
+
gateway: _tp.Optional[GatewayConfig] = None
|
60
|
+
|
61
|
+
services: _tp.Dict[str, ServiceConfig] = _dc.field(default_factory=dict)
|
37
62
|
|
38
|
-
|
63
|
+
deployment: DeploymentConfig = None
|
39
64
|
|
40
65
|
|
41
66
|
@_dc.dataclass
|
@@ -46,16 +71,6 @@ class MetadataConfig:
|
|
46
71
|
format: metadata.MetadataFormat = metadata.MetadataFormat.METADATA_FORMAT_NOT_SET
|
47
72
|
|
48
73
|
|
49
|
-
@_dc.dataclass
|
50
|
-
class StorageConfig:
|
51
|
-
|
52
|
-
buckets: _tp.Dict[str, PluginConfig] = _dc.field(default_factory=dict)
|
53
|
-
|
54
|
-
defaultBucket: str = None
|
55
|
-
|
56
|
-
defaultFormat: str = None
|
57
|
-
|
58
|
-
|
59
74
|
@_dc.dataclass
|
60
75
|
class TenantConfig:
|
61
76
|
|
@@ -69,8 +84,6 @@ class WebServerConfig:
|
|
69
84
|
|
70
85
|
enabled: bool = None
|
71
86
|
|
72
|
-
port: int = None
|
73
|
-
|
74
87
|
contentRoot: PluginConfig = None
|
75
88
|
|
76
89
|
rewriteRules: _tp.List[WebServerRewriteRule] = _dc.field(default_factory=list)
|
@@ -97,17 +110,37 @@ class WebServerRedirect:
|
|
97
110
|
|
98
111
|
|
99
112
|
@_dc.dataclass
|
100
|
-
class
|
113
|
+
class GatewayConfig:
|
114
|
+
|
115
|
+
idleTimeout: int = None
|
116
|
+
|
117
|
+
routes: _tp.List[RouteConfig] = _dc.field(default_factory=list)
|
118
|
+
|
119
|
+
|
120
|
+
@_dc.dataclass
|
121
|
+
class RouteConfig:
|
122
|
+
|
123
|
+
routeName: str = None
|
124
|
+
|
125
|
+
routeType: RoutingProtocol = RoutingProtocol.PROTOCOL_NOT_SET
|
101
126
|
|
102
|
-
|
127
|
+
protocols: _tp.List[RoutingProtocol] = _dc.field(default_factory=list)
|
103
128
|
|
104
|
-
|
129
|
+
match: RoutingMatch = None
|
105
130
|
|
106
|
-
|
131
|
+
target: RoutingTarget = None
|
107
132
|
|
108
133
|
|
109
134
|
@_dc.dataclass
|
110
|
-
class
|
135
|
+
class RoutingMatch:
|
136
|
+
|
137
|
+
host: str = None
|
138
|
+
|
139
|
+
path: str = None
|
140
|
+
|
141
|
+
|
142
|
+
@_dc.dataclass
|
143
|
+
class RoutingTarget:
|
111
144
|
|
112
145
|
scheme: str = None
|
113
146
|
|
@@ -115,18 +148,20 @@ class InstanceConfig:
|
|
115
148
|
|
116
149
|
port: int = None
|
117
150
|
|
151
|
+
path: str = None
|
152
|
+
|
118
153
|
|
119
154
|
@_dc.dataclass
|
120
|
-
class
|
155
|
+
class ServiceConfig:
|
121
156
|
|
122
|
-
|
157
|
+
enabled: _tp.Optional[bool] = None
|
123
158
|
|
124
|
-
|
159
|
+
alias: str = None
|
125
160
|
|
126
|
-
|
161
|
+
port: int = None
|
127
162
|
|
128
163
|
|
129
164
|
@_dc.dataclass
|
130
|
-
class
|
165
|
+
class DeploymentConfig:
|
131
166
|
|
132
|
-
|
167
|
+
layout: DeploymentLayout = DeploymentLayout.LAYOUT_NOT_SET
|