modal 0.62.115__py3-none-any.whl → 0.72.13__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.
- modal/__init__.py +13 -9
- modal/__main__.py +41 -3
- modal/_clustered_functions.py +80 -0
- modal/_clustered_functions.pyi +22 -0
- modal/_container_entrypoint.py +402 -398
- modal/_ipython.py +3 -13
- modal/_location.py +17 -10
- modal/_output.py +243 -99
- modal/_pty.py +2 -2
- modal/_resolver.py +55 -60
- modal/_resources.py +26 -7
- modal/_runtime/__init__.py +1 -0
- modal/_runtime/asgi.py +519 -0
- modal/_runtime/container_io_manager.py +1025 -0
- modal/{execution_context.py → _runtime/execution_context.py} +11 -2
- modal/_runtime/telemetry.py +169 -0
- modal/_runtime/user_code_imports.py +356 -0
- modal/_serialization.py +123 -6
- modal/_traceback.py +47 -187
- modal/_tunnel.py +50 -14
- modal/_tunnel.pyi +19 -36
- modal/_utils/app_utils.py +3 -17
- modal/_utils/async_utils.py +386 -104
- modal/_utils/blob_utils.py +157 -186
- modal/_utils/bytes_io_segment_payload.py +97 -0
- modal/_utils/deprecation.py +89 -0
- modal/_utils/docker_utils.py +98 -0
- modal/_utils/function_utils.py +299 -98
- modal/_utils/grpc_testing.py +47 -34
- modal/_utils/grpc_utils.py +54 -21
- modal/_utils/hash_utils.py +51 -10
- modal/_utils/http_utils.py +39 -9
- modal/_utils/logger.py +2 -1
- modal/_utils/mount_utils.py +34 -16
- modal/_utils/name_utils.py +58 -0
- modal/_utils/package_utils.py +14 -1
- modal/_utils/pattern_utils.py +205 -0
- modal/_utils/rand_pb_testing.py +3 -3
- modal/_utils/shell_utils.py +15 -49
- modal/_vendor/a2wsgi_wsgi.py +62 -72
- modal/_vendor/cloudpickle.py +1 -1
- modal/_watcher.py +12 -10
- modal/app.py +561 -323
- modal/app.pyi +474 -262
- modal/call_graph.py +7 -6
- modal/cli/_download.py +22 -6
- modal/cli/_traceback.py +200 -0
- modal/cli/app.py +203 -42
- modal/cli/config.py +12 -5
- modal/cli/container.py +61 -13
- modal/cli/dict.py +128 -0
- modal/cli/entry_point.py +26 -13
- modal/cli/environment.py +40 -9
- modal/cli/import_refs.py +21 -48
- modal/cli/launch.py +28 -14
- modal/cli/network_file_system.py +57 -21
- modal/cli/profile.py +1 -1
- modal/cli/programs/run_jupyter.py +34 -9
- modal/cli/programs/vscode.py +58 -8
- modal/cli/queues.py +131 -0
- modal/cli/run.py +199 -96
- modal/cli/secret.py +5 -4
- modal/cli/token.py +7 -2
- modal/cli/utils.py +74 -8
- modal/cli/volume.py +97 -56
- modal/client.py +248 -144
- modal/client.pyi +156 -124
- modal/cloud_bucket_mount.py +43 -30
- modal/cloud_bucket_mount.pyi +32 -25
- modal/cls.py +528 -141
- modal/cls.pyi +189 -145
- modal/config.py +32 -15
- modal/container_process.py +177 -0
- modal/container_process.pyi +82 -0
- modal/dict.py +50 -54
- modal/dict.pyi +120 -164
- modal/environments.py +106 -5
- modal/environments.pyi +77 -25
- modal/exception.py +30 -43
- modal/experimental.py +62 -2
- modal/file_io.py +537 -0
- modal/file_io.pyi +235 -0
- modal/file_pattern_matcher.py +196 -0
- modal/functions.py +846 -428
- modal/functions.pyi +446 -387
- modal/gpu.py +57 -44
- modal/image.py +943 -417
- modal/image.pyi +584 -245
- modal/io_streams.py +434 -0
- modal/io_streams.pyi +122 -0
- modal/mount.py +223 -90
- modal/mount.pyi +241 -243
- modal/network_file_system.py +85 -86
- modal/network_file_system.pyi +151 -110
- modal/object.py +66 -36
- modal/object.pyi +166 -143
- modal/output.py +63 -0
- modal/parallel_map.py +73 -47
- modal/parallel_map.pyi +51 -63
- modal/partial_function.py +272 -107
- modal/partial_function.pyi +219 -120
- modal/proxy.py +15 -12
- modal/proxy.pyi +3 -8
- modal/queue.py +96 -72
- modal/queue.pyi +210 -135
- modal/requirements/2024.04.txt +2 -1
- modal/requirements/2024.10.txt +16 -0
- modal/requirements/README.md +21 -0
- modal/requirements/base-images.json +22 -0
- modal/retries.py +45 -4
- modal/runner.py +325 -203
- modal/runner.pyi +124 -110
- modal/running_app.py +27 -4
- modal/sandbox.py +509 -231
- modal/sandbox.pyi +396 -169
- modal/schedule.py +2 -2
- modal/scheduler_placement.py +20 -3
- modal/secret.py +41 -25
- modal/secret.pyi +62 -42
- modal/serving.py +39 -49
- modal/serving.pyi +37 -43
- modal/stream_type.py +15 -0
- modal/token_flow.py +5 -3
- modal/token_flow.pyi +37 -32
- modal/volume.py +123 -137
- modal/volume.pyi +228 -221
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/METADATA +5 -5
- modal-0.72.13.dist-info/RECORD +174 -0
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/top_level.txt +0 -1
- modal_docs/gen_reference_docs.py +3 -1
- modal_docs/mdmd/mdmd.py +0 -1
- modal_docs/mdmd/signatures.py +1 -2
- modal_global_objects/images/base_images.py +28 -0
- modal_global_objects/mounts/python_standalone.py +2 -2
- modal_proto/__init__.py +1 -1
- modal_proto/api.proto +1231 -531
- modal_proto/api_grpc.py +750 -430
- modal_proto/api_pb2.py +2102 -1176
- modal_proto/api_pb2.pyi +8859 -0
- modal_proto/api_pb2_grpc.py +1329 -675
- modal_proto/api_pb2_grpc.pyi +1416 -0
- modal_proto/modal_api_grpc.py +149 -0
- modal_proto/modal_options_grpc.py +3 -0
- modal_proto/options_pb2.pyi +20 -0
- modal_proto/options_pb2_grpc.pyi +7 -0
- modal_proto/py.typed +0 -0
- modal_version/__init__.py +1 -1
- modal_version/_version_generated.py +2 -2
- modal/_asgi.py +0 -370
- modal/_container_exec.py +0 -128
- modal/_container_io_manager.py +0 -646
- modal/_container_io_manager.pyi +0 -412
- modal/_sandbox_shell.py +0 -49
- modal/app_utils.py +0 -20
- modal/app_utils.pyi +0 -17
- modal/execution_context.pyi +0 -37
- modal/shared_volume.py +0 -23
- modal/shared_volume.pyi +0 -24
- modal-0.62.115.dist-info/RECORD +0 -207
- modal_global_objects/images/conda.py +0 -15
- modal_global_objects/images/debian_slim.py +0 -15
- modal_global_objects/images/micromamba.py +0 -15
- test/__init__.py +0 -1
- test/aio_test.py +0 -12
- test/async_utils_test.py +0 -279
- test/blob_test.py +0 -67
- test/cli_imports_test.py +0 -149
- test/cli_test.py +0 -674
- test/client_test.py +0 -203
- test/cloud_bucket_mount_test.py +0 -22
- test/cls_test.py +0 -636
- test/config_test.py +0 -149
- test/conftest.py +0 -1485
- test/container_app_test.py +0 -50
- test/container_test.py +0 -1405
- test/cpu_test.py +0 -23
- test/decorator_test.py +0 -85
- test/deprecation_test.py +0 -34
- test/dict_test.py +0 -51
- test/e2e_test.py +0 -68
- test/error_test.py +0 -7
- test/function_serialization_test.py +0 -32
- test/function_test.py +0 -791
- test/function_utils_test.py +0 -101
- test/gpu_test.py +0 -159
- test/grpc_utils_test.py +0 -82
- test/helpers.py +0 -47
- test/image_test.py +0 -814
- test/live_reload_test.py +0 -80
- test/lookup_test.py +0 -70
- test/mdmd_test.py +0 -329
- test/mount_test.py +0 -162
- test/mounted_files_test.py +0 -327
- test/network_file_system_test.py +0 -188
- test/notebook_test.py +0 -66
- test/object_test.py +0 -41
- test/package_utils_test.py +0 -25
- test/queue_test.py +0 -115
- test/resolver_test.py +0 -59
- test/retries_test.py +0 -67
- test/runner_test.py +0 -85
- test/sandbox_test.py +0 -191
- test/schedule_test.py +0 -15
- test/scheduler_placement_test.py +0 -57
- test/secret_test.py +0 -89
- test/serialization_test.py +0 -50
- test/stub_composition_test.py +0 -10
- test/stub_test.py +0 -361
- test/test_asgi_wrapper.py +0 -234
- test/token_flow_test.py +0 -18
- test/traceback_test.py +0 -135
- test/tunnel_test.py +0 -29
- test/utils_test.py +0 -88
- test/version_test.py +0 -14
- test/volume_test.py +0 -397
- test/watcher_test.py +0 -58
- test/webhook_test.py +0 -145
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/LICENSE +0 -0
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/WHEEL +0 -0
- {modal-0.62.115.dist-info → modal-0.72.13.dist-info}/entry_points.txt +0 -0
modal_proto/api.proto
CHANGED
@@ -18,6 +18,7 @@ enum AppDisconnectReason {
|
|
18
18
|
APP_DISCONNECT_REASON_KEYBOARD_INTERRUPT = 2;
|
19
19
|
APP_DISCONNECT_REASON_ENTRYPOINT_COMPLETED = 3;
|
20
20
|
APP_DISCONNECT_REASON_DEPLOYMENT_EXCEPTION = 4;
|
21
|
+
APP_DISCONNECT_REASON_REMOTE_EXCEPTION = 5;
|
21
22
|
}
|
22
23
|
|
23
24
|
// NOTE: make sure to update the frontend if we add a new state here
|
@@ -49,7 +50,7 @@ enum AppState {
|
|
49
50
|
APP_STATE_DETACHED_DISCONNECTED = 8;
|
50
51
|
|
51
52
|
// App is derived from another workspace. Acts as a static, immutable group of functions.
|
52
|
-
APP_STATE_DERIVED = 9;
|
53
|
+
APP_STATE_DERIVED = 9 [deprecated=true];
|
53
54
|
}
|
54
55
|
|
55
56
|
enum AppStopSource {
|
@@ -77,37 +78,24 @@ enum CheckpointStatus {
|
|
77
78
|
enum ClientType {
|
78
79
|
CLIENT_TYPE_UNSPECIFIED = 0;
|
79
80
|
CLIENT_TYPE_CLIENT = 1;
|
80
|
-
CLIENT_TYPE_WORKER = 2
|
81
|
+
CLIENT_TYPE_WORKER = 2;
|
81
82
|
CLIENT_TYPE_CONTAINER = 3;
|
82
|
-
CLIENT_TYPE_SERVER = 4 [deprecated=true];
|
83
83
|
CLIENT_TYPE_WEB_SERVER = 5;
|
84
84
|
}
|
85
85
|
|
86
|
-
message CloudBucketMount {
|
87
|
-
enum BucketType {
|
88
|
-
UNSPECIFIED = 0;
|
89
|
-
S3 = 1;
|
90
|
-
R2 = 2;
|
91
|
-
GCP = 3;
|
92
|
-
}
|
93
|
-
|
94
|
-
string bucket_name = 1;
|
95
|
-
string mount_path = 2;
|
96
|
-
string credentials_secret_id = 3;
|
97
|
-
bool read_only = 4;
|
98
|
-
BucketType bucket_type = 5;
|
99
|
-
bool requester_pays = 6;
|
100
|
-
optional string bucket_endpoint_url = 7;
|
101
|
-
}
|
102
|
-
|
103
86
|
enum CloudProvider {
|
104
87
|
CLOUD_PROVIDER_UNSPECIFIED = 0;
|
105
88
|
CLOUD_PROVIDER_AWS = 1;
|
106
89
|
CLOUD_PROVIDER_GCP = 2;
|
107
90
|
CLOUD_PROVIDER_AUTO = 3;
|
108
91
|
CLOUD_PROVIDER_OCI = 4;
|
109
|
-
|
110
|
-
|
92
|
+
reserved 5, 6, 7, 8; // now unused internal experimental values
|
93
|
+
}
|
94
|
+
|
95
|
+
enum DNSRecordType {
|
96
|
+
DNS_RECORD_TYPE_A = 0;
|
97
|
+
DNS_RECORD_TYPE_TXT = 1;
|
98
|
+
DNS_RECORD_TYPE_CNAME = 2;
|
111
99
|
}
|
112
100
|
|
113
101
|
// Which data format a binary message is encoded with.
|
@@ -124,10 +112,11 @@ enum DeploymentNamespace {
|
|
124
112
|
DEPLOYMENT_NAMESPACE_GLOBAL = 3;
|
125
113
|
}
|
126
114
|
|
127
|
-
enum
|
128
|
-
|
129
|
-
|
130
|
-
|
115
|
+
enum ExecOutputOption {
|
116
|
+
EXEC_OUTPUT_OPTION_UNSPECIFIED = 0;
|
117
|
+
EXEC_OUTPUT_OPTION_DEVNULL = 1;
|
118
|
+
EXEC_OUTPUT_OPTION_PIPE = 2;
|
119
|
+
EXEC_OUTPUT_OPTION_STDOUT = 3;
|
131
120
|
}
|
132
121
|
|
133
122
|
enum FileDescriptor {
|
@@ -137,18 +126,12 @@ enum FileDescriptor {
|
|
137
126
|
FILE_DESCRIPTOR_INFO = 3;
|
138
127
|
}
|
139
128
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
SYMLINK = 3;
|
147
|
-
}
|
148
|
-
string path = 1;
|
149
|
-
FileType type = 2;
|
150
|
-
uint64 mtime = 3;
|
151
|
-
uint64 size = 4;
|
129
|
+
enum FunctionCallInvocationType {
|
130
|
+
FUNCTION_CALL_INVOCATION_TYPE_UNSPECIFIED = 0;
|
131
|
+
FUNCTION_CALL_INVOCATION_TYPE_SYNC_LEGACY = 1;
|
132
|
+
FUNCTION_CALL_INVOCATION_TYPE_ASYNC_LEGACY = 2;
|
133
|
+
FUNCTION_CALL_INVOCATION_TYPE_ASYNC = 3;
|
134
|
+
FUNCTION_CALL_INVOCATION_TYPE_SYNC = 4;
|
152
135
|
}
|
153
136
|
|
154
137
|
enum FunctionCallType {
|
@@ -163,12 +146,11 @@ enum GPUType {
|
|
163
146
|
GPU_TYPE_A100 = 2;
|
164
147
|
GPU_TYPE_A10G = 3;
|
165
148
|
GPU_TYPE_ANY = 4;
|
166
|
-
GPU_TYPE_A100_20G = 5 [deprecated=true];
|
167
|
-
GPU_TYPE_A100_40GB_MANY = 6 [deprecated=true];
|
168
|
-
GPU_TYPE_INFERENTIA2 = 7 [deprecated=true];
|
169
149
|
GPU_TYPE_A100_80GB = 8;
|
170
150
|
GPU_TYPE_L4 = 9;
|
171
151
|
GPU_TYPE_H100 = 10;
|
152
|
+
GPU_TYPE_L40S = 11;
|
153
|
+
GPU_TYPE_H200 = 12;
|
172
154
|
}
|
173
155
|
|
174
156
|
enum ObjectCreationType {
|
@@ -180,11 +162,31 @@ enum ObjectCreationType {
|
|
180
162
|
OBJECT_CREATION_TYPE_EPHEMERAL = 5;
|
181
163
|
}
|
182
164
|
|
165
|
+
enum ParameterType {
|
166
|
+
PARAM_TYPE_UNSPECIFIED = 0;
|
167
|
+
PARAM_TYPE_STRING = 1;
|
168
|
+
PARAM_TYPE_INT = 2;
|
169
|
+
}
|
170
|
+
|
183
171
|
enum ProgressType {
|
184
172
|
IMAGE_SNAPSHOT_UPLOAD = 0; // TODO(erikbern): shouldn't be zero, and needs prefix
|
185
173
|
FUNCTION_QUEUED = 1; // TODO(erikbern): needs_prefix
|
186
174
|
}
|
187
175
|
|
176
|
+
enum ProxyIpStatus {
|
177
|
+
PROXY_IP_STATUS_UNSPECIFIED = 0;
|
178
|
+
PROXY_IP_STATUS_CREATING = 1;
|
179
|
+
PROXY_IP_STATUS_ONLINE = 2;
|
180
|
+
PROXY_IP_STATUS_TERMINATED = 3;
|
181
|
+
PROXY_IP_STATUS_UNHEALTHY = 4;
|
182
|
+
}
|
183
|
+
|
184
|
+
enum ProxyType {
|
185
|
+
PROXY_TYPE_UNSPECIFIED = 0;
|
186
|
+
PROXY_TYPE_LEGACY = 1;
|
187
|
+
PROXY_TYPE_VPROX = 2;
|
188
|
+
}
|
189
|
+
|
188
190
|
enum RateLimitInterval {
|
189
191
|
RATE_LIMIT_INTERVAL_UNSPECIFIED = 0;
|
190
192
|
RATE_LIMIT_INTERVAL_SECOND = 1;
|
@@ -199,6 +201,29 @@ enum RegistryAuthType {
|
|
199
201
|
REGISTRY_AUTH_TYPE_STATIC_CREDS = 4;
|
200
202
|
}
|
201
203
|
|
204
|
+
enum SeekWhence {
|
205
|
+
SEEK_SET = 0;
|
206
|
+
SEEK_CUR = 1;
|
207
|
+
SEEK_END = 2;
|
208
|
+
}
|
209
|
+
|
210
|
+
enum SystemErrorCode {
|
211
|
+
SYSTEM_ERROR_CODE_UNSPECIFIED = 0;
|
212
|
+
SYSTEM_ERROR_CODE_PERM = 1; // EPERM: Operation not permitted
|
213
|
+
SYSTEM_ERROR_CODE_NOENT = 2; // ENOENT: No such file or directory
|
214
|
+
SYSTEM_ERROR_CODE_IO = 5; // EIO: Input/output error
|
215
|
+
SYSTEM_ERROR_CODE_NXIO = 6; // ENXIO: No such device or address
|
216
|
+
SYSTEM_ERROR_CODE_NOMEM = 12; // ENOMEM: Out of memory
|
217
|
+
SYSTEM_ERROR_CODE_ACCES = 13; // EACCES: Permission denied
|
218
|
+
SYSTEM_ERROR_CODE_EXIST = 17; // EEXIST: File exists
|
219
|
+
SYSTEM_ERROR_CODE_NOTDIR = 20; // ENOTDIR: Not a directory
|
220
|
+
SYSTEM_ERROR_CODE_ISDIR = 21; // EISDIR: Is a directory
|
221
|
+
SYSTEM_ERROR_CODE_INVAL = 22; // EINVAL: Invalid argument
|
222
|
+
SYSTEM_ERROR_CODE_MFILE = 24; // EMFILE: Too many open files
|
223
|
+
SYSTEM_ERROR_CODE_FBIG = 27; // EFBIG: File too large
|
224
|
+
SYSTEM_ERROR_CODE_NOSPC = 28; // ENOSPC: No space left on device
|
225
|
+
}
|
226
|
+
|
202
227
|
enum TaskState {
|
203
228
|
TASK_STATE_UNSPECIFIED = 0;
|
204
229
|
TASK_STATE_CREATED = 6;
|
@@ -214,6 +239,20 @@ enum TaskState {
|
|
214
239
|
TASK_STATE_LOADING_CHECKPOINT_IMAGE = 11;
|
215
240
|
}
|
216
241
|
|
242
|
+
enum VolumeFsVersion {
|
243
|
+
VOLUME_FS_VERSION_UNSPECIFIED = 0;
|
244
|
+
VOLUME_FS_VERSION_V1 = 1;
|
245
|
+
VOLUME_FS_VERSION_V2 = 2;
|
246
|
+
}
|
247
|
+
|
248
|
+
enum WebhookAsyncMode {
|
249
|
+
WEBHOOK_ASYNC_MODE_UNSPECIFIED = 0;
|
250
|
+
reserved 1; // unused REDIRECT mode
|
251
|
+
WEBHOOK_ASYNC_MODE_DISABLED = 2; // No longer used by client
|
252
|
+
WEBHOOK_ASYNC_MODE_TRIGGER = 3; // No longer used by client (previously used when wait_for_response=False)
|
253
|
+
WEBHOOK_ASYNC_MODE_AUTO = 4; // The default
|
254
|
+
}
|
255
|
+
|
217
256
|
enum WebhookType {
|
218
257
|
WEBHOOK_TYPE_UNSPECIFIED = 0;
|
219
258
|
WEBHOOK_TYPE_ASGI_APP = 1;
|
@@ -222,14 +261,6 @@ enum WebhookType {
|
|
222
261
|
WEBHOOK_TYPE_WEB_SERVER = 4;
|
223
262
|
}
|
224
263
|
|
225
|
-
enum WebhookAsyncMode {
|
226
|
-
WEBHOOK_ASYNC_MODE_UNSPECIFIED = 0;
|
227
|
-
reserved 1; // unused REDIRECT mode
|
228
|
-
WEBHOOK_ASYNC_MODE_DISABLED = 2; // no redirect, fail after timeout
|
229
|
-
WEBHOOK_ASYNC_MODE_TRIGGER = 3; // return immediately, roughly same as old wait_for_response=False
|
230
|
-
WEBHOOK_ASYNC_MODE_AUTO = 4; // redirect to polling endpoint if execution time nears the http timeout
|
231
|
-
}
|
232
|
-
|
233
264
|
message AppClientDisconnectRequest {
|
234
265
|
string app_id = 1;
|
235
266
|
AppDisconnectReason reason = 2;
|
@@ -239,46 +270,49 @@ message AppClientDisconnectRequest {
|
|
239
270
|
message AppCreateRequest {
|
240
271
|
string client_id = 1 [ (modal.options.audit_target_attr) = true ];
|
241
272
|
string description = 2; // Human readable label for the app
|
242
|
-
bool detach = 3 [deprecated=true]; // replaced by app_state in 0.55.3904
|
243
|
-
bool initializing = 4 [deprecated=true]; // replaced by app_state in 0.55.3904
|
244
273
|
string environment_name = 5;
|
245
274
|
AppState app_state = 6;
|
246
275
|
}
|
247
276
|
|
248
277
|
message AppCreateResponse {
|
249
278
|
string app_id = 1;
|
250
|
-
string
|
251
|
-
|
252
|
-
|
253
|
-
message AppStopRequest {
|
254
|
-
string app_id = 1 [ (modal.options.audit_target_attr) = true ];
|
255
|
-
AppStopSource source = 2;
|
279
|
+
string app_page_url = 2;
|
280
|
+
string app_logs_url = 3;
|
256
281
|
}
|
257
282
|
|
258
|
-
|
259
283
|
message AppDeployRequest {
|
260
284
|
string app_id = 1 [ (modal.options.audit_target_attr) = true ];
|
261
285
|
DeploymentNamespace namespace = 2;
|
262
286
|
string name = 3;
|
263
287
|
string object_entity = 4;
|
264
288
|
AppDeployVisibility visibility = 5;
|
289
|
+
string tag = 6;
|
265
290
|
}
|
266
291
|
|
267
292
|
message AppDeployResponse {
|
268
293
|
string url = 1;
|
269
294
|
}
|
270
295
|
|
271
|
-
message
|
272
|
-
string
|
273
|
-
|
274
|
-
string
|
275
|
-
|
296
|
+
message AppDeploymentHistory {
|
297
|
+
string app_id = 1;
|
298
|
+
uint32 version = 2;
|
299
|
+
string client_version = 3;
|
300
|
+
double deployed_at = 4;
|
301
|
+
string deployed_by = 5;
|
302
|
+
string deployed_by_avatar_url = 9;
|
303
|
+
string tag = 6;
|
304
|
+
uint32 rollback_version = 7;
|
305
|
+
bool rollback_allowed = 8;
|
276
306
|
}
|
277
307
|
|
278
|
-
message
|
308
|
+
message AppDeploymentHistoryRequest {
|
279
309
|
string app_id = 1;
|
280
310
|
}
|
281
311
|
|
312
|
+
message AppDeploymentHistoryResponse {
|
313
|
+
repeated AppDeploymentHistory app_deployment_histories = 1;
|
314
|
+
}
|
315
|
+
|
282
316
|
message AppGetByDeploymentNameRequest {
|
283
317
|
DeploymentNamespace namespace = 1;
|
284
318
|
string name = 2;
|
@@ -289,6 +323,14 @@ message AppGetByDeploymentNameResponse {
|
|
289
323
|
string app_id = 1;
|
290
324
|
}
|
291
325
|
|
326
|
+
message AppGetLayoutRequest {
|
327
|
+
string app_id = 1;
|
328
|
+
}
|
329
|
+
|
330
|
+
message AppGetLayoutResponse {
|
331
|
+
AppLayout app_layout = 1;
|
332
|
+
}
|
333
|
+
|
292
334
|
message AppGetLogsRequest {
|
293
335
|
string app_id = 1;
|
294
336
|
float timeout = 2;
|
@@ -299,44 +341,87 @@ message AppGetLogsRequest {
|
|
299
341
|
FileDescriptor file_descriptor = 8;
|
300
342
|
}
|
301
343
|
|
302
|
-
message AppGetObjectsRequest {
|
303
|
-
string app_id = 1;
|
304
|
-
bool include_unindexed = 2;
|
305
|
-
}
|
306
|
-
|
307
344
|
message AppGetObjectsItem {
|
308
345
|
string tag = 1;
|
309
346
|
Object object = 6;
|
310
347
|
}
|
311
348
|
|
349
|
+
message AppGetObjectsRequest {
|
350
|
+
string app_id = 1;
|
351
|
+
bool include_unindexed = 2;
|
352
|
+
bool only_class_function = 3; // True starting with 0.67.x clients, which don't create method placeholder functions
|
353
|
+
}
|
354
|
+
|
312
355
|
message AppGetObjectsResponse {
|
313
356
|
repeated AppGetObjectsItem items = 2;
|
314
357
|
}
|
315
358
|
|
359
|
+
message AppGetOrCreateRequest {
|
360
|
+
string app_name = 1;
|
361
|
+
string environment_name = 2;
|
362
|
+
ObjectCreationType object_creation_type = 3;
|
363
|
+
}
|
364
|
+
|
365
|
+
message AppGetOrCreateResponse {
|
366
|
+
string app_id = 1;
|
367
|
+
}
|
368
|
+
|
316
369
|
message AppHeartbeatRequest {
|
317
370
|
string app_id = 1;
|
318
371
|
}
|
319
372
|
|
373
|
+
message AppLayout {
|
374
|
+
repeated Object objects = 1;
|
375
|
+
map<string, string> function_ids = 2; // tag -> function id
|
376
|
+
map<string, string> class_ids = 3; // tag -> class id
|
377
|
+
}
|
378
|
+
|
320
379
|
message AppListRequest {
|
321
380
|
string environment_name = 1;
|
322
381
|
}
|
323
382
|
|
324
383
|
message AppListResponse {
|
325
|
-
|
384
|
+
message AppListItem {
|
385
|
+
string app_id = 1;
|
386
|
+
string description = 3;
|
387
|
+
AppState state = 4;
|
388
|
+
double created_at = 5;
|
389
|
+
double stopped_at = 6;
|
390
|
+
int32 n_running_tasks = 8;
|
391
|
+
string name = 10;
|
392
|
+
}
|
393
|
+
repeated AppListItem apps = 1;
|
326
394
|
}
|
327
395
|
|
328
|
-
message
|
329
|
-
|
330
|
-
string
|
331
|
-
string object_tag = 4;
|
332
|
-
string object_id = 5;
|
333
|
-
string object_entity = 6;
|
334
|
-
string environment_name = 7;
|
396
|
+
message AppLookupRequest {
|
397
|
+
string app_name = 2;
|
398
|
+
string environment_name = 3;
|
335
399
|
}
|
336
400
|
|
337
|
-
message
|
338
|
-
|
339
|
-
|
401
|
+
message AppLookupResponse {
|
402
|
+
string app_id = 1;
|
403
|
+
}
|
404
|
+
|
405
|
+
message AppPublishRequest {
|
406
|
+
string app_id = 1 [ (modal.options.audit_target_attr) = true ];
|
407
|
+
string name = 2;
|
408
|
+
string deployment_tag = 3; // Additional metadata to identify a deployment
|
409
|
+
AppState app_state = 4; // Published app will be in this state
|
410
|
+
map<string, string> function_ids = 5; // function_name -> function_id
|
411
|
+
map<string, string> class_ids = 6; // class_name -> class_id
|
412
|
+
map<string, string> definition_ids = 7; // function_id -> definition_id
|
413
|
+
uint32 rollback_version = 8; // Unused by client, but used internally
|
414
|
+
string client_version = 9; // Unused by client, but used internally
|
415
|
+
}
|
416
|
+
|
417
|
+
message AppPublishResponse {
|
418
|
+
string url = 1;
|
419
|
+
repeated Warning server_warnings = 3;
|
420
|
+
}
|
421
|
+
|
422
|
+
message AppRollbackRequest {
|
423
|
+
string app_id = 1;
|
424
|
+
int32 version = 2; // signed as we support negative "roll back n versions" requests
|
340
425
|
}
|
341
426
|
|
342
427
|
message AppSetObjectsRequest {
|
@@ -345,19 +430,12 @@ message AppSetObjectsRequest {
|
|
345
430
|
string client_id = 3;
|
346
431
|
repeated string unindexed_object_ids = 4;
|
347
432
|
AppState new_app_state = 5; // promotes an app from initializing to this new state
|
348
|
-
|
433
|
+
reserved 6;
|
349
434
|
}
|
350
435
|
|
351
|
-
message
|
352
|
-
string app_id = 1;
|
353
|
-
|
354
|
-
AppState state = 4;
|
355
|
-
double created_at = 5;
|
356
|
-
double stopped_at = 6;
|
357
|
-
int32 n_running_tasks = 8;
|
358
|
-
string object_entity = 9;
|
359
|
-
string name = 10;
|
360
|
-
double deployed_at = 11;
|
436
|
+
message AppStopRequest {
|
437
|
+
string app_id = 1 [ (modal.options.audit_target_attr) = true ];
|
438
|
+
AppStopSource source = 2;
|
361
439
|
}
|
362
440
|
|
363
441
|
// A web endpoint connection-related message.
|
@@ -509,16 +587,33 @@ message BlobGetResponse {
|
|
509
587
|
string download_url = 1;
|
510
588
|
}
|
511
589
|
|
590
|
+
message BuildFunction {
|
591
|
+
string definition = 1;
|
592
|
+
bytes globals = 2;
|
593
|
+
FunctionInput input = 3;
|
594
|
+
}
|
595
|
+
|
596
|
+
message CancelInputEvent {
|
597
|
+
repeated string input_ids = 1;
|
598
|
+
bool terminate_containers = 2;
|
599
|
+
}
|
600
|
+
|
512
601
|
message CheckpointInfo {
|
513
602
|
string checksum = 1;
|
514
603
|
CheckpointStatus status = 2;
|
515
604
|
string checkpoint_id = 3;
|
605
|
+
string runtime_fingerprint = 4;
|
606
|
+
int64 size = 5;
|
607
|
+
bool checksum_is_file_index = 6;
|
608
|
+
string original_task_id = 7;
|
516
609
|
}
|
517
610
|
|
518
611
|
message ClassCreateRequest {
|
519
612
|
string app_id = 1 [ (modal.options.audit_target_attr) = true ];
|
520
613
|
string existing_class_id = 2;
|
521
614
|
repeated ClassMethod methods = 3;
|
615
|
+
reserved 4; // removed class_function_id
|
616
|
+
bool only_class_function = 5; // True starting with 0.67.x clients, which don't create method placeholder functions
|
522
617
|
}
|
523
618
|
|
524
619
|
message ClassCreateResponse {
|
@@ -534,15 +629,19 @@ message ClassGetRequest {
|
|
534
629
|
|
535
630
|
bool lookup_published = 8; // Lookup class on app published by another workspace
|
536
631
|
string workspace_name = 9;
|
632
|
+
bool only_class_function = 10; // True starting with 0.67.x clients, which don't create method placeholder functions
|
537
633
|
}
|
538
634
|
|
539
635
|
message ClassGetResponse {
|
540
636
|
string class_id = 1;
|
541
637
|
ClassHandleMetadata handle_metadata = 2;
|
638
|
+
repeated Warning server_warnings = 3;
|
542
639
|
}
|
543
640
|
|
544
641
|
message ClassHandleMetadata {
|
545
642
|
repeated ClassMethod methods = 1;
|
643
|
+
string class_function_id = 2;
|
644
|
+
FunctionHandleMetadata class_function_metadata = 3;
|
546
645
|
}
|
547
646
|
|
548
647
|
message ClassMethod {
|
@@ -553,26 +652,67 @@ message ClassMethod {
|
|
553
652
|
FunctionHandleMetadata function_handle_metadata = 3;
|
554
653
|
}
|
555
654
|
|
556
|
-
message
|
557
|
-
|
558
|
-
|
655
|
+
message ClassParameterInfo {
|
656
|
+
enum ParameterSerializationFormat {
|
657
|
+
PARAM_SERIALIZATION_FORMAT_UNSPECIFIED = 0;
|
658
|
+
PARAM_SERIALIZATION_FORMAT_PICKLE = 1; // legacy format - pickle of (args, kwargs) tuple
|
659
|
+
PARAM_SERIALIZATION_FORMAT_PROTO = 2; // new format using api.FunctionParameterSet
|
660
|
+
}
|
661
|
+
ParameterSerializationFormat format = 1;
|
662
|
+
repeated ClassParameterSpec schema = 2; // only set for PARAM_SERIALIZATION_FORMAT_PROTO
|
663
|
+
}
|
664
|
+
|
665
|
+
message ClassParameterSet {
|
666
|
+
// NOTE: adding additional *fields* here can invalidate function lookups
|
667
|
+
// since we use the serialized message as the bound function identifier
|
668
|
+
// for parameter-bound classes. Modify with *caution*
|
669
|
+
repeated ClassParameterValue parameters = 1;
|
670
|
+
}
|
671
|
+
|
672
|
+
message ClassParameterSpec {
|
673
|
+
string name = 1;
|
674
|
+
ParameterType type = 2;
|
675
|
+
bool has_default = 3;
|
676
|
+
oneof default_oneof {
|
677
|
+
string string_default = 4;
|
678
|
+
int64 int_default = 5;
|
679
|
+
}
|
559
680
|
}
|
560
681
|
|
561
|
-
message
|
562
|
-
|
563
|
-
|
564
|
-
|
682
|
+
message ClassParameterValue {
|
683
|
+
// NOTE: adding additional *fields* here can invalidate function lookups
|
684
|
+
// since we use the serialized message as the bound function identifier
|
685
|
+
// for parameter-bound classes. Modify with *caution*
|
686
|
+
string name = 1;
|
687
|
+
ParameterType type = 2;
|
688
|
+
oneof value_oneof {
|
689
|
+
string string_value = 3;
|
690
|
+
int64 int_value = 4;
|
691
|
+
}
|
565
692
|
}
|
566
693
|
|
567
694
|
message ClientHelloResponse {
|
568
695
|
string warning = 1;
|
569
|
-
string image_builder_version = 2;
|
696
|
+
string image_builder_version = 2; // Deprecated, no longer used in client
|
697
|
+
repeated Warning server_warnings = 4;
|
570
698
|
}
|
571
699
|
|
572
|
-
message
|
573
|
-
|
574
|
-
|
575
|
-
|
700
|
+
message CloudBucketMount {
|
701
|
+
enum BucketType {
|
702
|
+
UNSPECIFIED = 0;
|
703
|
+
S3 = 1;
|
704
|
+
R2 = 2;
|
705
|
+
GCP = 3;
|
706
|
+
}
|
707
|
+
|
708
|
+
string bucket_name = 1;
|
709
|
+
string mount_path = 2;
|
710
|
+
string credentials_secret_id = 3;
|
711
|
+
bool read_only = 4;
|
712
|
+
BucketType bucket_type = 5;
|
713
|
+
bool requester_pays = 6;
|
714
|
+
optional string bucket_endpoint_url = 7;
|
715
|
+
optional string key_prefix = 8;
|
576
716
|
}
|
577
717
|
|
578
718
|
message ContainerArguments { // This is used to pass data from the worker to the container
|
@@ -586,24 +726,25 @@ message ContainerArguments { // This is used to pass data from the worker to th
|
|
586
726
|
string runtime = 11;
|
587
727
|
string environment_name = 13;
|
588
728
|
optional string checkpoint_id = 14;
|
729
|
+
AppLayout app_layout = 15;
|
589
730
|
}
|
590
731
|
|
591
|
-
message
|
592
|
-
|
593
|
-
}
|
594
|
-
|
595
|
-
message ContainerHeartbeatResponse {
|
596
|
-
optional CancelInputEvent cancel_input_event = 1;
|
732
|
+
message ContainerCheckpointRequest {
|
733
|
+
string checkpoint_id = 1;
|
597
734
|
}
|
598
735
|
|
599
|
-
message
|
600
|
-
string
|
601
|
-
|
602
|
-
|
736
|
+
message ContainerExecGetOutputRequest {
|
737
|
+
string exec_id = 1;
|
738
|
+
float timeout = 2;
|
739
|
+
uint64 last_batch_index = 3;
|
740
|
+
FileDescriptor file_descriptor = 4;
|
741
|
+
// Old clients (up to 0.65.39) expect string output. Newer clients stream raw bytes
|
742
|
+
bool get_raw_bytes = 5;
|
603
743
|
}
|
604
744
|
|
605
|
-
message
|
606
|
-
string
|
745
|
+
message ContainerExecPutInputRequest {
|
746
|
+
string exec_id = 1;
|
747
|
+
RuntimeInputMessage input = 2;
|
607
748
|
}
|
608
749
|
|
609
750
|
message ContainerExecRequest {
|
@@ -613,21 +754,145 @@ message ContainerExecRequest {
|
|
613
754
|
// Send SIGTERM to running container on exit of exec command.
|
614
755
|
bool terminate_container_on_exit = 4;
|
615
756
|
bool runtime_debug = 5; // For internal debugging use only.
|
757
|
+
ExecOutputOption stdout_output = 6;
|
758
|
+
ExecOutputOption stderr_output = 7;
|
759
|
+
uint32 timeout_secs = 8;
|
760
|
+
optional string workdir = 9;
|
761
|
+
repeated string secret_ids = 10;
|
616
762
|
}
|
617
763
|
|
618
|
-
message
|
764
|
+
message ContainerExecResponse {
|
765
|
+
string exec_id = 1;
|
766
|
+
}
|
767
|
+
|
768
|
+
message ContainerExecWaitRequest {
|
619
769
|
string exec_id = 1;
|
620
770
|
float timeout = 2;
|
621
|
-
uint64 last_batch_index = 3;
|
622
771
|
}
|
623
772
|
|
624
|
-
message
|
773
|
+
message ContainerExecWaitResponse {
|
774
|
+
optional int32 exit_code = 1;
|
775
|
+
bool completed = 2;
|
776
|
+
}
|
777
|
+
|
778
|
+
message ContainerFileCloseRequest {
|
779
|
+
string file_descriptor = 1;
|
780
|
+
}
|
781
|
+
|
782
|
+
message ContainerFileDeleteBytesRequest {
|
783
|
+
string file_descriptor = 1;
|
784
|
+
optional uint32 start_inclusive = 2;
|
785
|
+
optional uint32 end_exclusive = 3;
|
786
|
+
}
|
787
|
+
|
788
|
+
message ContainerFileFlushRequest {
|
789
|
+
string file_descriptor = 1;
|
790
|
+
}
|
791
|
+
|
792
|
+
message ContainerFileLsRequest {
|
793
|
+
string path = 1;
|
794
|
+
}
|
795
|
+
|
796
|
+
message ContainerFileMkdirRequest {
|
797
|
+
string path = 1;
|
798
|
+
bool make_parents = 2;
|
799
|
+
}
|
800
|
+
|
801
|
+
message ContainerFileOpenRequest {
|
802
|
+
// file descriptor is hydrated when sent from server -> worker
|
803
|
+
optional string file_descriptor = 1;
|
804
|
+
string path = 2;
|
805
|
+
string mode = 3;
|
806
|
+
}
|
807
|
+
|
808
|
+
message ContainerFileReadLineRequest {
|
809
|
+
string file_descriptor = 1;
|
810
|
+
}
|
811
|
+
|
812
|
+
message ContainerFileReadRequest {
|
813
|
+
string file_descriptor = 1;
|
814
|
+
optional uint32 n = 2;
|
815
|
+
}
|
816
|
+
|
817
|
+
message ContainerFileRmRequest {
|
818
|
+
string path = 1;
|
819
|
+
bool recursive = 2;
|
820
|
+
}
|
821
|
+
|
822
|
+
message ContainerFileSeekRequest {
|
823
|
+
string file_descriptor = 1;
|
824
|
+
int32 offset = 2;
|
825
|
+
SeekWhence whence = 3;
|
826
|
+
}
|
827
|
+
|
828
|
+
message ContainerFileWatchRequest {
|
829
|
+
string path = 1;
|
830
|
+
bool recursive = 2;
|
831
|
+
optional uint64 timeout_secs = 3;
|
832
|
+
}
|
833
|
+
|
834
|
+
message ContainerFileWriteReplaceBytesRequest {
|
835
|
+
string file_descriptor = 1;
|
836
|
+
bytes data = 2;
|
837
|
+
optional uint32 start_inclusive = 3;
|
838
|
+
optional uint32 end_exclusive = 4;
|
839
|
+
}
|
840
|
+
|
841
|
+
message ContainerFileWriteRequest {
|
842
|
+
string file_descriptor = 1;
|
843
|
+
bytes data = 2;
|
844
|
+
}
|
845
|
+
|
846
|
+
message ContainerFilesystemExecGetOutputRequest {
|
625
847
|
string exec_id = 1;
|
626
|
-
|
848
|
+
float timeout = 2;
|
627
849
|
}
|
628
850
|
|
629
|
-
message
|
851
|
+
message ContainerFilesystemExecRequest {
|
852
|
+
oneof file_exec_request_oneof {
|
853
|
+
ContainerFileOpenRequest file_open_request = 1;
|
854
|
+
ContainerFileWriteRequest file_write_request = 2;
|
855
|
+
ContainerFileReadRequest file_read_request = 3;
|
856
|
+
ContainerFileFlushRequest file_flush_request = 4;
|
857
|
+
ContainerFileReadLineRequest file_read_line_request = 5;
|
858
|
+
ContainerFileSeekRequest file_seek_request = 6;
|
859
|
+
ContainerFileDeleteBytesRequest file_delete_bytes_request = 7;
|
860
|
+
ContainerFileWriteReplaceBytesRequest file_write_replace_bytes_request = 8;
|
861
|
+
ContainerFileCloseRequest file_close_request = 9;
|
862
|
+
ContainerFileLsRequest file_ls_request = 11;
|
863
|
+
ContainerFileMkdirRequest file_mkdir_request = 12;
|
864
|
+
ContainerFileRmRequest file_rm_request = 13;
|
865
|
+
ContainerFileWatchRequest file_watch_request = 14;
|
866
|
+
}
|
867
|
+
string task_id = 10;
|
868
|
+
}
|
869
|
+
|
870
|
+
message ContainerFilesystemExecResponse {
|
630
871
|
string exec_id = 1;
|
872
|
+
// only set when the request opens a new file, i.e., ContainerFileOpenRequest
|
873
|
+
optional string file_descriptor = 2;
|
874
|
+
}
|
875
|
+
|
876
|
+
message ContainerHeartbeatRequest {
|
877
|
+
bool canceled_inputs_return_outputs = 4; // Bad client version.
|
878
|
+
bool canceled_inputs_return_outputs_v2 = 5;
|
879
|
+
|
880
|
+
reserved 1, 2, 3;
|
881
|
+
}
|
882
|
+
|
883
|
+
message ContainerHeartbeatResponse {
|
884
|
+
optional CancelInputEvent cancel_input_event = 1;
|
885
|
+
}
|
886
|
+
|
887
|
+
message ContainerLogRequest {
|
888
|
+
repeated TaskLogs logs = 3;
|
889
|
+
}
|
890
|
+
|
891
|
+
message ContainerStopRequest {
|
892
|
+
string task_id = 1 [ (modal.options.audit_target_attr) = true ];
|
893
|
+
}
|
894
|
+
|
895
|
+
message ContainerStopResponse {
|
631
896
|
}
|
632
897
|
|
633
898
|
message CustomDomainConfig {
|
@@ -638,6 +903,12 @@ message CustomDomainInfo {
|
|
638
903
|
string url = 1;
|
639
904
|
}
|
640
905
|
|
906
|
+
message DNSRecord {
|
907
|
+
DNSRecordType type = 1;
|
908
|
+
string name = 2;
|
909
|
+
string value = 3;
|
910
|
+
}
|
911
|
+
|
641
912
|
// Chunks of data that can be streamed in and out of tasks.
|
642
913
|
message DataChunk {
|
643
914
|
DataFormat data_format = 1;
|
@@ -669,22 +940,17 @@ message DictContentsRequest {
|
|
669
940
|
bool values = 3;
|
670
941
|
}
|
671
942
|
|
672
|
-
message
|
673
|
-
repeated DictEntry data = 1;
|
674
|
-
string app_id = 2 [ (modal.options.audit_target_attr) = true ];
|
675
|
-
string existing_dict_id = 3;
|
676
|
-
}
|
677
|
-
|
678
|
-
message DictCreateResponse { // Will be superseded by DictGetOrCreateResponse
|
943
|
+
message DictDeleteRequest {
|
679
944
|
string dict_id = 1;
|
680
945
|
}
|
681
946
|
|
682
|
-
message
|
683
|
-
|
947
|
+
message DictEntry {
|
948
|
+
bytes key = 1;
|
949
|
+
bytes value = 2;
|
684
950
|
}
|
685
951
|
|
686
952
|
message DictGetOrCreateRequest {
|
687
|
-
string deployment_name = 1;
|
953
|
+
string deployment_name = 1 [ (modal.options.audit_target_attr) = true ];
|
688
954
|
DeploymentNamespace namespace = 2;
|
689
955
|
string environment_name = 3;
|
690
956
|
ObjectCreationType object_creation_type = 4;
|
@@ -695,11 +961,6 @@ message DictGetOrCreateResponse {
|
|
695
961
|
string dict_id = 1;
|
696
962
|
}
|
697
963
|
|
698
|
-
message DictEntry {
|
699
|
-
bytes key = 1;
|
700
|
-
bytes value = 2;
|
701
|
-
}
|
702
|
-
|
703
964
|
message DictGetRequest {
|
704
965
|
string dict_id = 1;
|
705
966
|
bytes key = 2;
|
@@ -746,17 +1007,27 @@ message DictPopResponse {
|
|
746
1007
|
}
|
747
1008
|
|
748
1009
|
message DictUpdateRequest {
|
749
|
-
string dict_id = 1;
|
1010
|
+
string dict_id = 1 [ (modal.options.audit_target_attr) = true ];
|
750
1011
|
repeated DictEntry updates = 2;
|
751
1012
|
}
|
752
1013
|
|
753
1014
|
message DictUpdateResponse {
|
754
1015
|
}
|
755
1016
|
|
756
|
-
message
|
757
|
-
|
758
|
-
string
|
759
|
-
|
1017
|
+
message Domain {
|
1018
|
+
string domain_id = 1;
|
1019
|
+
string domain_name = 2;
|
1020
|
+
double created_at = 3;
|
1021
|
+
CertificateStatus certificate_status = 4;
|
1022
|
+
repeated DNSRecord dns_records = 5;
|
1023
|
+
};
|
1024
|
+
|
1025
|
+
message DomainCertificateVerifyRequest {
|
1026
|
+
string domain_id = 1;
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
message DomainCertificateVerifyResponse {
|
1030
|
+
Domain domain = 1;
|
760
1031
|
}
|
761
1032
|
|
762
1033
|
message DomainCreateRequest {
|
@@ -771,57 +1042,76 @@ message DomainCreateResponse {
|
|
771
1042
|
message DomainListRequest {
|
772
1043
|
}
|
773
1044
|
|
774
|
-
message Domain {
|
775
|
-
string domain_id = 1;
|
776
|
-
string domain_name = 2;
|
777
|
-
double created_at = 3;
|
778
|
-
CertificateStatus certificate_status = 4;
|
779
|
-
repeated DNSRecord dns_records = 5;
|
780
|
-
};
|
781
|
-
|
782
1045
|
message DomainListResponse {
|
783
1046
|
repeated Domain domains = 1;
|
784
1047
|
}
|
785
1048
|
|
786
|
-
message
|
787
|
-
string
|
1049
|
+
message EnvironmentCreateRequest {
|
1050
|
+
string name = 1 [ (modal.options.audit_target_attr) = true ];
|
788
1051
|
}
|
789
1052
|
|
790
|
-
message
|
791
|
-
|
1053
|
+
message EnvironmentDeleteRequest {
|
1054
|
+
string name = 1 [ (modal.options.audit_target_attr) = true ];
|
792
1055
|
}
|
793
|
-
|
794
|
-
|
795
|
-
|
1056
|
+
message EnvironmentGetOrCreateRequest {
|
1057
|
+
string deployment_name = 1 [ (modal.options.audit_target_attr) = true ];
|
1058
|
+
ObjectCreationType object_creation_type = 2;
|
796
1059
|
}
|
797
1060
|
|
798
|
-
message
|
799
|
-
string
|
1061
|
+
message EnvironmentGetOrCreateResponse {
|
1062
|
+
string environment_id = 1;
|
1063
|
+
EnvironmentMetadata metadata = 2;
|
800
1064
|
}
|
801
1065
|
|
802
1066
|
message EnvironmentListItem {
|
803
1067
|
string name = 1;
|
804
1068
|
string webhook_suffix = 2;
|
1069
|
+
double created_at = 3;
|
1070
|
+
bool default = 4;
|
805
1071
|
}
|
806
1072
|
|
807
1073
|
message EnvironmentListResponse {
|
808
1074
|
repeated EnvironmentListItem items = 2;
|
809
1075
|
}
|
810
1076
|
|
1077
|
+
message EnvironmentMetadata{
|
1078
|
+
string name = 1;
|
1079
|
+
EnvironmentSettings settings = 2;
|
1080
|
+
}
|
1081
|
+
|
1082
|
+
// Environment-scoped settings, with workspace-level defaults.
|
1083
|
+
// Note that we use MergeFrom to combine workspace / environment settings,
|
1084
|
+
// which will *append* any `repeated` fields!
|
1085
|
+
message EnvironmentSettings {
|
1086
|
+
string image_builder_version = 1;
|
1087
|
+
string webhook_suffix = 2;
|
1088
|
+
}
|
1089
|
+
|
811
1090
|
message EnvironmentUpdateRequest {
|
812
|
-
string current_name = 1;
|
1091
|
+
string current_name = 1 [ (modal.options.audit_target_attr) = true ];
|
813
1092
|
google.protobuf.StringValue name = 2;
|
814
1093
|
google.protobuf.StringValue web_suffix = 3;
|
815
1094
|
}
|
816
1095
|
|
817
|
-
|
818
|
-
|
819
|
-
|
1096
|
+
// A file entry when listing files in a volume or network file system.
|
1097
|
+
message FileEntry {
|
1098
|
+
enum FileType {
|
1099
|
+
UNSPECIFIED = 0;
|
1100
|
+
FILE = 1;
|
1101
|
+
DIRECTORY = 2;
|
1102
|
+
SYMLINK = 3;
|
1103
|
+
}
|
1104
|
+
string path = 1;
|
1105
|
+
FileType type = 2;
|
1106
|
+
uint64 mtime = 3;
|
1107
|
+
uint64 size = 4;
|
820
1108
|
}
|
821
1109
|
|
822
|
-
message
|
823
|
-
|
824
|
-
|
1110
|
+
message FilesystemRuntimeOutputBatch {
|
1111
|
+
repeated bytes output = 1;
|
1112
|
+
optional SystemErrorMessage error = 2;
|
1113
|
+
uint64 batch_index = 3;
|
1114
|
+
bool eof = 4;
|
825
1115
|
}
|
826
1116
|
|
827
1117
|
message Function {
|
@@ -859,7 +1149,7 @@ message Function {
|
|
859
1149
|
|
860
1150
|
uint32 concurrency_limit = 19;
|
861
1151
|
|
862
|
-
|
1152
|
+
reserved 20; // old fields
|
863
1153
|
|
864
1154
|
uint32 timeout_secs = 21;
|
865
1155
|
|
@@ -882,7 +1172,7 @@ message Function {
|
|
882
1172
|
|
883
1173
|
repeated VolumeMount volume_mounts = 33;
|
884
1174
|
|
885
|
-
uint32
|
1175
|
+
uint32 target_concurrent_inputs = 34;
|
886
1176
|
|
887
1177
|
repeated CustomDomainInfo custom_domain_info = 35;
|
888
1178
|
|
@@ -910,69 +1200,69 @@ message Function {
|
|
910
1200
|
repeated S3Mount s3_mounts = 47;
|
911
1201
|
repeated CloudBucketMount cloud_bucket_mounts = 51;
|
912
1202
|
|
913
|
-
|
1203
|
+
reserved 48; // _experimental_boost
|
914
1204
|
|
915
1205
|
// If set, tasks will be scheduled using the new scheduler, which also knows
|
916
1206
|
// to look at fine-grained placement constraints.
|
917
|
-
|
918
|
-
optional SchedulerPlacement
|
919
|
-
|
1207
|
+
reserved 49; // _experimental_scheduler
|
1208
|
+
optional SchedulerPlacement scheduler_placement = 50;
|
1209
|
+
reserved 52; // _experimental_scheduler_placement
|
920
1210
|
|
921
|
-
|
922
|
-
// TODO(irfansharif):
|
923
|
-
// - Fold in cloud, resource needs here too.
|
924
|
-
// - Allow specifying list of regions, zones, cloud, fallback and alternative
|
925
|
-
// GPU types.
|
926
|
-
optional string _region = 1;
|
927
|
-
optional string _zone = 2;
|
928
|
-
optional string _lifecycle = 3; // "on-demand" or "spot", else ignored
|
929
|
-
}
|
1211
|
+
bool is_class = 53; // if "Function" is actually a class grouping multiple methods
|
930
1212
|
|
931
|
-
|
932
|
-
|
933
|
-
// behaviour when using a FunctionHandler. Notably excludes things purely
|
934
|
-
// used for *executing* the function in a container entrypoint
|
1213
|
+
string use_function_id = 54; // for class methods use this function id instead for invocations - the *referenced* function should have is_class=True
|
1214
|
+
string use_method_name = 55; // for class methods - this method name needs to be included in the FunctionInput
|
935
1215
|
|
936
|
-
|
937
|
-
string function_name = 2;
|
938
|
-
Function.FunctionType function_type = 8;
|
939
|
-
string web_url = 28;
|
940
|
-
bool is_method = 39;
|
941
|
-
}
|
1216
|
+
ClassParameterInfo class_parameter_info = 56;
|
942
1217
|
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
1218
|
+
reserved 57; // _experimental_resources
|
1219
|
+
reserved 58;
|
1220
|
+
reserved 59;
|
1221
|
+
uint32 batch_max_size = 60; // Maximum number of inputs to fetch at once
|
1222
|
+
uint64 batch_linger_ms = 61; // Miliseconds to block before a response is needed
|
1223
|
+
bool i6pn_enabled = 62;
|
1224
|
+
bool _experimental_concurrent_cancellations = 63;
|
1225
|
+
uint32 max_concurrent_inputs = 64;
|
949
1226
|
|
950
|
-
|
951
|
-
|
952
|
-
repeated
|
953
|
-
optional Resources resources = 3;
|
954
|
-
optional FunctionRetryPolicy retry_policy = 4;
|
955
|
-
optional uint32 concurrency_limit = 5;
|
956
|
-
optional uint32 timeout_secs = 6;
|
957
|
-
optional uint32 task_idle_timeout_secs = 7;
|
958
|
-
optional uint32 warm_pool_size = 8;
|
959
|
-
repeated VolumeMount volume_mounts = 9;
|
960
|
-
optional uint32 allow_concurrent_inputs = 10;
|
961
|
-
bool replace_volume_mounts = 11;
|
962
|
-
bool replace_secret_ids = 12;
|
963
|
-
}
|
1227
|
+
// TODO(irfansharif): Remove, once https://github.com/modal-labs/modal/pull/15645 lands.
|
1228
|
+
bool _experimental_task_templates_enabled = 65; // forces going through the new gpu-fallbacks integration path, even if no fallback options are specified
|
1229
|
+
repeated TaskTemplate _experimental_task_templates = 66; // for fallback options, where the first/most-preferred "template" is derived from fields above
|
964
1230
|
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
1231
|
+
// When the function is a "grouped" one, this records the # of tasks we want
|
1232
|
+
// to schedule in tandem.
|
1233
|
+
uint32 _experimental_group_size = 67;
|
1234
|
+
|
1235
|
+
// If set, the function will be run in an untrusted environment.
|
1236
|
+
bool untrusted = 68;
|
1237
|
+
|
1238
|
+
uint32 _experimental_buffer_containers = 69;
|
1239
|
+
|
1240
|
+
// _experimental_proxy_ip -> ProxyInfo
|
1241
|
+
// TODO: deprecate.
|
1242
|
+
optional string _experimental_proxy_ip = 70;
|
1243
|
+
|
1244
|
+
bool runtime_perf_record = 71; // For internal debugging use only.
|
1245
|
+
|
1246
|
+
Schedule schedule = 72;
|
1247
|
+
|
1248
|
+
bool snapshot_debug = 73; // For internal debugging use only.
|
1249
|
+
|
1250
|
+
// Mapping of method names to method definitions, only non-empty for class service functions
|
1251
|
+
map<string, MethodDefinition> method_definitions = 74;
|
1252
|
+
bool method_definitions_set = 75;
|
1253
|
+
|
1254
|
+
bool _experimental_custom_scaling = 76;
|
971
1255
|
}
|
972
1256
|
|
973
|
-
message
|
1257
|
+
message FunctionAsyncInvokeRequest {
|
974
1258
|
string function_id = 1;
|
975
|
-
|
1259
|
+
string parent_input_id = 2;
|
1260
|
+
FunctionInput input = 3;
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
message FunctionAsyncInvokeResponse {
|
1264
|
+
bool retry_with_blob_upload = 1;
|
1265
|
+
string function_call_id = 2;
|
976
1266
|
}
|
977
1267
|
|
978
1268
|
message FunctionBindParamsRequest {
|
@@ -987,33 +1277,167 @@ message FunctionBindParamsResponse {
|
|
987
1277
|
FunctionHandleMetadata handle_metadata = 2;
|
988
1278
|
}
|
989
1279
|
|
1280
|
+
message FunctionCallCallGraphInfo {
|
1281
|
+
string function_call_id = 1;
|
1282
|
+
string parent_input_id = 2;
|
1283
|
+
string function_name = 3;
|
1284
|
+
string module_name = 4;
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
message FunctionCallCancelRequest {
|
1288
|
+
string function_call_id = 1;
|
1289
|
+
bool terminate_containers = 2;
|
1290
|
+
}
|
1291
|
+
|
1292
|
+
message FunctionCallGetDataRequest {
|
1293
|
+
string function_call_id = 1;
|
1294
|
+
uint64 last_index = 2;
|
1295
|
+
}
|
1296
|
+
|
1297
|
+
message FunctionCallInfo {
|
1298
|
+
string function_call_id = 1;
|
1299
|
+
int32 idx = 2;
|
1300
|
+
reserved 3, 4, 5; // old fields
|
1301
|
+
double created_at = 6; // when the call was created
|
1302
|
+
double scheduled_at = 7; // if cron job, when run was scheduled
|
1303
|
+
reserved 8, 9, 10, 11; // old fields
|
1304
|
+
InputCategoryInfo pending_inputs = 12;
|
1305
|
+
InputCategoryInfo failed_inputs = 13;
|
1306
|
+
InputCategoryInfo succeeded_inputs = 14;
|
1307
|
+
InputCategoryInfo timeout_inputs = 15;
|
1308
|
+
InputCategoryInfo cancelled_inputs = 16;
|
1309
|
+
int32 total_inputs = 17;
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
message FunctionCallListRequest {
|
1313
|
+
string function_id = 1;
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
message FunctionCallListResponse {
|
1317
|
+
repeated FunctionCallInfo function_calls = 1;
|
1318
|
+
}
|
1319
|
+
|
1320
|
+
message FunctionCallPutDataRequest {
|
1321
|
+
string function_call_id = 1;
|
1322
|
+
repeated DataChunk data_chunks = 2;
|
1323
|
+
}
|
1324
|
+
|
1325
|
+
message FunctionCreateRequest {
|
1326
|
+
Function function = 1;
|
1327
|
+
string app_id = 2 [ (modal.options.audit_target_attr) = true ];
|
1328
|
+
Schedule schedule = 6 [deprecated=true]; // Deprecated: now passed in the Function definition
|
1329
|
+
string existing_function_id = 7;
|
1330
|
+
// This flag tells the server to avoid doing updates in FunctionCreate that should now
|
1331
|
+
// be done in AppPublish. Provides a smoother migration onto atomic deployments with 0.64,
|
1332
|
+
// and can be deprecated once we no longer support ealier versions.
|
1333
|
+
bool defer_updates = 8;
|
1334
|
+
FunctionData function_data = 9; // supersedes 'function' field above
|
1335
|
+
}
|
1336
|
+
|
990
1337
|
message FunctionCreateResponse {
|
991
1338
|
string function_id = 1;
|
992
|
-
string
|
993
|
-
WebUrlInfo web_url_info = 3; // Deprecated - needed until 0.51 is the minimum version
|
1339
|
+
string __deprecated_web_url = 2 [ deprecated = true]; // Used up until 0.62.212
|
994
1340
|
Function function = 4;
|
995
1341
|
FunctionHandleMetadata handle_metadata = 5;
|
996
1342
|
}
|
997
1343
|
|
998
|
-
message
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1344
|
+
message FunctionData {
|
1345
|
+
// Note: FunctionData pulls "up" a subset of fields from Function message that
|
1346
|
+
// will get deprecated there and made authoritative here, at the top-level.
|
1347
|
+
// All remaining fields will stay within the Function message itself and a
|
1348
|
+
// single FunctionData will contain a list of such (ranked) Functions. The
|
1349
|
+
// top-level fields capture data not specific to any particular underlying
|
1350
|
+
// task (like warm-pool-size, applicable across all tasks), while fields
|
1351
|
+
// specific to the task (like the resource request) will exist at the bottom
|
1352
|
+
// level.
|
1353
|
+
|
1354
|
+
string module_name = 1;
|
1355
|
+
string function_name = 2;
|
1356
|
+
|
1357
|
+
Function.FunctionType function_type = 3;
|
1358
|
+
|
1359
|
+
// Scheduling related fields.
|
1360
|
+
uint32 warm_pool_size = 4;
|
1361
|
+
uint32 concurrency_limit = 5;
|
1362
|
+
uint32 task_idle_timeout_secs = 6;
|
1363
|
+
// When the function is a "grouped" one, this records the # of tasks we want
|
1364
|
+
// to schedule in tandem.
|
1365
|
+
uint32 _experimental_group_size = 19;
|
1366
|
+
uint32 _experimental_buffer_containers = 22;
|
1367
|
+
bool _experimental_custom_scaling = 23;
|
1368
|
+
string worker_id = 7; // for internal debugging use only
|
1369
|
+
|
1370
|
+
uint32 timeout_secs = 8;
|
1371
|
+
|
1372
|
+
string web_url = 9;
|
1373
|
+
WebUrlInfo web_url_info = 10;
|
1374
|
+
WebhookConfig webhook_config = 11;
|
1375
|
+
repeated CustomDomainInfo custom_domain_info = 12;
|
1376
|
+
// _experimental_proxy_ip -> ProxyInfo
|
1377
|
+
// TODO: deprecate.
|
1378
|
+
optional string _experimental_proxy_ip = 24;
|
1379
|
+
// Mapping of method names to method definitions, only non-empty for class service functions
|
1380
|
+
map<string, MethodDefinition> method_definitions = 25;
|
1381
|
+
bool method_definitions_set = 26;
|
1382
|
+
|
1383
|
+
bool is_class = 13; // if "Function" is actually a class grouping multiple methods - applies across all underlying tasks
|
1384
|
+
ClassParameterInfo class_parameter_info = 14;
|
1385
|
+
|
1386
|
+
bool is_method = 15;
|
1387
|
+
string use_function_id = 16; // used for methods
|
1388
|
+
string use_method_name = 17; // used for methods
|
1389
|
+
|
1390
|
+
message RankedFunction {
|
1391
|
+
uint32 rank = 1;
|
1392
|
+
Function function = 2;
|
1393
|
+
}
|
1394
|
+
repeated RankedFunction ranked_functions = 18;
|
1395
|
+
|
1396
|
+
Schedule schedule = 20;
|
1397
|
+
|
1398
|
+
reserved 21;
|
1399
|
+
|
1400
|
+
bool untrusted = 27; // If set, the function will be run in an untrusted environment.
|
1401
|
+
bool snapshot_debug = 28; // For internal debugging use only.
|
1402
|
+
bool runtime_perf_record = 29; // For internal debugging use only.
|
1003
1403
|
}
|
1004
1404
|
|
1005
|
-
message
|
1405
|
+
message FunctionExtended {
|
1406
|
+
uint32 type_identifier = 1;
|
1407
|
+
// FunctionExtended is a union type that exists while we migrate between
|
1408
|
+
// storage of FunctionData vs. Functions, internally. Once migrated at the
|
1409
|
+
// storage level, we can get rid of this union type and replace with access
|
1410
|
+
// that expects FunctionData only.
|
1411
|
+
oneof function_extended {
|
1412
|
+
Function function_singleton = 2;
|
1413
|
+
FunctionData function_data = 3;
|
1414
|
+
}
|
1415
|
+
}
|
1416
|
+
|
1417
|
+
|
1418
|
+
message FunctionGetCallGraphRequest {
|
1419
|
+
// TODO: use input_id once we switch client submit API to return those.
|
1420
|
+
string function_call_id = 2;
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
message FunctionGetCallGraphResponse {
|
1424
|
+
repeated InputCallGraphInfo inputs = 1;
|
1425
|
+
repeated FunctionCallCallGraphInfo function_calls = 2;
|
1426
|
+
}
|
1427
|
+
|
1428
|
+
message FunctionGetCurrentStatsRequest {
|
1006
1429
|
string function_id = 1;
|
1007
|
-
FunctionHandleMetadata handle_metadata = 2;
|
1008
1430
|
}
|
1009
1431
|
|
1010
|
-
|
1011
|
-
message FunctionUpdateSchedulingParamsRequest {
|
1432
|
+
message FunctionGetDynamicConcurrencyRequest{
|
1012
1433
|
string function_id = 1;
|
1013
|
-
uint32
|
1434
|
+
uint32 target_concurrency = 2;
|
1435
|
+
uint32 max_concurrency = 3;
|
1014
1436
|
}
|
1015
1437
|
|
1016
|
-
message
|
1438
|
+
message FunctionGetDynamicConcurrencyResponse {
|
1439
|
+
uint32 concurrency = 1;
|
1440
|
+
}
|
1017
1441
|
|
1018
1442
|
message FunctionGetInputsItem {
|
1019
1443
|
string input_id = 1;
|
@@ -1021,6 +1445,7 @@ message FunctionGetInputsItem {
|
|
1021
1445
|
bool kill_switch = 3;
|
1022
1446
|
reserved 4; // previously used
|
1023
1447
|
string function_call_id = 5;
|
1448
|
+
FunctionCallInvocationType function_call_invocation_type = 6;
|
1024
1449
|
}
|
1025
1450
|
|
1026
1451
|
message FunctionGetInputsRequest {
|
@@ -1028,6 +1453,10 @@ message FunctionGetInputsRequest {
|
|
1028
1453
|
int32 max_values = 3;
|
1029
1454
|
float average_call_time = 5;
|
1030
1455
|
int32 input_concurrency = 6; // Container aims to fetch multiple inputs at the same time
|
1456
|
+
reserved 9;
|
1457
|
+
reserved 10;
|
1458
|
+
uint32 batch_max_size = 11; // Maximum number of inputs to fetch at once
|
1459
|
+
uint64 batch_linger_ms = 12; // Miliseconds to block before a response is needed
|
1031
1460
|
}
|
1032
1461
|
|
1033
1462
|
message FunctionGetInputsResponse {
|
@@ -1039,8 +1468,10 @@ message FunctionGetOutputsItem {
|
|
1039
1468
|
GenericResult result = 1;
|
1040
1469
|
int32 idx = 2;
|
1041
1470
|
string input_id = 3;
|
1042
|
-
int32 gen_index = 4; // Deprecated, only used in client version <0.57
|
1043
1471
|
DataFormat data_format = 5; // for result.data_oneof
|
1472
|
+
string task_id = 6;
|
1473
|
+
double input_started_at = 7;
|
1474
|
+
double output_created_at = 8;
|
1044
1475
|
}
|
1045
1476
|
|
1046
1477
|
message FunctionGetOutputsRequest {
|
@@ -1049,12 +1480,29 @@ message FunctionGetOutputsRequest {
|
|
1049
1480
|
float timeout = 3;
|
1050
1481
|
string last_entry_id = 6;
|
1051
1482
|
bool clear_on_success = 7; // expires *any* remaining outputs soon after this call, not just the returned ones
|
1483
|
+
double requested_at = 8; // Used for waypoints.
|
1484
|
+
// The jwts the client expects the server to be processing. This is optional and used for sync inputs only.
|
1485
|
+
repeated string input_jwts = 9;
|
1052
1486
|
}
|
1053
1487
|
|
1054
1488
|
message FunctionGetOutputsResponse {
|
1055
1489
|
repeated int32 idxs = 3;
|
1056
1490
|
repeated FunctionGetOutputsItem outputs = 4;
|
1057
1491
|
string last_entry_id = 5;
|
1492
|
+
int32 num_unfinished_inputs = 6;
|
1493
|
+
}
|
1494
|
+
|
1495
|
+
message FunctionGetRequest {
|
1496
|
+
string app_name = 1;
|
1497
|
+
string object_tag = 2;
|
1498
|
+
DeploymentNamespace namespace = 3;
|
1499
|
+
string environment_name = 4;
|
1500
|
+
}
|
1501
|
+
|
1502
|
+
message FunctionGetResponse {
|
1503
|
+
string function_id = 1;
|
1504
|
+
FunctionHandleMetadata handle_metadata = 2;
|
1505
|
+
repeated Warning server_warnings = 4;
|
1058
1506
|
}
|
1059
1507
|
|
1060
1508
|
message FunctionGetSerializedRequest {
|
@@ -1066,6 +1514,24 @@ message FunctionGetSerializedResponse {
|
|
1066
1514
|
bytes class_serialized = 2;
|
1067
1515
|
}
|
1068
1516
|
|
1517
|
+
message FunctionHandleMetadata {
|
1518
|
+
// contains all the info about a function that is needed to trigger the right
|
1519
|
+
// behaviour when using a FunctionHandler. Notably excludes things purely
|
1520
|
+
// used for *executing* the function in a container entrypoint
|
1521
|
+
|
1522
|
+
// Should be a subset and use IDs/types from `Function` above
|
1523
|
+
string function_name = 2;
|
1524
|
+
Function.FunctionType function_type = 8;
|
1525
|
+
string web_url = 28;
|
1526
|
+
bool is_method = 39;
|
1527
|
+
string use_function_id = 40; // used for methods
|
1528
|
+
string use_method_name = 41; // used for methods
|
1529
|
+
string definition_id = 42;
|
1530
|
+
ClassParameterInfo class_parameter_info = 43;
|
1531
|
+
// Mapping of method names to their metadata, only non-empty for class service functions
|
1532
|
+
map<string, FunctionHandleMetadata> method_handle_metadata = 44;
|
1533
|
+
}
|
1534
|
+
|
1069
1535
|
message FunctionInput {
|
1070
1536
|
// serialized (args, kwargs).
|
1071
1537
|
oneof args_oneof {
|
@@ -1074,6 +1540,7 @@ message FunctionInput {
|
|
1074
1540
|
}
|
1075
1541
|
bool final_input = 9;
|
1076
1542
|
DataFormat data_format = 10; // For args_oneof.
|
1543
|
+
optional string method_name = 11; // specifies which method to call when calling a class/object function
|
1077
1544
|
}
|
1078
1545
|
|
1079
1546
|
message FunctionMapRequest {
|
@@ -1082,11 +1549,46 @@ message FunctionMapRequest {
|
|
1082
1549
|
bool return_exceptions = 3;
|
1083
1550
|
FunctionCallType function_call_type = 4;
|
1084
1551
|
repeated FunctionPutInputsItem pipelined_inputs = 5;
|
1552
|
+
FunctionCallInvocationType function_call_invocation_type = 6;
|
1085
1553
|
}
|
1086
1554
|
|
1087
1555
|
message FunctionMapResponse {
|
1088
1556
|
string function_call_id = 1;
|
1089
1557
|
repeated FunctionPutInputsResponseItem pipelined_inputs = 2;
|
1558
|
+
FunctionRetryPolicy retry_policy = 3;
|
1559
|
+
string function_call_jwt = 4;
|
1560
|
+
}
|
1561
|
+
|
1562
|
+
message FunctionOptions {
|
1563
|
+
repeated string secret_ids = 1;
|
1564
|
+
repeated string mount_ids = 2; // Currently not supported
|
1565
|
+
optional Resources resources = 3;
|
1566
|
+
optional FunctionRetryPolicy retry_policy = 4;
|
1567
|
+
optional uint32 concurrency_limit = 5;
|
1568
|
+
optional uint32 timeout_secs = 6;
|
1569
|
+
optional uint32 task_idle_timeout_secs = 7;
|
1570
|
+
optional uint32 warm_pool_size = 8;
|
1571
|
+
repeated VolumeMount volume_mounts = 9;
|
1572
|
+
optional uint32 target_concurrent_inputs = 10;
|
1573
|
+
bool replace_volume_mounts = 11;
|
1574
|
+
bool replace_secret_ids = 12;
|
1575
|
+
}
|
1576
|
+
|
1577
|
+
message FunctionPrecreateRequest {
|
1578
|
+
string app_id = 1;
|
1579
|
+
string function_name = 2 [ (modal.options.audit_target_attr) = true ];
|
1580
|
+
string existing_function_id = 3;
|
1581
|
+
Function.FunctionType function_type = 4;
|
1582
|
+
WebhookConfig webhook_config = 5;
|
1583
|
+
string use_function_id = 6; // for class methods - use this function id instead for invocations - the *referenced* function should have is_class=True
|
1584
|
+
string use_method_name = 7; // for class methods - this method name needs to be included in the FunctionInput
|
1585
|
+
// Mapping of method names to method definitions, only non-empty for class service functions
|
1586
|
+
map<string, MethodDefinition> method_definitions = 8;
|
1587
|
+
}
|
1588
|
+
|
1589
|
+
message FunctionPrecreateResponse {
|
1590
|
+
string function_id = 1;
|
1591
|
+
FunctionHandleMetadata handle_metadata = 2;
|
1090
1592
|
}
|
1091
1593
|
|
1092
1594
|
message FunctionPutInputsItem {
|
@@ -1100,13 +1602,14 @@ message FunctionPutInputsRequest {
|
|
1100
1602
|
repeated FunctionPutInputsItem inputs = 4;
|
1101
1603
|
}
|
1102
1604
|
|
1605
|
+
message FunctionPutInputsResponse {
|
1606
|
+
repeated FunctionPutInputsResponseItem inputs = 1;
|
1607
|
+
}
|
1608
|
+
|
1103
1609
|
message FunctionPutInputsResponseItem {
|
1104
1610
|
int32 idx = 1;
|
1105
1611
|
string input_id = 2;
|
1106
|
-
|
1107
|
-
|
1108
|
-
message FunctionPutInputsResponse {
|
1109
|
-
repeated FunctionPutInputsResponseItem inputs = 1;
|
1612
|
+
string input_jwt = 3;
|
1110
1613
|
}
|
1111
1614
|
|
1112
1615
|
message FunctionPutOutputsItem {
|
@@ -1114,78 +1617,35 @@ message FunctionPutOutputsItem {
|
|
1114
1617
|
GenericResult result = 2;
|
1115
1618
|
double input_started_at = 3;
|
1116
1619
|
double output_created_at = 4;
|
1117
|
-
|
1118
|
-
DataFormat data_format = 7; // for result.data_oneof
|
1119
|
-
}
|
1120
|
-
|
1121
|
-
message FunctionPutOutputsRequest {
|
1122
|
-
repeated FunctionPutOutputsItem outputs = 4;
|
1123
|
-
}
|
1124
|
-
|
1125
|
-
message FunctionRetryPolicy {
|
1126
|
-
float backoff_coefficient = 1;
|
1127
|
-
uint32 initial_delay_ms = 2;
|
1128
|
-
uint32 max_delay_ms = 3;
|
1129
|
-
// NOTE: two-byte field number not used for special reason. copy-paste error. Ref: PR #2542
|
1130
|
-
uint32 retries = 18;
|
1131
|
-
}
|
1132
|
-
|
1133
|
-
message FunctionGetCallGraphRequest {
|
1134
|
-
// TODO: use input_id once we switch client submit API to return those.
|
1135
|
-
string function_call_id = 2;
|
1136
|
-
}
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
message InputCallGraphInfo {
|
1141
|
-
string input_id = 1;
|
1142
|
-
GenericResult.GenericStatus status = 2;
|
1143
|
-
string function_call_id = 3;
|
1144
|
-
string task_id = 4;
|
1145
|
-
}
|
1146
|
-
|
1147
|
-
message FunctionCallCallGraphInfo {
|
1148
|
-
string function_call_id = 1;
|
1149
|
-
string parent_input_id = 2;
|
1150
|
-
string function_name = 3;
|
1151
|
-
string module_name = 4;
|
1152
|
-
}
|
1153
|
-
|
1154
|
-
message FunctionGetCallGraphResponse {
|
1155
|
-
repeated InputCallGraphInfo inputs = 1;
|
1156
|
-
repeated FunctionCallCallGraphInfo function_calls = 2;
|
1157
|
-
}
|
1158
|
-
|
1159
|
-
message FunctionCallCancelRequest {
|
1160
|
-
string function_call_id = 1;
|
1620
|
+
DataFormat data_format = 7; // for result.data_oneof
|
1161
1621
|
}
|
1162
1622
|
|
1163
|
-
message
|
1164
|
-
|
1623
|
+
message FunctionPutOutputsRequest {
|
1624
|
+
repeated FunctionPutOutputsItem outputs = 4;
|
1625
|
+
double requested_at = 5; // Used for waypoints.
|
1165
1626
|
}
|
1166
1627
|
|
1167
|
-
message
|
1168
|
-
string
|
1169
|
-
|
1170
|
-
reserved 3, 4, 5; // old fields
|
1171
|
-
double created_at = 6; // when the call was created
|
1172
|
-
double scheduled_at = 7; // if cron job, when run was scheduled
|
1173
|
-
reserved 8, 9, 10, 11; // old fields
|
1174
|
-
InputCategoryInfo pending_inputs = 12;
|
1175
|
-
InputCategoryInfo failed_inputs = 13;
|
1176
|
-
InputCategoryInfo succeeded_inputs = 14;
|
1177
|
-
InputCategoryInfo timeout_inputs = 15;
|
1178
|
-
InputCategoryInfo cancelled_inputs = 16;
|
1179
|
-
int32 total_inputs = 17;
|
1628
|
+
message FunctionRetryInputsItem {
|
1629
|
+
string input_jwt = 1;
|
1630
|
+
FunctionInput input = 2;
|
1180
1631
|
}
|
1181
1632
|
|
1182
|
-
message
|
1183
|
-
|
1633
|
+
message FunctionRetryInputsRequest {
|
1634
|
+
string function_call_jwt = 1;
|
1635
|
+
repeated FunctionRetryInputsItem inputs = 2;
|
1184
1636
|
}
|
1185
1637
|
|
1638
|
+
message FunctionRetryInputsResponse {
|
1639
|
+
// TODO(ryan): Eventually this will return entry ids, which client
|
1640
|
+
// will send back to server to check for lost inputs.
|
1641
|
+
}
|
1186
1642
|
|
1187
|
-
message
|
1188
|
-
|
1643
|
+
message FunctionRetryPolicy {
|
1644
|
+
float backoff_coefficient = 1;
|
1645
|
+
uint32 initial_delay_ms = 2;
|
1646
|
+
uint32 max_delay_ms = 3;
|
1647
|
+
// NOTE: two-byte field number not used for special reason. copy-paste error. Ref: PR #2542
|
1648
|
+
uint32 retries = 18;
|
1189
1649
|
}
|
1190
1650
|
|
1191
1651
|
message FunctionStats {
|
@@ -1194,6 +1654,19 @@ message FunctionStats {
|
|
1194
1654
|
uint32 num_total_tasks = 3;
|
1195
1655
|
}
|
1196
1656
|
|
1657
|
+
message FunctionUpdateSchedulingParamsRequest {
|
1658
|
+
string function_id = 1;
|
1659
|
+
uint32 warm_pool_size_override = 2;
|
1660
|
+
}
|
1661
|
+
|
1662
|
+
message FunctionUpdateSchedulingParamsResponse {}
|
1663
|
+
|
1664
|
+
message GPUConfig {
|
1665
|
+
GPUType type = 1;
|
1666
|
+
uint32 count = 2;
|
1667
|
+
uint32 memory = 3;
|
1668
|
+
}
|
1669
|
+
|
1197
1670
|
message GeneratorDone { // Sent as the output when a generator finishes running.
|
1198
1671
|
uint64 items_total = 1;
|
1199
1672
|
}
|
@@ -1209,6 +1682,7 @@ message GenericResult { // Used for both tasks and function outputs
|
|
1209
1682
|
// Used when the user's function fails to initialize (ex. S3 mount failed due to invalid credentials).
|
1210
1683
|
// Terminates the function and all remaining inputs.
|
1211
1684
|
GENERIC_STATUS_INIT_FAILURE = 5;
|
1685
|
+
GENERIC_STATUS_INTERNAL_FAILURE = 6;
|
1212
1686
|
}
|
1213
1687
|
|
1214
1688
|
GenericStatus status = 1; // Status of the task or function output.
|
@@ -1224,28 +1698,9 @@ message GenericResult { // Used for both tasks and function outputs
|
|
1224
1698
|
string data_blob_id = 10; // Blob ID for large data.
|
1225
1699
|
}
|
1226
1700
|
|
1227
|
-
enum GeneratorStatus {
|
1228
|
-
GENERATOR_STATUS_UNSPECIFIED = 0;
|
1229
|
-
GENERATOR_STATUS_INCOMPLETE = 1;
|
1230
|
-
GENERATOR_STATUS_COMPLETE = 2;
|
1231
|
-
}
|
1232
|
-
GeneratorStatus gen_status = 7; // Deprecated, only used in client version <0.57
|
1233
|
-
|
1234
1701
|
string propagation_reason = 13; // (?)
|
1235
1702
|
}
|
1236
1703
|
|
1237
|
-
message GPUConfig {
|
1238
|
-
GPUType type = 1;
|
1239
|
-
uint32 count = 2;
|
1240
|
-
uint32 memory = 3;
|
1241
|
-
}
|
1242
|
-
|
1243
|
-
message BuildFunction {
|
1244
|
-
string definition = 1;
|
1245
|
-
bytes globals = 2;
|
1246
|
-
FunctionInput input = 3;
|
1247
|
-
}
|
1248
|
-
|
1249
1704
|
message Image {
|
1250
1705
|
repeated BaseImage base_images = 5;
|
1251
1706
|
repeated string dockerfile_commands = 6;
|
@@ -1277,6 +1732,15 @@ message ImageContextFile {
|
|
1277
1732
|
bytes data = 2;
|
1278
1733
|
}
|
1279
1734
|
|
1735
|
+
message ImageFromIdRequest {
|
1736
|
+
string image_id = 1;
|
1737
|
+
}
|
1738
|
+
|
1739
|
+
message ImageFromIdResponse {
|
1740
|
+
string image_id = 1;
|
1741
|
+
ImageMetadata metadata = 2;
|
1742
|
+
}
|
1743
|
+
|
1280
1744
|
message ImageGetOrCreateRequest {
|
1281
1745
|
Image image = 2;
|
1282
1746
|
string app_id = 4 [ (modal.options.audit_target_attr) = true ];
|
@@ -1285,16 +1749,24 @@ message ImageGetOrCreateRequest {
|
|
1285
1749
|
bool force_build = 7;
|
1286
1750
|
DeploymentNamespace namespace = 8;
|
1287
1751
|
string builder_version = 9;
|
1752
|
+
// Only admins can publish global images, but this provides an extra failsafe
|
1753
|
+
bool allow_global_deployment = 10;
|
1288
1754
|
}
|
1289
1755
|
|
1290
1756
|
message ImageGetOrCreateResponse {
|
1757
|
+
// image_id is set regardless if the image is built (use ImageJoinStreaming to wait for build)
|
1291
1758
|
string image_id = 1;
|
1759
|
+
// result of build - only set if the image has finished building (regardless if success or not)
|
1760
|
+
GenericResult result = 2;
|
1761
|
+
// image metadata - only set if the image has built successfully
|
1762
|
+
ImageMetadata metadata = 3;
|
1292
1763
|
}
|
1293
1764
|
|
1294
1765
|
message ImageJoinStreamingRequest {
|
1295
1766
|
string image_id = 1;
|
1296
1767
|
float timeout = 2;
|
1297
1768
|
string last_entry_id = 3;
|
1769
|
+
bool include_logs_for_finished = 4;
|
1298
1770
|
}
|
1299
1771
|
|
1300
1772
|
message ImageJoinStreamingResponse {
|
@@ -1302,6 +1774,18 @@ message ImageJoinStreamingResponse {
|
|
1302
1774
|
repeated TaskLogs task_logs = 2;
|
1303
1775
|
string entry_id = 3;
|
1304
1776
|
bool eof = 4;
|
1777
|
+
ImageMetadata metadata = 5; // set on success
|
1778
|
+
}
|
1779
|
+
|
1780
|
+
|
1781
|
+
message ImageMetadata {
|
1782
|
+
// The output of `python -VV. Not set if missing
|
1783
|
+
optional string python_version_info = 1;
|
1784
|
+
// Installed python packages, as listed by by `pip list`.
|
1785
|
+
// package name -> version. Empty if missing
|
1786
|
+
map<string, string> python_packages = 2;
|
1787
|
+
// The work directory of the image, defaulting to "/". Not set if missing
|
1788
|
+
optional string workdir = 3;
|
1305
1789
|
}
|
1306
1790
|
|
1307
1791
|
|
@@ -1310,6 +1794,18 @@ message ImageRegistryConfig {
|
|
1310
1794
|
string secret_id = 2;
|
1311
1795
|
}
|
1312
1796
|
|
1797
|
+
message InputCallGraphInfo {
|
1798
|
+
string input_id = 1;
|
1799
|
+
GenericResult.GenericStatus status = 2;
|
1800
|
+
string function_call_id = 3;
|
1801
|
+
string task_id = 4;
|
1802
|
+
}
|
1803
|
+
|
1804
|
+
message InputCategoryInfo {
|
1805
|
+
int32 total = 1;
|
1806
|
+
repeated InputInfo latest = 2;
|
1807
|
+
}
|
1808
|
+
|
1313
1809
|
message InputInfo {
|
1314
1810
|
string input_id = 1;
|
1315
1811
|
int32 idx = 2;
|
@@ -1320,20 +1816,20 @@ message InputInfo {
|
|
1320
1816
|
bool task_first_input = 7;
|
1321
1817
|
}
|
1322
1818
|
|
1323
|
-
message
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
string existing_mount_id = 3;
|
1331
|
-
repeated MountFile files = 4;
|
1819
|
+
message MethodDefinition {
|
1820
|
+
string function_name = 1;
|
1821
|
+
Function.FunctionType function_type = 2;
|
1822
|
+
WebhookConfig webhook_config = 3;
|
1823
|
+
string web_url = 4;
|
1824
|
+
WebUrlInfo web_url_info = 5;
|
1825
|
+
repeated CustomDomainInfo custom_domain_info = 6;
|
1332
1826
|
}
|
1333
1827
|
|
1334
|
-
message
|
1335
|
-
string
|
1336
|
-
|
1828
|
+
message MountFile {
|
1829
|
+
string filename = 1;
|
1830
|
+
string sha256_hex = 3; // SHA-256 checksum of the file.
|
1831
|
+
optional uint64 size = 4; // Size of the file in bytes — ignored in MountBuild().
|
1832
|
+
optional uint32 mode = 5; // Unix file permission bits `st_mode`.
|
1337
1833
|
}
|
1338
1834
|
|
1339
1835
|
message MountGetOrCreateRequest {
|
@@ -1354,13 +1850,6 @@ message MountHandleMetadata {
|
|
1354
1850
|
string content_checksum_sha256_hex = 1;
|
1355
1851
|
}
|
1356
1852
|
|
1357
|
-
message MountFile {
|
1358
|
-
string filename = 1;
|
1359
|
-
string sha256_hex = 3; // SHA-256 checksum of the file.
|
1360
|
-
optional uint64 size = 4; // Size of the file in bytes — ignored in MountBuild().
|
1361
|
-
optional uint32 mode = 5; // Unix file permission bits `st_mode`.
|
1362
|
-
}
|
1363
|
-
|
1364
1853
|
message MountPutFileRequest {
|
1365
1854
|
string sha256_hex = 2;
|
1366
1855
|
|
@@ -1380,6 +1869,17 @@ message MultiPartUpload {
|
|
1380
1869
|
string completion_url = 3;
|
1381
1870
|
}
|
1382
1871
|
|
1872
|
+
message NetworkAccess {
|
1873
|
+
enum NetworkAccessType {
|
1874
|
+
UNSPECIFIED = 0;
|
1875
|
+
OPEN = 1;
|
1876
|
+
BLOCKED = 2;
|
1877
|
+
ALLOWLIST = 3;
|
1878
|
+
}
|
1879
|
+
NetworkAccessType network_access_type = 1;
|
1880
|
+
repeated string allowed_cidrs = 2;
|
1881
|
+
}
|
1882
|
+
|
1383
1883
|
message Object {
|
1384
1884
|
string object_id = 1;
|
1385
1885
|
oneof handle_metadata_oneof {
|
@@ -1394,8 +1894,53 @@ message ObjectDependency {
|
|
1394
1894
|
string object_id = 1;
|
1395
1895
|
}
|
1396
1896
|
|
1897
|
+
message PTYInfo {
|
1898
|
+
bool enabled = 1; // Soon deprecated
|
1899
|
+
uint32 winsz_rows = 2;
|
1900
|
+
uint32 winsz_cols = 3;
|
1901
|
+
string env_term = 4;
|
1902
|
+
string env_colorterm = 5;
|
1903
|
+
string env_term_program = 6;
|
1904
|
+
enum PTYType {
|
1905
|
+
PTY_TYPE_UNSPECIFIED = 0; // Nothing
|
1906
|
+
PTY_TYPE_FUNCTION = 1; // Run function in PTY
|
1907
|
+
PTY_TYPE_SHELL = 2; // Replace function with shell
|
1908
|
+
}
|
1909
|
+
PTYType pty_type = 7;
|
1910
|
+
}
|
1911
|
+
|
1912
|
+
message PortSpec {
|
1913
|
+
uint32 port = 1;
|
1914
|
+
bool unencrypted = 2;
|
1915
|
+
}
|
1916
|
+
|
1917
|
+
message PortSpecs {
|
1918
|
+
repeated PortSpec ports = 1;
|
1919
|
+
}
|
1920
|
+
|
1921
|
+
message Proxy {
|
1922
|
+
string name = 1;
|
1923
|
+
double created_at = 2;
|
1924
|
+
string environment_name = 3;
|
1925
|
+
string proxy_id = 5;
|
1926
|
+
repeated ProxyIp proxy_ips = 4;
|
1927
|
+
}
|
1928
|
+
|
1929
|
+
message ProxyCreateRequest {
|
1930
|
+
string name = 1 [ (modal.options.audit_target_attr) = true ];
|
1931
|
+
string environment_name = 2;
|
1932
|
+
}
|
1933
|
+
|
1934
|
+
message ProxyCreateResponse {
|
1935
|
+
Proxy proxy = 1;
|
1936
|
+
}
|
1937
|
+
|
1938
|
+
message ProxyDeleteRequest {
|
1939
|
+
string proxy_id = 1 [ (modal.options.audit_target_attr) = true ];
|
1940
|
+
}
|
1941
|
+
|
1397
1942
|
message ProxyGetOrCreateRequest {
|
1398
|
-
string deployment_name = 1;
|
1943
|
+
string deployment_name = 1 [ (modal.options.audit_target_attr) = true ];
|
1399
1944
|
DeploymentNamespace namespace = 2;
|
1400
1945
|
string environment_name = 3;
|
1401
1946
|
ObjectCreationType object_creation_type = 4; // must be UNSPECIFIED
|
@@ -1405,39 +1950,42 @@ message ProxyGetOrCreateResponse {
|
|
1405
1950
|
string proxy_id = 1;
|
1406
1951
|
}
|
1407
1952
|
|
1953
|
+
message ProxyGetRequest {
|
1954
|
+
string name = 1 [ (modal.options.audit_target_attr) = true ];
|
1955
|
+
string environment_name = 2;
|
1956
|
+
}
|
1957
|
+
|
1958
|
+
message ProxyGetResponse {
|
1959
|
+
Proxy proxy = 1;
|
1960
|
+
}
|
1961
|
+
|
1408
1962
|
message ProxyInfo {
|
1409
1963
|
string elastic_ip = 1;
|
1410
1964
|
string proxy_key = 2;
|
1411
1965
|
string remote_addr = 3;
|
1412
1966
|
int32 remote_port = 4;
|
1967
|
+
ProxyType proxy_type = 5;
|
1413
1968
|
}
|
1414
1969
|
|
1415
|
-
message
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
string
|
1420
|
-
string env_colorterm = 5;
|
1421
|
-
string env_term_program = 6;
|
1422
|
-
enum PTYType {
|
1423
|
-
PTY_TYPE_UNSPECIFIED = 0; // Nothing
|
1424
|
-
PTY_TYPE_FUNCTION = 1; // Run function in PTY
|
1425
|
-
PTY_TYPE_SHELL = 2; // Replace function with shell
|
1426
|
-
}
|
1427
|
-
PTYType pty_type = 7;
|
1970
|
+
message ProxyIp {
|
1971
|
+
string proxy_ip = 1;
|
1972
|
+
ProxyIpStatus status = 2;
|
1973
|
+
double created_at = 3;
|
1974
|
+
string environment_name = 4;
|
1428
1975
|
}
|
1429
1976
|
|
1430
|
-
message
|
1431
|
-
|
1432
|
-
string existing_queue_id = 2;
|
1977
|
+
message ProxyListResponse {
|
1978
|
+
repeated Proxy proxies = 1;
|
1433
1979
|
}
|
1434
1980
|
|
1435
|
-
message
|
1981
|
+
message QueueClearRequest {
|
1436
1982
|
string queue_id = 1;
|
1983
|
+
bytes partition_key = 2;
|
1984
|
+
bool all_partitions = 3;
|
1437
1985
|
}
|
1438
1986
|
|
1439
1987
|
message QueueDeleteRequest {
|
1440
|
-
string queue_id = 1;
|
1988
|
+
string queue_id = 1 [ (modal.options.audit_target_attr) = true ];
|
1441
1989
|
}
|
1442
1990
|
|
1443
1991
|
message QueueGetOrCreateRequest {
|
@@ -1466,22 +2014,38 @@ message QueueHeartbeatRequest {
|
|
1466
2014
|
string queue_id = 1;
|
1467
2015
|
}
|
1468
2016
|
|
1469
|
-
message
|
1470
|
-
|
1471
|
-
|
1472
|
-
bytes partition_key = 5;
|
1473
|
-
int32 partition_ttl_seconds = 6;
|
2017
|
+
message QueueItem {
|
2018
|
+
bytes value = 1;
|
2019
|
+
string entry_id = 2;
|
1474
2020
|
}
|
1475
2021
|
|
1476
2022
|
message QueueLenRequest {
|
1477
2023
|
string queue_id = 1;
|
1478
2024
|
bytes partition_key = 2;
|
2025
|
+
bool total = 3;
|
1479
2026
|
}
|
1480
2027
|
|
1481
2028
|
message QueueLenResponse {
|
1482
2029
|
int32 len = 1;
|
1483
2030
|
}
|
1484
2031
|
|
2032
|
+
message QueueListRequest {
|
2033
|
+
string environment_name = 1;
|
2034
|
+
// Allow client to report a bounded total size to reduce the number of partitions that need to be checked
|
2035
|
+
int32 total_size_limit = 2;
|
2036
|
+
}
|
2037
|
+
|
2038
|
+
message QueueListResponse {
|
2039
|
+
message QueueInfo {
|
2040
|
+
string name = 1;
|
2041
|
+
double created_at = 2;
|
2042
|
+
int32 num_partitions = 3;
|
2043
|
+
int32 total_size = 4;
|
2044
|
+
}
|
2045
|
+
|
2046
|
+
repeated QueueInfo queues = 1;
|
2047
|
+
}
|
2048
|
+
|
1485
2049
|
message QueueNextItemsRequest {
|
1486
2050
|
string queue_id = 1;
|
1487
2051
|
bytes partition_key = 2;
|
@@ -1489,15 +2053,18 @@ message QueueNextItemsRequest {
|
|
1489
2053
|
float item_poll_timeout = 4; // seconds
|
1490
2054
|
}
|
1491
2055
|
|
1492
|
-
message QueueItem {
|
1493
|
-
bytes value = 1;
|
1494
|
-
string entry_id = 2;
|
1495
|
-
}
|
1496
|
-
|
1497
2056
|
message QueueNextItemsResponse {
|
1498
2057
|
repeated QueueItem items = 1;
|
1499
2058
|
}
|
1500
2059
|
|
2060
|
+
message QueuePutRequest {
|
2061
|
+
string queue_id = 1;
|
2062
|
+
repeated bytes values = 4;
|
2063
|
+
bytes partition_key = 5;
|
2064
|
+
int32 partition_ttl_seconds = 6;
|
2065
|
+
}
|
2066
|
+
|
2067
|
+
|
1501
2068
|
message RateLimit {
|
1502
2069
|
int32 limit = 1;
|
1503
2070
|
RateLimitInterval interval = 2;
|
@@ -1508,6 +2075,32 @@ message Resources {
|
|
1508
2075
|
uint32 milli_cpu = 3; // milli CPU cores
|
1509
2076
|
GPUConfig gpu_config = 4;
|
1510
2077
|
uint32 memory_mb_max = 5; // MiB
|
2078
|
+
uint32 ephemeral_disk_mb = 6; // MiB
|
2079
|
+
uint32 milli_cpu_max = 7; // milli CPU cores
|
2080
|
+
}
|
2081
|
+
|
2082
|
+
message RuntimeInputMessage {
|
2083
|
+
bytes message = 1;
|
2084
|
+
uint64 message_index = 2;
|
2085
|
+
bool eof = 3;
|
2086
|
+
}
|
2087
|
+
|
2088
|
+
message RuntimeOutputBatch {
|
2089
|
+
repeated RuntimeOutputMessage items = 1;
|
2090
|
+
uint64 batch_index = 2;
|
2091
|
+
// if an exit code is given, this is the final message that will be sent.
|
2092
|
+
optional int32 exit_code = 3;
|
2093
|
+
repeated RuntimeOutputMessage stdout = 4;
|
2094
|
+
repeated RuntimeOutputMessage stderr = 5;
|
2095
|
+
repeated RuntimeOutputMessage info = 6;
|
2096
|
+
}
|
2097
|
+
|
2098
|
+
// Used for `modal container exec`, `modal shell`, and Sandboxes
|
2099
|
+
message RuntimeOutputMessage {
|
2100
|
+
// only stdout / stderr is used
|
2101
|
+
FileDescriptor file_descriptor = 1;
|
2102
|
+
string message = 2;
|
2103
|
+
bytes message_bytes = 3;
|
1511
2104
|
}
|
1512
2105
|
|
1513
2106
|
message S3Mount {
|
@@ -1545,19 +2138,40 @@ message Sandbox {
|
|
1545
2138
|
|
1546
2139
|
// If set, tasks will be scheduled using the new scheduler, which also knows
|
1547
2140
|
// to look at fine-grained placement constraints.
|
1548
|
-
|
1549
|
-
optional SchedulerPlacement
|
2141
|
+
reserved 16; // _experimental_scheduler
|
2142
|
+
optional SchedulerPlacement scheduler_placement = 17;
|
2143
|
+
reserved 18; // _experimental_resources
|
2144
|
+
|
2145
|
+
string worker_id = 19; // for internal debugging use only
|
2146
|
+
oneof open_ports_oneof {
|
2147
|
+
PortSpecs open_ports = 20;
|
2148
|
+
}
|
2149
|
+
|
2150
|
+
bool i6pn_enabled = 21;
|
2151
|
+
|
2152
|
+
// Network access configuration beyond simple allow/block.
|
2153
|
+
NetworkAccess network_access = 22;
|
2154
|
+
|
2155
|
+
optional string proxy_id = 23;
|
1550
2156
|
}
|
1551
2157
|
|
1552
2158
|
message SandboxCreateRequest {
|
1553
2159
|
string app_id = 1 [ (modal.options.audit_target_attr) = true ];
|
1554
2160
|
Sandbox definition = 2;
|
2161
|
+
string environment_name = 3;
|
1555
2162
|
}
|
1556
2163
|
|
1557
2164
|
message SandboxCreateResponse {
|
1558
2165
|
string sandbox_id = 1;
|
1559
2166
|
}
|
1560
2167
|
|
2168
|
+
message SandboxGetLogsRequest {
|
2169
|
+
string sandbox_id = 1;
|
2170
|
+
FileDescriptor file_descriptor = 2;
|
2171
|
+
float timeout = 3;
|
2172
|
+
string last_entry_id = 4;
|
2173
|
+
}
|
2174
|
+
|
1561
2175
|
message SandboxGetTaskIdRequest {
|
1562
2176
|
string sandbox_id = 1;
|
1563
2177
|
}
|
@@ -1566,11 +2180,50 @@ message SandboxGetTaskIdResponse {
|
|
1566
2180
|
string task_id = 1;
|
1567
2181
|
}
|
1568
2182
|
|
1569
|
-
message
|
2183
|
+
message SandboxGetTunnelsRequest {
|
1570
2184
|
string sandbox_id = 1;
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
2185
|
+
float timeout = 2;
|
2186
|
+
}
|
2187
|
+
|
2188
|
+
message SandboxGetTunnelsResponse {
|
2189
|
+
GenericResult result = 1;
|
2190
|
+
repeated TunnelData tunnels = 2;
|
2191
|
+
}
|
2192
|
+
|
2193
|
+
message SandboxHandleMetadata {
|
2194
|
+
GenericResult result = 1;
|
2195
|
+
}
|
2196
|
+
|
2197
|
+
message SandboxInfo {
|
2198
|
+
string id = 1;
|
2199
|
+
double created_at = 3;
|
2200
|
+
TaskInfo task_info = 4;
|
2201
|
+
|
2202
|
+
reserved 2; // modal.client.Sandbox definition
|
2203
|
+
}
|
2204
|
+
|
2205
|
+
message SandboxListRequest {
|
2206
|
+
string app_id = 1;
|
2207
|
+
double before_timestamp = 2;
|
2208
|
+
string environment_name = 3;
|
2209
|
+
bool include_finished = 4;
|
2210
|
+
repeated SandboxTag tags = 5;
|
2211
|
+
}
|
2212
|
+
|
2213
|
+
message SandboxListResponse {
|
2214
|
+
repeated SandboxInfo sandboxes = 1;
|
2215
|
+
}
|
2216
|
+
|
2217
|
+
message SandboxSnapshotFsRequest {
|
2218
|
+
string sandbox_id = 1;
|
2219
|
+
float timeout = 2;
|
2220
|
+
}
|
2221
|
+
|
2222
|
+
message SandboxSnapshotFsResponse {
|
2223
|
+
string image_id = 1;
|
2224
|
+
GenericResult result = 2;
|
2225
|
+
// Metadata may be empty since we may skip it for performance reasons.
|
2226
|
+
ImageMetadata image_metadata = 3;
|
1574
2227
|
}
|
1575
2228
|
|
1576
2229
|
message SandboxStdinWriteRequest {
|
@@ -1583,24 +2236,15 @@ message SandboxStdinWriteRequest {
|
|
1583
2236
|
message SandboxStdinWriteResponse {
|
1584
2237
|
}
|
1585
2238
|
|
1586
|
-
message
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
message SandboxInfo {
|
1591
|
-
string id = 1;
|
1592
|
-
modal.client.Sandbox definition = 2;
|
1593
|
-
double created_at = 3;
|
1594
|
-
TaskInfo task_info = 4;
|
1595
|
-
}
|
1596
|
-
|
1597
|
-
message SandboxListRequest {
|
1598
|
-
string app_id = 1;
|
1599
|
-
double before_timestamp = 2;
|
2239
|
+
message SandboxTag {
|
2240
|
+
string tag_name = 1;
|
2241
|
+
string tag_value = 2;
|
1600
2242
|
}
|
1601
2243
|
|
1602
|
-
message
|
1603
|
-
|
2244
|
+
message SandboxTagsSetRequest {
|
2245
|
+
string environment_name = 1;
|
2246
|
+
string sandbox_id = 2;
|
2247
|
+
repeated SandboxTag tags = 3;
|
1604
2248
|
}
|
1605
2249
|
|
1606
2250
|
message SandboxTerminateRequest {
|
@@ -1639,6 +2283,21 @@ message Schedule {
|
|
1639
2283
|
}
|
1640
2284
|
}
|
1641
2285
|
|
2286
|
+
message SchedulerPlacement {
|
2287
|
+
// TODO(irfansharif):
|
2288
|
+
// - Fold in cloud, resource needs here too.
|
2289
|
+
// - Allow specifying list of zones, cloud, fallback and alternative
|
2290
|
+
// GPU types.
|
2291
|
+
|
2292
|
+
repeated string regions = 4;
|
2293
|
+
// TODO(irfansharif): Make these two repeated.
|
2294
|
+
optional string _zone = 2; // admin-only
|
2295
|
+
optional string _lifecycle = 3; // admin-only, "on-demand" or "spot", else ignored
|
2296
|
+
repeated string _instance_types = 5; // admin-only
|
2297
|
+
|
2298
|
+
reserved 1;
|
2299
|
+
}
|
2300
|
+
|
1642
2301
|
message SecretCreateRequest { // Not used by client anymore
|
1643
2302
|
map<string, string> env_dict = 1;
|
1644
2303
|
string app_id = 2 [ (modal.options.audit_target_attr) = true ];
|
@@ -1650,13 +2309,18 @@ message SecretCreateResponse { // Not used by client anymore
|
|
1650
2309
|
string secret_id = 1;
|
1651
2310
|
}
|
1652
2311
|
|
2312
|
+
message SecretDeleteRequest {
|
2313
|
+
string secret_id = 1;
|
2314
|
+
}
|
2315
|
+
|
1653
2316
|
message SecretGetOrCreateRequest {
|
1654
|
-
string deployment_name = 1;
|
2317
|
+
string deployment_name = 1 [ (modal.options.audit_target_attr) = true ];
|
1655
2318
|
DeploymentNamespace namespace = 2;
|
1656
2319
|
string environment_name = 3;
|
1657
2320
|
ObjectCreationType object_creation_type = 4; // Not used atm
|
1658
2321
|
map<string, string> env_dict = 5;
|
1659
2322
|
string app_id = 6; // only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP
|
2323
|
+
repeated string required_keys = 7;
|
1660
2324
|
}
|
1661
2325
|
|
1662
2326
|
message SecretGetOrCreateResponse {
|
@@ -1668,6 +2332,7 @@ message SecretListItem {
|
|
1668
2332
|
double created_at = 2;
|
1669
2333
|
double last_used_at = 3;
|
1670
2334
|
string environment_name = 4;
|
2335
|
+
string secret_id = 5;
|
1671
2336
|
}
|
1672
2337
|
|
1673
2338
|
message SecretListRequest {
|
@@ -1679,8 +2344,24 @@ message SecretListResponse {
|
|
1679
2344
|
string environment_name = 2; // the environment that was listed (useful when relying on "default" logic)
|
1680
2345
|
}
|
1681
2346
|
|
2347
|
+
message SharedVolumeDeleteRequest {
|
2348
|
+
string shared_volume_id = 1;
|
2349
|
+
}
|
2350
|
+
|
2351
|
+
message SharedVolumeGetFileRequest {
|
2352
|
+
string shared_volume_id = 1;
|
2353
|
+
string path = 2;
|
2354
|
+
}
|
2355
|
+
|
2356
|
+
message SharedVolumeGetFileResponse {
|
2357
|
+
oneof data_oneof {
|
2358
|
+
bytes data = 1;
|
2359
|
+
string data_blob_id = 2;
|
2360
|
+
}
|
2361
|
+
}
|
2362
|
+
|
1682
2363
|
message SharedVolumeGetOrCreateRequest {
|
1683
|
-
string deployment_name = 1;
|
2364
|
+
string deployment_name = 1 [ (modal.options.audit_target_attr) = true ];
|
1684
2365
|
DeploymentNamespace namespace = 2;
|
1685
2366
|
string environment_name = 3;
|
1686
2367
|
ObjectCreationType object_creation_type = 4;
|
@@ -1695,13 +2376,13 @@ message SharedVolumeHeartbeatRequest {
|
|
1695
2376
|
string shared_volume_id = 1;
|
1696
2377
|
}
|
1697
2378
|
|
1698
|
-
message
|
1699
|
-
string
|
1700
|
-
|
2379
|
+
message SharedVolumeListFilesRequest {
|
2380
|
+
string shared_volume_id = 1;
|
2381
|
+
string path = 2;
|
1701
2382
|
}
|
1702
2383
|
|
1703
|
-
message
|
1704
|
-
|
2384
|
+
message SharedVolumeListFilesResponse {
|
2385
|
+
repeated FileEntry entries = 1;
|
1705
2386
|
}
|
1706
2387
|
|
1707
2388
|
message SharedVolumeListItem {
|
@@ -1720,9 +2401,11 @@ message SharedVolumeListResponse {
|
|
1720
2401
|
string environment_name = 2;
|
1721
2402
|
}
|
1722
2403
|
|
1723
|
-
message
|
1724
|
-
string
|
1725
|
-
string
|
2404
|
+
message SharedVolumeMount {
|
2405
|
+
string mount_path = 1;
|
2406
|
+
string shared_volume_id = 2;
|
2407
|
+
CloudProvider cloud_provider = 3;
|
2408
|
+
bool allow_cross_region = 4;
|
1726
2409
|
}
|
1727
2410
|
|
1728
2411
|
message SharedVolumePutFileRequest {
|
@@ -1740,35 +2423,28 @@ message SharedVolumePutFileResponse {
|
|
1740
2423
|
bool exists = 1;
|
1741
2424
|
}
|
1742
2425
|
|
1743
|
-
message SharedVolumeGetFileRequest {
|
1744
|
-
string shared_volume_id = 1;
|
1745
|
-
string path = 2;
|
1746
|
-
}
|
1747
|
-
|
1748
|
-
message SharedVolumeGetFileResponse {
|
1749
|
-
oneof data_oneof {
|
1750
|
-
bytes data = 1;
|
1751
|
-
string data_blob_id = 2;
|
1752
|
-
}
|
1753
|
-
}
|
1754
|
-
|
1755
2426
|
message SharedVolumeRemoveFileRequest {
|
1756
2427
|
string shared_volume_id = 1 [ (modal.options.audit_target_attr) = true ];
|
1757
2428
|
string path = 2;
|
1758
2429
|
bool recursive = 3;
|
1759
2430
|
}
|
1760
2431
|
|
1761
|
-
message
|
1762
|
-
|
2432
|
+
message SystemErrorMessage {
|
2433
|
+
SystemErrorCode error_code = 1;
|
2434
|
+
string error_message = 2;
|
1763
2435
|
}
|
1764
2436
|
|
1765
|
-
message
|
1766
|
-
string
|
1767
|
-
string
|
1768
|
-
CloudProvider cloud_provider = 3;
|
1769
|
-
bool allow_cross_region = 4;
|
2437
|
+
message TaskClusterHelloRequest {
|
2438
|
+
string task_id = 1;
|
2439
|
+
string container_ip = 2;
|
1770
2440
|
}
|
1771
2441
|
|
2442
|
+
message TaskClusterHelloResponse {
|
2443
|
+
string cluster_id = 1;
|
2444
|
+
uint32 cluster_rank = 2;
|
2445
|
+
// All IP addresses in cluster, ordered by cluster rank
|
2446
|
+
repeated string container_ips = 3;
|
2447
|
+
}
|
1772
2448
|
|
1773
2449
|
message TaskCurrentInputsResponse {
|
1774
2450
|
repeated string input_ids = 1;
|
@@ -1782,6 +2458,14 @@ message TaskInfo {
|
|
1782
2458
|
double enqueued_at = 5;
|
1783
2459
|
}
|
1784
2460
|
|
2461
|
+
message TaskListRequest {
|
2462
|
+
string environment_name = 1;
|
2463
|
+
}
|
2464
|
+
|
2465
|
+
message TaskListResponse {
|
2466
|
+
repeated TaskStats tasks = 1;
|
2467
|
+
}
|
2468
|
+
|
1785
2469
|
message TaskLogs {
|
1786
2470
|
string data = 1;
|
1787
2471
|
TaskState task_state = 6;
|
@@ -1792,12 +2476,6 @@ message TaskLogs {
|
|
1792
2476
|
string input_id = 11;
|
1793
2477
|
}
|
1794
2478
|
|
1795
|
-
message TaskListRequest {}
|
1796
|
-
|
1797
|
-
message TaskListResponse {
|
1798
|
-
repeated TaskStats tasks = 1;
|
1799
|
-
}
|
1800
|
-
|
1801
2479
|
message TaskLogsBatch {
|
1802
2480
|
string task_id = 1;
|
1803
2481
|
repeated TaskLogs items = 2;
|
@@ -1818,7 +2496,7 @@ message TaskProgress {
|
|
1818
2496
|
}
|
1819
2497
|
|
1820
2498
|
message TaskResultRequest {
|
1821
|
-
|
2499
|
+
GenericResult result = 2;
|
1822
2500
|
}
|
1823
2501
|
|
1824
2502
|
message TaskStats {
|
@@ -1828,6 +2506,16 @@ message TaskStats {
|
|
1828
2506
|
double started_at = 4;
|
1829
2507
|
}
|
1830
2508
|
|
2509
|
+
message TaskTemplate {
|
2510
|
+
uint32 rank = 1;
|
2511
|
+
Resources resources = 2;
|
2512
|
+
uint32 target_concurrent_inputs = 3;
|
2513
|
+
uint32 max_concurrent_inputs = 4;
|
2514
|
+
|
2515
|
+
// TODO(irfansharif): Just move this into a column in the task table instead?
|
2516
|
+
// Deprecate all above fields and get rid of this message altogether
|
2517
|
+
uint32 index = 5; // pointer into FunctionData, if using that as the underlying definition type
|
2518
|
+
}
|
1831
2519
|
|
1832
2520
|
message TokenFlowCreateRequest {
|
1833
2521
|
string utm_source = 3;
|
@@ -1855,6 +2543,14 @@ message TokenFlowWaitResponse {
|
|
1855
2543
|
string workspace_username = 4;
|
1856
2544
|
}
|
1857
2545
|
|
2546
|
+
message TunnelData {
|
2547
|
+
string host = 1;
|
2548
|
+
uint32 port = 2;
|
2549
|
+
optional string unencrypted_host = 3;
|
2550
|
+
optional uint32 unencrypted_port = 4;
|
2551
|
+
uint32 container_port = 5;
|
2552
|
+
}
|
2553
|
+
|
1858
2554
|
message TunnelStartRequest {
|
1859
2555
|
uint32 port = 1;
|
1860
2556
|
bool unencrypted = 2;
|
@@ -1875,30 +2571,6 @@ message TunnelStopResponse {
|
|
1875
2571
|
bool exists = 1;
|
1876
2572
|
}
|
1877
2573
|
|
1878
|
-
message VolumeGetOrCreateRequest {
|
1879
|
-
string deployment_name = 1;
|
1880
|
-
DeploymentNamespace namespace = 2;
|
1881
|
-
string environment_name = 3;
|
1882
|
-
ObjectCreationType object_creation_type = 4;
|
1883
|
-
string app_id = 5; // only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP
|
1884
|
-
}
|
1885
|
-
|
1886
|
-
message VolumeGetOrCreateResponse {
|
1887
|
-
string volume_id = 1;
|
1888
|
-
}
|
1889
|
-
|
1890
|
-
message VolumeHeartbeatRequest {
|
1891
|
-
string volume_id = 1;
|
1892
|
-
}
|
1893
|
-
|
1894
|
-
message VolumeCreateRequest {
|
1895
|
-
string app_id = 1 [ (modal.options.audit_target_attr) = true ];
|
1896
|
-
}
|
1897
|
-
|
1898
|
-
message VolumeCreateResponse {
|
1899
|
-
string volume_id = 1;
|
1900
|
-
}
|
1901
|
-
|
1902
2574
|
message VolumeCommitRequest {
|
1903
2575
|
// NOTE(staffan): Mounting a volume in multiple locations is not supported, so volume_id alone uniquely identifies
|
1904
2576
|
// a volume mount.
|
@@ -1909,6 +2581,13 @@ message VolumeCommitResponse {
|
|
1909
2581
|
bool skip_reload = 1;
|
1910
2582
|
}
|
1911
2583
|
|
2584
|
+
message VolumeCopyFilesRequest {
|
2585
|
+
string volume_id = 1;
|
2586
|
+
repeated string src_paths = 2;
|
2587
|
+
string dst_path = 3;
|
2588
|
+
bool recursive = 4;
|
2589
|
+
}
|
2590
|
+
|
1912
2591
|
message VolumeDeleteRequest {
|
1913
2592
|
string volume_id = 1;
|
1914
2593
|
string environment_name = 2 [deprecated=true];
|
@@ -1916,7 +2595,7 @@ message VolumeDeleteRequest {
|
|
1916
2595
|
|
1917
2596
|
message VolumeGetFileRequest {
|
1918
2597
|
string volume_id = 1;
|
1919
|
-
|
2598
|
+
string path = 2;
|
1920
2599
|
uint64 start = 3;
|
1921
2600
|
uint64 len = 4; // 0 is interpreted as 'read to end'
|
1922
2601
|
}
|
@@ -1931,6 +2610,24 @@ message VolumeGetFileResponse {
|
|
1931
2610
|
uint64 len = 5; // number of bytes returned
|
1932
2611
|
}
|
1933
2612
|
|
2613
|
+
message VolumeGetOrCreateRequest {
|
2614
|
+
string deployment_name = 1 [ (modal.options.audit_target_attr) = true ];
|
2615
|
+
DeploymentNamespace namespace = 2;
|
2616
|
+
string environment_name = 3;
|
2617
|
+
ObjectCreationType object_creation_type = 4;
|
2618
|
+
string app_id = 5; // only used with OBJECT_CREATION_TYPE_ANONYMOUS_OWNED_BY_APP
|
2619
|
+
VolumeFsVersion version = 6;
|
2620
|
+
}
|
2621
|
+
|
2622
|
+
message VolumeGetOrCreateResponse {
|
2623
|
+
string volume_id = 1;
|
2624
|
+
VolumeFsVersion version = 2;
|
2625
|
+
}
|
2626
|
+
|
2627
|
+
message VolumeHeartbeatRequest {
|
2628
|
+
string volume_id = 1;
|
2629
|
+
}
|
2630
|
+
|
1934
2631
|
message VolumeListFilesRequest {
|
1935
2632
|
string volume_id = 1;
|
1936
2633
|
string path = 2;
|
@@ -1957,10 +2654,10 @@ message VolumeListResponse {
|
|
1957
2654
|
string environment_name = 2;
|
1958
2655
|
}
|
1959
2656
|
|
1960
|
-
message
|
1961
|
-
// NOTE(staffan): Mounting a volume in multiple locations is not supported, so volume_id alone uniquely identifies
|
1962
|
-
// a volume mount.
|
2657
|
+
message VolumeMount {
|
1963
2658
|
string volume_id = 1;
|
2659
|
+
string mount_path = 2;
|
2660
|
+
bool allow_background_commits = 3;
|
1964
2661
|
}
|
1965
2662
|
|
1966
2663
|
message VolumePutFilesRequest {
|
@@ -1972,23 +2669,37 @@ message VolumePutFilesRequest {
|
|
1972
2669
|
bool disallow_overwrite_existing_files = 3;
|
1973
2670
|
}
|
1974
2671
|
|
2672
|
+
message VolumeReloadRequest {
|
2673
|
+
// NOTE(staffan): Mounting a volume in multiple locations is not supported, so volume_id alone uniquely identifies
|
2674
|
+
// a volume mount.
|
2675
|
+
string volume_id = 1;
|
2676
|
+
}
|
2677
|
+
|
1975
2678
|
message VolumeRemoveFileRequest {
|
1976
2679
|
string volume_id = 1 [ (modal.options.audit_target_attr) = true ];
|
1977
|
-
|
2680
|
+
string path = 2;
|
1978
2681
|
bool recursive = 3;
|
1979
2682
|
}
|
1980
2683
|
|
1981
|
-
message
|
1982
|
-
string volume_id = 1;
|
1983
|
-
|
1984
|
-
bytes dst_path = 3;
|
1985
|
-
bool recursive = 4;
|
2684
|
+
message VolumeRenameRequest {
|
2685
|
+
string volume_id = 1 [ (modal.options.audit_target_attr) = true ];
|
2686
|
+
string name = 2;
|
1986
2687
|
}
|
1987
2688
|
|
1988
|
-
message
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
2689
|
+
message Warning {
|
2690
|
+
enum WarningType {
|
2691
|
+
WARNING_TYPE_UNSPECIFIED = 0;
|
2692
|
+
WARNING_TYPE_CLIENT_DEPRECATION = 1;
|
2693
|
+
WARNING_TYPE_RESOURCE_LIMIT = 2;
|
2694
|
+
}
|
2695
|
+
WarningType type = 1;
|
2696
|
+
string message = 2;
|
2697
|
+
}
|
2698
|
+
|
2699
|
+
message WebUrlInfo {
|
2700
|
+
bool truncated = 1;
|
2701
|
+
bool has_unique_hash = 2 [deprecated=true];
|
2702
|
+
bool label_stolen = 3;
|
1992
2703
|
}
|
1993
2704
|
|
1994
2705
|
message WebhookConfig {
|
@@ -1999,12 +2710,8 @@ message WebhookConfig {
|
|
1999
2710
|
repeated CustomDomainConfig custom_domains = 6;
|
2000
2711
|
uint32 web_server_port = 7;
|
2001
2712
|
float web_server_startup_timeout = 8;
|
2002
|
-
|
2003
|
-
|
2004
|
-
message WebUrlInfo {
|
2005
|
-
bool truncated = 1;
|
2006
|
-
bool has_unique_hash = 2;
|
2007
|
-
bool label_stolen = 3;
|
2713
|
+
bool web_endpoint_docs = 9;
|
2714
|
+
bool requires_proxy_auth = 10;
|
2008
2715
|
}
|
2009
2716
|
|
2010
2717
|
message WorkspaceNameLookupResponse {
|
@@ -2012,40 +2719,25 @@ message WorkspaceNameLookupResponse {
|
|
2012
2719
|
string username = 2;
|
2013
2720
|
}
|
2014
2721
|
|
2015
|
-
// Used for `modal container exec`
|
2016
|
-
message RuntimeOutputMessage {
|
2017
|
-
// only stdout / stderr is used
|
2018
|
-
FileDescriptor file_descriptor = 1;
|
2019
|
-
string message = 2;
|
2020
|
-
}
|
2021
|
-
|
2022
|
-
message RuntimeOutputBatch {
|
2023
|
-
repeated RuntimeOutputMessage items = 1;
|
2024
|
-
uint64 batch_index = 2;
|
2025
|
-
// if an exit code is given, this is the final message that will be sent.
|
2026
|
-
optional int32 exit_code = 3;
|
2027
|
-
}
|
2028
|
-
|
2029
|
-
message RuntimeInputMessage {
|
2030
|
-
bytes message = 1;
|
2031
|
-
uint64 message_index = 2;
|
2032
|
-
}
|
2033
|
-
|
2034
2722
|
|
2035
2723
|
service ModalClient {
|
2036
2724
|
// Apps
|
2037
|
-
rpc AppCreate(AppCreateRequest) returns (AppCreateResponse);
|
2038
2725
|
rpc AppClientDisconnect(AppClientDisconnectRequest) returns (google.protobuf.Empty);
|
2726
|
+
rpc AppCreate(AppCreateRequest) returns (AppCreateResponse);
|
2727
|
+
rpc AppDeploy(AppDeployRequest) returns (AppDeployResponse);
|
2728
|
+
rpc AppDeploymentHistory(AppDeploymentHistoryRequest) returns (AppDeploymentHistoryResponse);
|
2729
|
+
rpc AppGetByDeploymentName(AppGetByDeploymentNameRequest) returns (AppGetByDeploymentNameResponse);
|
2730
|
+
rpc AppGetLayout(AppGetLayoutRequest) returns (AppGetLayoutResponse);
|
2039
2731
|
rpc AppGetLogs(AppGetLogsRequest) returns (stream TaskLogsBatch);
|
2040
|
-
rpc AppSetObjects(AppSetObjectsRequest) returns (google.protobuf.Empty);
|
2041
2732
|
rpc AppGetObjects(AppGetObjectsRequest) returns (AppGetObjectsResponse);
|
2733
|
+
rpc AppGetOrCreate(AppGetOrCreateRequest) returns (AppGetOrCreateResponse);
|
2734
|
+
rpc AppHeartbeat(AppHeartbeatRequest) returns (google.protobuf.Empty);
|
2042
2735
|
rpc AppList(AppListRequest) returns (AppListResponse);
|
2043
|
-
rpc
|
2044
|
-
rpc
|
2045
|
-
rpc
|
2046
|
-
rpc
|
2736
|
+
rpc AppLookup(AppLookupRequest) returns (AppLookupResponse);
|
2737
|
+
rpc AppPublish(AppPublishRequest) returns (AppPublishResponse);
|
2738
|
+
rpc AppRollback(AppRollbackRequest) returns (google.protobuf.Empty);
|
2739
|
+
rpc AppSetObjects(AppSetObjectsRequest) returns (google.protobuf.Empty);
|
2047
2740
|
rpc AppStop(AppStopRequest) returns (google.protobuf.Empty);
|
2048
|
-
rpc AppHeartbeat(AppHeartbeatRequest) returns (google.protobuf.Empty);
|
2049
2741
|
|
2050
2742
|
// Blobs
|
2051
2743
|
rpc BlobCreate(BlobCreateRequest) returns (BlobCreateResponse);
|
@@ -2056,24 +2748,25 @@ service ModalClient {
|
|
2056
2748
|
rpc ClassGet(ClassGetRequest) returns (ClassGetResponse);
|
2057
2749
|
|
2058
2750
|
// Clients
|
2059
|
-
rpc ClientCreate(ClientCreateRequest) returns (ClientCreateResponse);
|
2060
2751
|
rpc ClientHello(google.protobuf.Empty) returns (ClientHelloResponse);
|
2061
|
-
rpc ClientHeartbeat(ClientHeartbeatRequest) returns (google.protobuf.Empty);
|
2062
2752
|
|
2063
2753
|
// Container
|
2064
|
-
rpc
|
2754
|
+
rpc ContainerCheckpoint(ContainerCheckpointRequest) returns (google.protobuf.Empty);
|
2065
2755
|
rpc ContainerExec(ContainerExecRequest) returns (ContainerExecResponse);
|
2066
2756
|
rpc ContainerExecGetOutput(ContainerExecGetOutputRequest) returns (stream RuntimeOutputBatch);
|
2067
2757
|
rpc ContainerExecPutInput(ContainerExecPutInputRequest) returns (google.protobuf.Empty);
|
2068
|
-
|
2069
|
-
|
2070
|
-
rpc
|
2758
|
+
rpc ContainerExecWait(ContainerExecWaitRequest) returns (ContainerExecWaitResponse);
|
2759
|
+
rpc ContainerFilesystemExec(ContainerFilesystemExecRequest) returns (ContainerFilesystemExecResponse);
|
2760
|
+
rpc ContainerFilesystemExecGetOutput(ContainerFilesystemExecGetOutputRequest) returns (stream FilesystemRuntimeOutputBatch);
|
2761
|
+
rpc ContainerHeartbeat(ContainerHeartbeatRequest) returns (ContainerHeartbeatResponse);
|
2762
|
+
rpc ContainerHello(google.protobuf.Empty) returns (google.protobuf.Empty);
|
2763
|
+
rpc ContainerLog(ContainerLogRequest) returns (google.protobuf.Empty);
|
2764
|
+
rpc ContainerStop(ContainerStopRequest) returns (ContainerStopResponse);
|
2071
2765
|
|
2072
2766
|
// Dicts
|
2073
2767
|
rpc DictClear(DictClearRequest) returns (google.protobuf.Empty);
|
2074
2768
|
rpc DictContains(DictContainsRequest) returns (DictContainsResponse);
|
2075
2769
|
rpc DictContents(DictContentsRequest) returns (stream DictEntry);
|
2076
|
-
rpc DictCreate(DictCreateRequest) returns (DictCreateResponse); // Will be superseded by DictGetOrCreate
|
2077
2770
|
rpc DictDelete(DictDeleteRequest) returns (google.protobuf.Empty);
|
2078
2771
|
rpc DictGet(DictGetRequest) returns (DictGetResponse);
|
2079
2772
|
rpc DictGetOrCreate(DictGetOrCreateRequest) returns (DictGetOrCreateResponse);
|
@@ -2084,22 +2777,30 @@ service ModalClient {
|
|
2084
2777
|
rpc DictUpdate(DictUpdateRequest) returns (DictUpdateResponse);
|
2085
2778
|
|
2086
2779
|
// Domains
|
2780
|
+
rpc DomainCertificateVerify(DomainCertificateVerifyRequest) returns (DomainCertificateVerifyResponse);
|
2087
2781
|
rpc DomainCreate(DomainCreateRequest) returns (DomainCreateResponse);
|
2088
2782
|
rpc DomainList(DomainListRequest) returns (DomainListResponse);
|
2089
|
-
rpc DomainCertificateVerify(DomainCertificateVerifyRequest) returns (DomainCertificateVerifyResponse);
|
2090
2783
|
|
2091
2784
|
// Environments
|
2092
2785
|
rpc EnvironmentCreate(EnvironmentCreateRequest) returns (google.protobuf.Empty);
|
2093
|
-
rpc EnvironmentList(google.protobuf.Empty) returns (EnvironmentListResponse);
|
2094
2786
|
rpc EnvironmentDelete(EnvironmentDeleteRequest) returns (google.protobuf.Empty);
|
2787
|
+
rpc EnvironmentGetOrCreate(EnvironmentGetOrCreateRequest) returns (EnvironmentGetOrCreateResponse);
|
2788
|
+
rpc EnvironmentList(google.protobuf.Empty) returns (EnvironmentListResponse);
|
2095
2789
|
rpc EnvironmentUpdate(EnvironmentUpdateRequest) returns (EnvironmentListItem);
|
2096
2790
|
|
2097
2791
|
// Functions
|
2792
|
+
rpc FunctionAsyncInvoke(FunctionAsyncInvokeRequest) returns (FunctionAsyncInvokeResponse);
|
2098
2793
|
rpc FunctionBindParams(FunctionBindParamsRequest) returns (FunctionBindParamsResponse);
|
2794
|
+
rpc FunctionCallCancel(FunctionCallCancelRequest) returns (google.protobuf.Empty);
|
2795
|
+
rpc FunctionCallGetDataIn(FunctionCallGetDataRequest) returns (stream DataChunk);
|
2796
|
+
rpc FunctionCallGetDataOut(FunctionCallGetDataRequest) returns (stream DataChunk);
|
2797
|
+
rpc FunctionCallList(FunctionCallListRequest) returns (FunctionCallListResponse);
|
2798
|
+
rpc FunctionCallPutDataOut(FunctionCallPutDataRequest) returns (google.protobuf.Empty);
|
2099
2799
|
rpc FunctionCreate(FunctionCreateRequest) returns (FunctionCreateResponse);
|
2100
2800
|
rpc FunctionGet(FunctionGetRequest) returns (FunctionGetResponse);
|
2101
2801
|
rpc FunctionGetCallGraph(FunctionGetCallGraphRequest) returns (FunctionGetCallGraphResponse);
|
2102
2802
|
rpc FunctionGetCurrentStats(FunctionGetCurrentStatsRequest) returns (FunctionStats);
|
2803
|
+
rpc FunctionGetDynamicConcurrency(FunctionGetDynamicConcurrencyRequest) returns (FunctionGetDynamicConcurrencyResponse);
|
2103
2804
|
rpc FunctionGetInputs(FunctionGetInputsRequest) returns (FunctionGetInputsResponse); // For containers to request next call
|
2104
2805
|
rpc FunctionGetOutputs(FunctionGetOutputsRequest) returns (FunctionGetOutputsResponse); // Returns the next result(s) for an entire function call (FunctionMap)
|
2105
2806
|
rpc FunctionGetSerialized(FunctionGetSerializedRequest) returns (FunctionGetSerializedResponse);
|
@@ -2107,71 +2808,70 @@ service ModalClient {
|
|
2107
2808
|
rpc FunctionPrecreate(FunctionPrecreateRequest) returns (FunctionPrecreateResponse);
|
2108
2809
|
rpc FunctionPutInputs(FunctionPutInputsRequest) returns (FunctionPutInputsResponse);
|
2109
2810
|
rpc FunctionPutOutputs(FunctionPutOutputsRequest) returns (google.protobuf.Empty); // For containers to return result
|
2110
|
-
rpc
|
2111
|
-
|
2112
|
-
// Function calls
|
2113
|
-
rpc FunctionCallCancel(FunctionCallCancelRequest) returns (google.protobuf.Empty);
|
2114
|
-
rpc FunctionCallList(FunctionCallListRequest) returns (FunctionCallListResponse);
|
2115
|
-
rpc FunctionCallGetDataIn(FunctionCallGetDataRequest) returns (stream DataChunk);
|
2116
|
-
rpc FunctionCallGetDataOut(FunctionCallGetDataRequest) returns (stream DataChunk);
|
2117
|
-
rpc FunctionCallPutDataOut(FunctionCallPutDataRequest) returns (google.protobuf.Empty);
|
2118
|
-
|
2119
|
-
// Interactive functions
|
2811
|
+
rpc FunctionRetryInputs(FunctionRetryInputsRequest) returns (FunctionRetryInputsResponse);
|
2120
2812
|
rpc FunctionStartPtyShell(google.protobuf.Empty) returns (google.protobuf.Empty);
|
2813
|
+
rpc FunctionUpdateSchedulingParams(FunctionUpdateSchedulingParamsRequest) returns (FunctionUpdateSchedulingParamsResponse);
|
2121
2814
|
|
2122
2815
|
// Images
|
2816
|
+
rpc ImageFromId(ImageFromIdRequest) returns (ImageFromIdResponse);
|
2123
2817
|
rpc ImageGetOrCreate(ImageGetOrCreateRequest) returns (ImageGetOrCreateResponse);
|
2124
2818
|
rpc ImageJoinStreaming(ImageJoinStreamingRequest) returns (stream ImageJoinStreamingResponse);
|
2125
2819
|
|
2126
2820
|
// Mounts
|
2127
|
-
rpc MountPutFile(MountPutFileRequest) returns (MountPutFileResponse);
|
2128
|
-
rpc MountBuild(MountBuildRequest) returns (MountBuildResponse);
|
2129
2821
|
rpc MountGetOrCreate(MountGetOrCreateRequest) returns (MountGetOrCreateResponse);
|
2822
|
+
rpc MountPutFile(MountPutFileRequest) returns (MountPutFileResponse);
|
2130
2823
|
|
2131
2824
|
// Proxies
|
2825
|
+
rpc ProxyCreate(ProxyCreateRequest) returns (ProxyCreateResponse);
|
2826
|
+
rpc ProxyDelete(ProxyDeleteRequest) returns (google.protobuf.Empty);
|
2827
|
+
rpc ProxyGet(ProxyGetRequest) returns (ProxyGetResponse);
|
2132
2828
|
rpc ProxyGetOrCreate(ProxyGetOrCreateRequest) returns (ProxyGetOrCreateResponse);
|
2829
|
+
rpc ProxyList(google.protobuf.Empty) returns (ProxyListResponse);
|
2133
2830
|
|
2134
2831
|
// Queues
|
2135
|
-
rpc
|
2832
|
+
rpc QueueClear(QueueClearRequest) returns (google.protobuf.Empty);
|
2136
2833
|
rpc QueueDelete(QueueDeleteRequest) returns (google.protobuf.Empty);
|
2137
|
-
rpc QueueGetOrCreate(QueueGetOrCreateRequest) returns (QueueGetOrCreateResponse);
|
2138
2834
|
rpc QueueGet(QueueGetRequest) returns (QueueGetResponse);
|
2835
|
+
rpc QueueGetOrCreate(QueueGetOrCreateRequest) returns (QueueGetOrCreateResponse);
|
2139
2836
|
rpc QueueHeartbeat(QueueHeartbeatRequest) returns (google.protobuf.Empty);
|
2140
|
-
rpc QueuePut(QueuePutRequest) returns (google.protobuf.Empty);
|
2141
2837
|
rpc QueueLen(QueueLenRequest) returns (QueueLenResponse);
|
2838
|
+
rpc QueueList(QueueListRequest) returns (QueueListResponse);
|
2142
2839
|
rpc QueueNextItems(QueueNextItemsRequest) returns (QueueNextItemsResponse);
|
2840
|
+
rpc QueuePut(QueuePutRequest) returns (google.protobuf.Empty);
|
2143
2841
|
|
2144
2842
|
// Sandboxes
|
2145
2843
|
rpc SandboxCreate(SandboxCreateRequest) returns (SandboxCreateResponse);
|
2146
|
-
rpc SandboxGetTaskId(SandboxGetTaskIdRequest) returns (SandboxGetTaskIdResponse); // needed for modal container exec
|
2147
2844
|
rpc SandboxGetLogs(SandboxGetLogsRequest) returns (stream TaskLogsBatch);
|
2148
|
-
rpc
|
2845
|
+
rpc SandboxGetTaskId(SandboxGetTaskIdRequest) returns (SandboxGetTaskIdResponse); // needed for modal container exec
|
2846
|
+
rpc SandboxGetTunnels(SandboxGetTunnelsRequest) returns (SandboxGetTunnelsResponse);
|
2149
2847
|
rpc SandboxList(SandboxListRequest) returns (SandboxListResponse);
|
2150
|
-
rpc
|
2848
|
+
rpc SandboxSnapshotFs(SandboxSnapshotFsRequest) returns (SandboxSnapshotFsResponse);
|
2151
2849
|
rpc SandboxStdinWrite(SandboxStdinWriteRequest) returns (SandboxStdinWriteResponse);
|
2850
|
+
rpc SandboxTagsSet(SandboxTagsSetRequest) returns (google.protobuf.Empty);
|
2851
|
+
rpc SandboxTerminate(SandboxTerminateRequest) returns (SandboxTerminateResponse);
|
2852
|
+
rpc SandboxWait(SandboxWaitRequest) returns (SandboxWaitResponse);
|
2152
2853
|
|
2153
2854
|
// Secrets
|
2154
|
-
rpc
|
2855
|
+
rpc SecretDelete(SecretDeleteRequest) returns (google.protobuf.Empty);
|
2155
2856
|
rpc SecretGetOrCreate(SecretGetOrCreateRequest) returns (SecretGetOrCreateResponse);
|
2156
2857
|
rpc SecretList(SecretListRequest) returns (SecretListResponse);
|
2157
2858
|
|
2158
2859
|
// SharedVolumes
|
2860
|
+
rpc SharedVolumeDelete(SharedVolumeDeleteRequest) returns (google.protobuf.Empty);
|
2861
|
+
rpc SharedVolumeGetFile(SharedVolumeGetFileRequest) returns (SharedVolumeGetFileResponse);
|
2159
2862
|
rpc SharedVolumeGetOrCreate(SharedVolumeGetOrCreateRequest) returns (SharedVolumeGetOrCreateResponse);
|
2160
|
-
rpc SharedVolumeCreate(SharedVolumeCreateRequest) returns (SharedVolumeCreateResponse);
|
2161
2863
|
rpc SharedVolumeHeartbeat(SharedVolumeHeartbeatRequest) returns (google.protobuf.Empty);
|
2162
2864
|
rpc SharedVolumeList(SharedVolumeListRequest) returns (SharedVolumeListResponse);
|
2163
2865
|
rpc SharedVolumeListFiles(SharedVolumeListFilesRequest) returns (SharedVolumeListFilesResponse);
|
2164
2866
|
rpc SharedVolumeListFilesStream(SharedVolumeListFilesRequest) returns (stream SharedVolumeListFilesResponse);
|
2165
2867
|
rpc SharedVolumePutFile(SharedVolumePutFileRequest) returns (SharedVolumePutFileResponse);
|
2166
|
-
rpc SharedVolumeGetFile(SharedVolumeGetFileRequest) returns (SharedVolumeGetFileResponse);
|
2167
2868
|
rpc SharedVolumeRemoveFile(SharedVolumeRemoveFileRequest) returns (google.protobuf.Empty);
|
2168
2869
|
|
2169
2870
|
// Tasks
|
2170
|
-
rpc
|
2171
|
-
rpc TaskList(TaskListRequest) returns (TaskListResponse);
|
2172
|
-
|
2173
|
-
// Gets the inputs currently assigned to the requesting task, requires task metadata for auth
|
2871
|
+
rpc TaskClusterHello(TaskClusterHelloRequest) returns (TaskClusterHelloResponse);
|
2174
2872
|
rpc TaskCurrentInputs(google.protobuf.Empty) returns (TaskCurrentInputsResponse);
|
2873
|
+
rpc TaskList(TaskListRequest) returns (TaskListResponse);
|
2874
|
+
rpc TaskResult(TaskResultRequest) returns (google.protobuf.Empty);
|
2175
2875
|
|
2176
2876
|
// Tokens (web auth flow)
|
2177
2877
|
rpc TokenFlowCreate(TokenFlowCreateRequest) returns (TokenFlowCreateResponse);
|
@@ -2182,18 +2882,18 @@ service ModalClient {
|
|
2182
2882
|
rpc TunnelStop(TunnelStopRequest) returns (TunnelStopResponse);
|
2183
2883
|
|
2184
2884
|
// Volumes
|
2185
|
-
rpc VolumeGetOrCreate(VolumeGetOrCreateRequest) returns (VolumeGetOrCreateResponse);
|
2186
|
-
rpc VolumeCreate(VolumeCreateRequest) returns (VolumeCreateResponse);
|
2187
|
-
rpc VolumeHeartbeat(VolumeHeartbeatRequest) returns (google.protobuf.Empty);
|
2188
2885
|
rpc VolumeCommit(VolumeCommitRequest) returns (VolumeCommitResponse);
|
2886
|
+
rpc VolumeCopyFiles(VolumeCopyFilesRequest) returns (google.protobuf.Empty);
|
2189
2887
|
rpc VolumeDelete(VolumeDeleteRequest) returns (google.protobuf.Empty);
|
2190
2888
|
rpc VolumeGetFile(VolumeGetFileRequest) returns (VolumeGetFileResponse);
|
2889
|
+
rpc VolumeGetOrCreate(VolumeGetOrCreateRequest) returns (VolumeGetOrCreateResponse);
|
2890
|
+
rpc VolumeHeartbeat(VolumeHeartbeatRequest) returns (google.protobuf.Empty);
|
2191
2891
|
rpc VolumeList(VolumeListRequest) returns (VolumeListResponse);
|
2192
2892
|
rpc VolumeListFiles(VolumeListFilesRequest) returns (stream VolumeListFilesResponse);
|
2193
2893
|
rpc VolumePutFiles(VolumePutFilesRequest) returns (google.protobuf.Empty);
|
2194
2894
|
rpc VolumeReload(VolumeReloadRequest) returns (google.protobuf.Empty);
|
2195
2895
|
rpc VolumeRemoveFile(VolumeRemoveFileRequest) returns (google.protobuf.Empty);
|
2196
|
-
rpc
|
2896
|
+
rpc VolumeRename(VolumeRenameRequest) returns (google.protobuf.Empty);
|
2197
2897
|
|
2198
2898
|
// Workspaces
|
2199
2899
|
rpc WorkspaceNameLookup(google.protobuf.Empty) returns (WorkspaceNameLookupResponse);
|