indexify 0.3.17__py3-none-any.whl → 0.3.19__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.
Files changed (35) hide show
  1. indexify/cli/cli.py +21 -18
  2. indexify/executor/api_objects.py +12 -0
  3. indexify/executor/downloader.py +4 -1
  4. indexify/executor/executor.py +65 -28
  5. indexify/executor/executor_flavor.py +7 -0
  6. indexify/executor/function_executor/function_executor.py +24 -11
  7. indexify/executor/function_executor/function_executor_state.py +9 -1
  8. indexify/executor/function_executor/function_executor_states_container.py +3 -1
  9. indexify/executor/function_executor/function_executor_status.py +2 -0
  10. indexify/executor/function_executor/health_checker.py +20 -2
  11. indexify/executor/function_executor/server/subprocess_function_executor_server_factory.py +6 -0
  12. indexify/executor/function_executor/single_task_runner.py +15 -11
  13. indexify/executor/function_executor/task_output.py +35 -2
  14. indexify/executor/grpc/channel_manager.py +160 -0
  15. indexify/executor/grpc/completed_tasks_container.py +26 -0
  16. indexify/executor/grpc/function_executor_controller.py +421 -0
  17. indexify/executor/grpc/state_reconciler.py +33 -38
  18. indexify/executor/grpc/state_reporter.py +100 -39
  19. indexify/executor/grpc/task_controller.py +449 -0
  20. indexify/executor/metrics/task_reporter.py +14 -0
  21. indexify/executor/task_fetcher.py +8 -3
  22. indexify/executor/task_reporter.py +112 -4
  23. indexify/executor/task_runner.py +1 -0
  24. indexify/proto/{task_scheduler.proto → executor_api.proto} +86 -11
  25. indexify/proto/executor_api_pb2.py +80 -0
  26. indexify/proto/{task_scheduler_pb2.pyi → executor_api_pb2.pyi} +162 -7
  27. indexify/proto/executor_api_pb2_grpc.py +227 -0
  28. {indexify-0.3.17.dist-info → indexify-0.3.19.dist-info}/METADATA +1 -1
  29. {indexify-0.3.17.dist-info → indexify-0.3.19.dist-info}/RECORD +32 -28
  30. indexify/executor/grpc/channel_creator.py +0 -53
  31. indexify/proto/task_scheduler_pb2.py +0 -64
  32. indexify/proto/task_scheduler_pb2_grpc.py +0 -170
  33. /indexify/executor/grpc/metrics/{channel_creator.py → channel_manager.py} +0 -0
  34. {indexify-0.3.17.dist-info → indexify-0.3.19.dist-info}/WHEEL +0 -0
  35. {indexify-0.3.17.dist-info → indexify-0.3.19.dist-info}/entry_points.txt +0 -0
@@ -1,8 +1,10 @@
1
1
  syntax = "proto3";
2
2
 
3
- package task_scheduler_service;
3
+ // Rename with caution. The package name is part of gRPC service name.
4
+ // Existing clients won't find the service if the package name changes.
5
+ package executor_api_pb;
4
6
 
5
- // ===== ReportExecutorState RPC =====
7
+ // ===== report_executor_state RPC =====
6
8
 
7
9
  enum GPUModel {
8
10
  GPU_MODEL_UNKNOWN = 0;
@@ -52,7 +54,10 @@ enum FunctionExecutorStatus {
52
54
  FUNCTION_EXECUTOR_STATUS_RUNNING_TASK = 5;
53
55
  FUNCTION_EXECUTOR_STATUS_UNHEALTHY = 6;
54
56
  FUNCTION_EXECUTOR_STATUS_STOPPING = 7;
57
+ // FE is stopped but can be started up.
55
58
  FUNCTION_EXECUTOR_STATUS_STOPPED = 8;
59
+ // FE is stopped forever, all resources are freed.
60
+ FUNCTION_EXECUTOR_STATUS_SHUTDOWN = 9;
56
61
  }
57
62
 
58
63
  // Immutable information that identifies and describes a Function Executor.
@@ -65,11 +70,17 @@ message FunctionExecutorDescription {
65
70
  optional string image_uri = 6;
66
71
  repeated string secret_names = 7;
67
72
  optional HostResources resource_limits = 8;
73
+ // Timeout for customer code duration during FE creation.
74
+ optional uint32 customer_code_timeout_ms = 9;
68
75
  }
69
76
 
70
77
  message FunctionExecutorState {
71
78
  optional FunctionExecutorDescription description = 1;
72
79
  optional FunctionExecutorStatus status = 2;
80
+ // Human readable message clarifying the status.
81
+ // Currently it contains error message from customer code
82
+ // if status is FUNCTION_EXECUTOR_STATUS_STARTUP_FAILED_CUSTOMER_ERROR.
83
+ optional string status_message = 3;
73
84
  }
74
85
 
75
86
  enum ExecutorStatus {
@@ -81,15 +92,26 @@ enum ExecutorStatus {
81
92
  EXECUTOR_STATUS_STOPPED = 5;
82
93
  }
83
94
 
95
+ enum ExecutorFlavor {
96
+ EXECUTOR_FLAVOR_UNKNOWN = 0;
97
+ EXECUTOR_FLAVOR_OSS = 1;
98
+ EXECUTOR_FLAVOR_PLATFORM = 2;
99
+ }
100
+
84
101
  message ExecutorState {
85
102
  optional string executor_id = 1;
86
103
  optional bool development_mode = 2;
87
- optional ExecutorStatus executor_status = 3;
104
+ optional string hostname = 3;
105
+ optional ExecutorFlavor flavor = 4;
106
+ optional string version = 5;
107
+ optional ExecutorStatus status = 6;
88
108
  // Free resources available at the Executor.
89
- optional HostResources free_resources = 4;
109
+ optional HostResources free_resources = 7;
90
110
  // Empty allowed_functions list means that any function can run on the Executor.
91
- repeated AllowedFunction allowed_functions = 5;
92
- repeated FunctionExecutorState function_executor_states = 6;
111
+ repeated AllowedFunction allowed_functions = 8;
112
+ repeated FunctionExecutorState function_executor_states = 9;
113
+ map<string, string> labels = 10;
114
+ optional string state_hash = 11;
93
115
  }
94
116
 
95
117
  // A message sent by Executor to report its up to date state to Server.
@@ -101,7 +123,7 @@ message ReportExecutorStateRequest {
101
123
  message ReportExecutorStateResponse {
102
124
  }
103
125
 
104
- // ===== GetDesiredExecutorStates RPC =====
126
+ // ===== get_desired_executor_states RPC =====
105
127
  message Task {
106
128
  optional string id = 1;
107
129
  optional string namespace = 2;
@@ -111,7 +133,7 @@ message Task {
111
133
  optional string graph_invocation_id = 6;
112
134
  optional string input_key = 8;
113
135
  optional string reducer_output_key = 9;
114
- optional string timeout_ms = 10;
136
+ optional uint32 timeout_ms = 10;
115
137
  }
116
138
 
117
139
  message TaskAllocation {
@@ -134,9 +156,62 @@ message DesiredExecutorState {
134
156
  optional uint64 clock = 3;
135
157
  }
136
158
 
159
+ // ===== report_task_outcome RPC =====
160
+ enum TaskOutcome {
161
+ TASK_OUTCOME_UNKNOWN = 0;
162
+ TASK_OUTCOME_SUCCESS = 1;
163
+ TASK_OUTCOME_FAILURE = 2;
164
+ }
165
+
166
+ message DataPayload {
167
+ optional string path = 1;
168
+ optional uint64 size = 2;
169
+ optional string sha256_hash = 3;
170
+ }
171
+
172
+ enum OutputEncoding {
173
+ OUTPUT_ENCODING_UNKNOWN = 0;
174
+ OUTPUT_ENCODING_JSON = 1;
175
+ OUTPUT_ENCODING_PICKLE = 2;
176
+ OUTPUT_ENCODING_BINARY = 3;
177
+ }
178
+
179
+ message ReportTaskOutcomeRequest {
180
+ optional string task_id = 1;
181
+ optional string namespace = 2;
182
+ optional string graph_name = 3;
183
+ optional string function_name = 4;
184
+ optional string graph_invocation_id = 6;
185
+ optional TaskOutcome outcome = 7;
186
+ optional string invocation_id = 8;
187
+ optional string executor_id = 9;
188
+ optional bool reducer = 10;
189
+
190
+ // Edges that the function wants the invocation to be routed to.
191
+ // Previously called router_edges.
192
+ repeated string next_functions = 11;
193
+ // Outputs of the function.
194
+ repeated DataPayload fn_outputs = 12;
195
+ // Standard output and error streams of the function.
196
+ optional DataPayload stdout = 14;
197
+ optional DataPayload stderr = 15;
198
+ // Output encoding of all the outputs of a function have to be same.
199
+ optional OutputEncoding output_encoding = 13;
200
+ // This allows us to change how we encode the output from functions
201
+ // and serialize them into storage.
202
+ optional uint64 output_encoding_version = 5;
203
+ }
204
+
205
+ message ReportTaskOutcomeResponse {
206
+ }
207
+
137
208
  // Internal API for scheduling and running tasks on Executors. Executors are acting as clients of this API.
138
209
  // Server is responsible for scheduling tasks on Executors and Executors are responsible for running the tasks.
139
- service TaskSchedulerService {
210
+ //
211
+ // Rename with caution. Existing clients won't find the service if the service name changes. A HTTP2 ingress proxy
212
+ // might use the service name in it HTTP2 path based routing rules. See how gRPC uses service names in its HTTP2 paths
213
+ // at https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md.
214
+ service ExecutorAPI {
140
215
  // Called by Executor every 5 seconds to report that it's still alive and provide its current state.
141
216
  //
142
217
  // Missing 3 reports will result in the Executor being deregistered by Server.
@@ -148,6 +223,6 @@ service TaskSchedulerService {
148
223
  // Deprecated HTTP API is used to download the serialized graph and task inputs.
149
224
  rpc get_desired_executor_states(GetDesiredExecutorStatesRequest) returns (stream DesiredExecutorState) {}
150
225
 
151
- // Task outcome is currently reported via deprecated HTTP API. We're going to migrate task output reporting to gRPC
152
- // when we move S3 downloads and uploads to Executor.
226
+ // Report the outcome of a task.
227
+ rpc report_task_outcome(ReportTaskOutcomeRequest) returns (ReportTaskOutcomeResponse) {}
153
228
  }
@@ -0,0 +1,80 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: indexify/proto/executor_api.proto
5
+ # Protobuf Python Version: 5.29.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+
13
+ _runtime_version.ValidateProtobufRuntimeVersion(
14
+ _runtime_version.Domain.PUBLIC, 5, 29, 0, "", "indexify/proto/executor_api.proto"
15
+ )
16
+ # @@protoc_insertion_point(imports)
17
+
18
+ _sym_db = _symbol_database.Default()
19
+
20
+
21
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
22
+ b'\n!indexify/proto/executor_api.proto\x12\x0f\x65xecutor_api_pb"e\n\x0cGPUResources\x12\x12\n\x05\x63ount\x18\x01 \x01(\rH\x00\x88\x01\x01\x12-\n\x05model\x18\x02 \x01(\x0e\x32\x19.executor_api_pb.GPUModelH\x01\x88\x01\x01\x42\x08\n\x06_countB\x08\n\x06_model"\xc2\x01\n\rHostResources\x12\x16\n\tcpu_count\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x17\n\ndisk_bytes\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12/\n\x03gpu\x18\x04 \x01(\x0b\x32\x1d.executor_api_pb.GPUResourcesH\x03\x88\x01\x01\x42\x0c\n\n_cpu_countB\x0f\n\r_memory_bytesB\r\n\x0b_disk_bytesB\x06\n\x04_gpu"\xbb\x01\n\x0f\x41llowedFunction\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ngraph_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\rgraph_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x0c\n\n_namespaceB\r\n\x0b_graph_nameB\x10\n\x0e_function_nameB\x10\n\x0e_graph_version"\xb1\x03\n\x1b\x46unctionExecutorDescription\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\ngraph_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\rgraph_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x16\n\timage_uri\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x0csecret_names\x18\x07 \x03(\t\x12<\n\x0fresource_limits\x18\x08 \x01(\x0b\x32\x1e.executor_api_pb.HostResourcesH\x06\x88\x01\x01\x12%\n\x18\x63ustomer_code_timeout_ms\x18\t \x01(\rH\x07\x88\x01\x01\x42\x05\n\x03_idB\x0c\n\n_namespaceB\r\n\x0b_graph_nameB\x10\n\x0e_graph_versionB\x10\n\x0e_function_nameB\x0c\n\n_image_uriB\x12\n\x10_resource_limitsB\x1b\n\x19_customer_code_timeout_ms"\xe8\x01\n\x15\x46unctionExecutorState\x12\x46\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32,.executor_api_pb.FunctionExecutorDescriptionH\x00\x88\x01\x01\x12<\n\x06status\x18\x02 \x01(\x0e\x32\'.executor_api_pb.FunctionExecutorStatusH\x01\x88\x01\x01\x12\x1b\n\x0estatus_message\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x0e\n\x0c_descriptionB\t\n\x07_statusB\x11\n\x0f_status_message"\x9f\x05\n\rExecutorState\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10\x64\x65velopment_mode\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x15\n\x08hostname\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x34\n\x06\x66lavor\x18\x04 \x01(\x0e\x32\x1f.executor_api_pb.ExecutorFlavorH\x03\x88\x01\x01\x12\x14\n\x07version\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x34\n\x06status\x18\x06 \x01(\x0e\x32\x1f.executor_api_pb.ExecutorStatusH\x05\x88\x01\x01\x12;\n\x0e\x66ree_resources\x18\x07 \x01(\x0b\x32\x1e.executor_api_pb.HostResourcesH\x06\x88\x01\x01\x12;\n\x11\x61llowed_functions\x18\x08 \x03(\x0b\x32 .executor_api_pb.AllowedFunction\x12H\n\x18\x66unction_executor_states\x18\t \x03(\x0b\x32&.executor_api_pb.FunctionExecutorState\x12:\n\x06labels\x18\n \x03(\x0b\x32*.executor_api_pb.ExecutorState.LabelsEntry\x12\x17\n\nstate_hash\x18\x0b \x01(\tH\x07\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_executor_idB\x13\n\x11_development_modeB\x0b\n\t_hostnameB\t\n\x07_flavorB\n\n\x08_versionB\t\n\x07_statusB\x11\n\x0f_free_resourcesB\r\n\x0b_state_hash"l\n\x1aReportExecutorStateRequest\x12;\n\x0e\x65xecutor_state\x18\x01 \x01(\x0b\x32\x1e.executor_api_pb.ExecutorStateH\x00\x88\x01\x01\x42\x11\n\x0f_executor_state"\x1d\n\x1bReportExecutorStateResponse"\x88\x03\n\x04Task\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\ngraph_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\rgraph_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x05 \x01(\tH\x04\x88\x01\x01\x12 \n\x13graph_invocation_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x16\n\tinput_key\x18\x08 \x01(\tH\x06\x88\x01\x01\x12\x1f\n\x12reducer_output_key\x18\t \x01(\tH\x07\x88\x01\x01\x12\x17\n\ntimeout_ms\x18\n \x01(\rH\x08\x88\x01\x01\x42\x05\n\x03_idB\x0c\n\n_namespaceB\r\n\x0b_graph_nameB\x10\n\x0e_graph_versionB\x10\n\x0e_function_nameB\x16\n\x14_graph_invocation_idB\x0c\n\n_input_keyB\x15\n\x13_reducer_output_keyB\r\n\x0b_timeout_ms"\x7f\n\x0eTaskAllocation\x12!\n\x14\x66unction_executor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12(\n\x04task\x18\x02 \x01(\x0b\x32\x15.executor_api_pb.TaskH\x01\x88\x01\x01\x42\x17\n\x15_function_executor_idB\x07\n\x05_task"K\n\x1fGetDesiredExecutorStatesRequest\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_executor_id"\xb9\x01\n\x14\x44\x65siredExecutorState\x12H\n\x12\x66unction_executors\x18\x01 \x03(\x0b\x32,.executor_api_pb.FunctionExecutorDescription\x12\x39\n\x10task_allocations\x18\x02 \x03(\x0b\x32\x1f.executor_api_pb.TaskAllocation\x12\x12\n\x05\x63lock\x18\x03 \x01(\x04H\x00\x88\x01\x01\x42\x08\n\x06_clock"o\n\x0b\x44\x61taPayload\x12\x11\n\x04path\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04size\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x18\n\x0bsha256_hash\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x07\n\x05_pathB\x07\n\x05_sizeB\x0e\n\x0c_sha256_hash"\x87\x06\n\x18ReportTaskOutcomeRequest\x12\x14\n\x07task_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\ngraph_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x04 \x01(\tH\x03\x88\x01\x01\x12 \n\x13graph_invocation_id\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x32\n\x07outcome\x18\x07 \x01(\x0e\x32\x1c.executor_api_pb.TaskOutcomeH\x05\x88\x01\x01\x12\x1a\n\rinvocation_id\x18\x08 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x65xecutor_id\x18\t \x01(\tH\x07\x88\x01\x01\x12\x14\n\x07reducer\x18\n \x01(\x08H\x08\x88\x01\x01\x12\x16\n\x0enext_functions\x18\x0b \x03(\t\x12\x30\n\nfn_outputs\x18\x0c \x03(\x0b\x32\x1c.executor_api_pb.DataPayload\x12\x31\n\x06stdout\x18\x0e \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\t\x88\x01\x01\x12\x31\n\x06stderr\x18\x0f \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\n\x88\x01\x01\x12=\n\x0foutput_encoding\x18\r \x01(\x0e\x32\x1f.executor_api_pb.OutputEncodingH\x0b\x88\x01\x01\x12$\n\x17output_encoding_version\x18\x05 \x01(\x04H\x0c\x88\x01\x01\x42\n\n\x08_task_idB\x0c\n\n_namespaceB\r\n\x0b_graph_nameB\x10\n\x0e_function_nameB\x16\n\x14_graph_invocation_idB\n\n\x08_outcomeB\x10\n\x0e_invocation_idB\x0e\n\x0c_executor_idB\n\n\x08_reducerB\t\n\x07_stdoutB\t\n\x07_stderrB\x12\n\x10_output_encodingB\x1a\n\x18_output_encoding_version"\x1b\n\x19ReportTaskOutcomeResponse*\x86\x03\n\x08GPUModel\x12\x15\n\x11GPU_MODEL_UNKNOWN\x10\x00\x12"\n\x1eGPU_MODEL_NVIDIA_TESLA_T4_16GB\x10\n\x12$\n GPU_MODEL_NVIDIA_TESLA_V100_16GB\x10\x14\x12\x1d\n\x19GPU_MODEL_NVIDIA_A10_24GB\x10\x1e\x12\x1f\n\x1bGPU_MODEL_NVIDIA_A6000_48GB\x10(\x12#\n\x1fGPU_MODEL_NVIDIA_A100_SXM4_40GB\x10\x32\x12#\n\x1fGPU_MODEL_NVIDIA_A100_SXM4_80GB\x10\x33\x12"\n\x1eGPU_MODEL_NVIDIA_A100_PCI_40GB\x10\x34\x12#\n\x1fGPU_MODEL_NVIDIA_H100_SXM5_80GB\x10<\x12"\n\x1eGPU_MODEL_NVIDIA_H100_PCI_80GB\x10=\x12"\n\x1eGPU_MODEL_NVIDIA_RTX_6000_24GB\x10>*\xca\x03\n\x16\x46unctionExecutorStatus\x12$\n FUNCTION_EXECUTOR_STATUS_UNKNOWN\x10\x00\x12(\n$FUNCTION_EXECUTOR_STATUS_STARTING_UP\x10\x01\x12:\n6FUNCTION_EXECUTOR_STATUS_STARTUP_FAILED_CUSTOMER_ERROR\x10\x02\x12:\n6FUNCTION_EXECUTOR_STATUS_STARTUP_FAILED_PLATFORM_ERROR\x10\x03\x12!\n\x1d\x46UNCTION_EXECUTOR_STATUS_IDLE\x10\x04\x12)\n%FUNCTION_EXECUTOR_STATUS_RUNNING_TASK\x10\x05\x12&\n"FUNCTION_EXECUTOR_STATUS_UNHEALTHY\x10\x06\x12%\n!FUNCTION_EXECUTOR_STATUS_STOPPING\x10\x07\x12$\n FUNCTION_EXECUTOR_STATUS_STOPPED\x10\x08\x12%\n!FUNCTION_EXECUTOR_STATUS_SHUTDOWN\x10\t*\xc3\x01\n\x0e\x45xecutorStatus\x12\x1b\n\x17\x45XECUTOR_STATUS_UNKNOWN\x10\x00\x12\x1f\n\x1b\x45XECUTOR_STATUS_STARTING_UP\x10\x01\x12\x1b\n\x17\x45XECUTOR_STATUS_RUNNING\x10\x02\x12\x1b\n\x17\x45XECUTOR_STATUS_DRAINED\x10\x03\x12\x1c\n\x18\x45XECUTOR_STATUS_STOPPING\x10\x04\x12\x1b\n\x17\x45XECUTOR_STATUS_STOPPED\x10\x05*d\n\x0e\x45xecutorFlavor\x12\x1b\n\x17\x45XECUTOR_FLAVOR_UNKNOWN\x10\x00\x12\x17\n\x13\x45XECUTOR_FLAVOR_OSS\x10\x01\x12\x1c\n\x18\x45XECUTOR_FLAVOR_PLATFORM\x10\x02*[\n\x0bTaskOutcome\x12\x18\n\x14TASK_OUTCOME_UNKNOWN\x10\x00\x12\x18\n\x14TASK_OUTCOME_SUCCESS\x10\x01\x12\x18\n\x14TASK_OUTCOME_FAILURE\x10\x02*\x7f\n\x0eOutputEncoding\x12\x1b\n\x17OUTPUT_ENCODING_UNKNOWN\x10\x00\x12\x18\n\x14OUTPUT_ENCODING_JSON\x10\x01\x12\x1a\n\x16OUTPUT_ENCODING_PICKLE\x10\x02\x12\x1a\n\x16OUTPUT_ENCODING_BINARY\x10\x03\x32\xef\x02\n\x0b\x45xecutorAPI\x12t\n\x15report_executor_state\x12+.executor_api_pb.ReportExecutorStateRequest\x1a,.executor_api_pb.ReportExecutorStateResponse"\x00\x12z\n\x1bget_desired_executor_states\x12\x30.executor_api_pb.GetDesiredExecutorStatesRequest\x1a%.executor_api_pb.DesiredExecutorState"\x00\x30\x01\x12n\n\x13report_task_outcome\x12).executor_api_pb.ReportTaskOutcomeRequest\x1a*.executor_api_pb.ReportTaskOutcomeResponse"\x00\x62\x06proto3'
23
+ )
24
+
25
+ _globals = globals()
26
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
27
+ _builder.BuildTopDescriptorsAndMessages(
28
+ DESCRIPTOR, "indexify.proto.executor_api_pb2", _globals
29
+ )
30
+ if not _descriptor._USE_C_DESCRIPTORS:
31
+ DESCRIPTOR._loaded_options = None
32
+ _globals["_EXECUTORSTATE_LABELSENTRY"]._loaded_options = None
33
+ _globals["_EXECUTORSTATE_LABELSENTRY"]._serialized_options = b"8\001"
34
+ _globals["_GPUMODEL"]._serialized_start = 3740
35
+ _globals["_GPUMODEL"]._serialized_end = 4130
36
+ _globals["_FUNCTIONEXECUTORSTATUS"]._serialized_start = 4133
37
+ _globals["_FUNCTIONEXECUTORSTATUS"]._serialized_end = 4591
38
+ _globals["_EXECUTORSTATUS"]._serialized_start = 4594
39
+ _globals["_EXECUTORSTATUS"]._serialized_end = 4789
40
+ _globals["_EXECUTORFLAVOR"]._serialized_start = 4791
41
+ _globals["_EXECUTORFLAVOR"]._serialized_end = 4891
42
+ _globals["_TASKOUTCOME"]._serialized_start = 4893
43
+ _globals["_TASKOUTCOME"]._serialized_end = 4984
44
+ _globals["_OUTPUTENCODING"]._serialized_start = 4986
45
+ _globals["_OUTPUTENCODING"]._serialized_end = 5113
46
+ _globals["_GPURESOURCES"]._serialized_start = 54
47
+ _globals["_GPURESOURCES"]._serialized_end = 155
48
+ _globals["_HOSTRESOURCES"]._serialized_start = 158
49
+ _globals["_HOSTRESOURCES"]._serialized_end = 352
50
+ _globals["_ALLOWEDFUNCTION"]._serialized_start = 355
51
+ _globals["_ALLOWEDFUNCTION"]._serialized_end = 542
52
+ _globals["_FUNCTIONEXECUTORDESCRIPTION"]._serialized_start = 545
53
+ _globals["_FUNCTIONEXECUTORDESCRIPTION"]._serialized_end = 978
54
+ _globals["_FUNCTIONEXECUTORSTATE"]._serialized_start = 981
55
+ _globals["_FUNCTIONEXECUTORSTATE"]._serialized_end = 1213
56
+ _globals["_EXECUTORSTATE"]._serialized_start = 1216
57
+ _globals["_EXECUTORSTATE"]._serialized_end = 1887
58
+ _globals["_EXECUTORSTATE_LABELSENTRY"]._serialized_start = 1724
59
+ _globals["_EXECUTORSTATE_LABELSENTRY"]._serialized_end = 1769
60
+ _globals["_REPORTEXECUTORSTATEREQUEST"]._serialized_start = 1889
61
+ _globals["_REPORTEXECUTORSTATEREQUEST"]._serialized_end = 1997
62
+ _globals["_REPORTEXECUTORSTATERESPONSE"]._serialized_start = 1999
63
+ _globals["_REPORTEXECUTORSTATERESPONSE"]._serialized_end = 2028
64
+ _globals["_TASK"]._serialized_start = 2031
65
+ _globals["_TASK"]._serialized_end = 2423
66
+ _globals["_TASKALLOCATION"]._serialized_start = 2425
67
+ _globals["_TASKALLOCATION"]._serialized_end = 2552
68
+ _globals["_GETDESIREDEXECUTORSTATESREQUEST"]._serialized_start = 2554
69
+ _globals["_GETDESIREDEXECUTORSTATESREQUEST"]._serialized_end = 2629
70
+ _globals["_DESIREDEXECUTORSTATE"]._serialized_start = 2632
71
+ _globals["_DESIREDEXECUTORSTATE"]._serialized_end = 2817
72
+ _globals["_DATAPAYLOAD"]._serialized_start = 2819
73
+ _globals["_DATAPAYLOAD"]._serialized_end = 2930
74
+ _globals["_REPORTTASKOUTCOMEREQUEST"]._serialized_start = 2933
75
+ _globals["_REPORTTASKOUTCOMEREQUEST"]._serialized_end = 3708
76
+ _globals["_REPORTTASKOUTCOMERESPONSE"]._serialized_start = 3710
77
+ _globals["_REPORTTASKOUTCOMERESPONSE"]._serialized_end = 3737
78
+ _globals["_EXECUTORAPI"]._serialized_start = 5116
79
+ _globals["_EXECUTORAPI"]._serialized_end = 5483
80
+ # @@protoc_insertion_point(module_scope)
@@ -40,6 +40,7 @@ class FunctionExecutorStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
40
40
  FUNCTION_EXECUTOR_STATUS_UNHEALTHY: _ClassVar[FunctionExecutorStatus]
41
41
  FUNCTION_EXECUTOR_STATUS_STOPPING: _ClassVar[FunctionExecutorStatus]
42
42
  FUNCTION_EXECUTOR_STATUS_STOPPED: _ClassVar[FunctionExecutorStatus]
43
+ FUNCTION_EXECUTOR_STATUS_SHUTDOWN: _ClassVar[FunctionExecutorStatus]
43
44
 
44
45
  class ExecutorStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
45
46
  __slots__ = ()
@@ -50,6 +51,25 @@ class ExecutorStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
50
51
  EXECUTOR_STATUS_STOPPING: _ClassVar[ExecutorStatus]
51
52
  EXECUTOR_STATUS_STOPPED: _ClassVar[ExecutorStatus]
52
53
 
54
+ class ExecutorFlavor(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
55
+ __slots__ = ()
56
+ EXECUTOR_FLAVOR_UNKNOWN: _ClassVar[ExecutorFlavor]
57
+ EXECUTOR_FLAVOR_OSS: _ClassVar[ExecutorFlavor]
58
+ EXECUTOR_FLAVOR_PLATFORM: _ClassVar[ExecutorFlavor]
59
+
60
+ class TaskOutcome(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
61
+ __slots__ = ()
62
+ TASK_OUTCOME_UNKNOWN: _ClassVar[TaskOutcome]
63
+ TASK_OUTCOME_SUCCESS: _ClassVar[TaskOutcome]
64
+ TASK_OUTCOME_FAILURE: _ClassVar[TaskOutcome]
65
+
66
+ class OutputEncoding(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
67
+ __slots__ = ()
68
+ OUTPUT_ENCODING_UNKNOWN: _ClassVar[OutputEncoding]
69
+ OUTPUT_ENCODING_JSON: _ClassVar[OutputEncoding]
70
+ OUTPUT_ENCODING_PICKLE: _ClassVar[OutputEncoding]
71
+ OUTPUT_ENCODING_BINARY: _ClassVar[OutputEncoding]
72
+
53
73
  GPU_MODEL_UNKNOWN: GPUModel
54
74
  GPU_MODEL_NVIDIA_TESLA_T4_16GB: GPUModel
55
75
  GPU_MODEL_NVIDIA_TESLA_V100_16GB: GPUModel
@@ -70,12 +90,23 @@ FUNCTION_EXECUTOR_STATUS_RUNNING_TASK: FunctionExecutorStatus
70
90
  FUNCTION_EXECUTOR_STATUS_UNHEALTHY: FunctionExecutorStatus
71
91
  FUNCTION_EXECUTOR_STATUS_STOPPING: FunctionExecutorStatus
72
92
  FUNCTION_EXECUTOR_STATUS_STOPPED: FunctionExecutorStatus
93
+ FUNCTION_EXECUTOR_STATUS_SHUTDOWN: FunctionExecutorStatus
73
94
  EXECUTOR_STATUS_UNKNOWN: ExecutorStatus
74
95
  EXECUTOR_STATUS_STARTING_UP: ExecutorStatus
75
96
  EXECUTOR_STATUS_RUNNING: ExecutorStatus
76
97
  EXECUTOR_STATUS_DRAINED: ExecutorStatus
77
98
  EXECUTOR_STATUS_STOPPING: ExecutorStatus
78
99
  EXECUTOR_STATUS_STOPPED: ExecutorStatus
100
+ EXECUTOR_FLAVOR_UNKNOWN: ExecutorFlavor
101
+ EXECUTOR_FLAVOR_OSS: ExecutorFlavor
102
+ EXECUTOR_FLAVOR_PLATFORM: ExecutorFlavor
103
+ TASK_OUTCOME_UNKNOWN: TaskOutcome
104
+ TASK_OUTCOME_SUCCESS: TaskOutcome
105
+ TASK_OUTCOME_FAILURE: TaskOutcome
106
+ OUTPUT_ENCODING_UNKNOWN: OutputEncoding
107
+ OUTPUT_ENCODING_JSON: OutputEncoding
108
+ OUTPUT_ENCODING_PICKLE: OutputEncoding
109
+ OUTPUT_ENCODING_BINARY: OutputEncoding
79
110
 
80
111
  class GPUResources(_message.Message):
81
112
  __slots__ = ("count", "model")
@@ -133,6 +164,7 @@ class FunctionExecutorDescription(_message.Message):
133
164
  "image_uri",
134
165
  "secret_names",
135
166
  "resource_limits",
167
+ "customer_code_timeout_ms",
136
168
  )
137
169
  ID_FIELD_NUMBER: _ClassVar[int]
138
170
  NAMESPACE_FIELD_NUMBER: _ClassVar[int]
@@ -142,6 +174,7 @@ class FunctionExecutorDescription(_message.Message):
142
174
  IMAGE_URI_FIELD_NUMBER: _ClassVar[int]
143
175
  SECRET_NAMES_FIELD_NUMBER: _ClassVar[int]
144
176
  RESOURCE_LIMITS_FIELD_NUMBER: _ClassVar[int]
177
+ CUSTOMER_CODE_TIMEOUT_MS_FIELD_NUMBER: _ClassVar[int]
145
178
  id: str
146
179
  namespace: str
147
180
  graph_name: str
@@ -150,6 +183,7 @@ class FunctionExecutorDescription(_message.Message):
150
183
  image_uri: str
151
184
  secret_names: _containers.RepeatedScalarFieldContainer[str]
152
185
  resource_limits: HostResources
186
+ customer_code_timeout_ms: int
153
187
  def __init__(
154
188
  self,
155
189
  id: _Optional[str] = ...,
@@ -160,48 +194,81 @@ class FunctionExecutorDescription(_message.Message):
160
194
  image_uri: _Optional[str] = ...,
161
195
  secret_names: _Optional[_Iterable[str]] = ...,
162
196
  resource_limits: _Optional[_Union[HostResources, _Mapping]] = ...,
197
+ customer_code_timeout_ms: _Optional[int] = ...,
163
198
  ) -> None: ...
164
199
 
165
200
  class FunctionExecutorState(_message.Message):
166
- __slots__ = ("description", "status")
201
+ __slots__ = ("description", "status", "status_message")
167
202
  DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
168
203
  STATUS_FIELD_NUMBER: _ClassVar[int]
204
+ STATUS_MESSAGE_FIELD_NUMBER: _ClassVar[int]
169
205
  description: FunctionExecutorDescription
170
206
  status: FunctionExecutorStatus
207
+ status_message: str
171
208
  def __init__(
172
209
  self,
173
210
  description: _Optional[_Union[FunctionExecutorDescription, _Mapping]] = ...,
174
211
  status: _Optional[_Union[FunctionExecutorStatus, str]] = ...,
212
+ status_message: _Optional[str] = ...,
175
213
  ) -> None: ...
176
214
 
177
215
  class ExecutorState(_message.Message):
178
216
  __slots__ = (
179
217
  "executor_id",
180
218
  "development_mode",
181
- "executor_status",
219
+ "hostname",
220
+ "flavor",
221
+ "version",
222
+ "status",
182
223
  "free_resources",
183
224
  "allowed_functions",
184
225
  "function_executor_states",
226
+ "labels",
227
+ "state_hash",
185
228
  )
229
+
230
+ class LabelsEntry(_message.Message):
231
+ __slots__ = ("key", "value")
232
+ KEY_FIELD_NUMBER: _ClassVar[int]
233
+ VALUE_FIELD_NUMBER: _ClassVar[int]
234
+ key: str
235
+ value: str
236
+ def __init__(
237
+ self, key: _Optional[str] = ..., value: _Optional[str] = ...
238
+ ) -> None: ...
239
+
186
240
  EXECUTOR_ID_FIELD_NUMBER: _ClassVar[int]
187
241
  DEVELOPMENT_MODE_FIELD_NUMBER: _ClassVar[int]
188
- EXECUTOR_STATUS_FIELD_NUMBER: _ClassVar[int]
242
+ HOSTNAME_FIELD_NUMBER: _ClassVar[int]
243
+ FLAVOR_FIELD_NUMBER: _ClassVar[int]
244
+ VERSION_FIELD_NUMBER: _ClassVar[int]
245
+ STATUS_FIELD_NUMBER: _ClassVar[int]
189
246
  FREE_RESOURCES_FIELD_NUMBER: _ClassVar[int]
190
247
  ALLOWED_FUNCTIONS_FIELD_NUMBER: _ClassVar[int]
191
248
  FUNCTION_EXECUTOR_STATES_FIELD_NUMBER: _ClassVar[int]
249
+ LABELS_FIELD_NUMBER: _ClassVar[int]
250
+ STATE_HASH_FIELD_NUMBER: _ClassVar[int]
192
251
  executor_id: str
193
252
  development_mode: bool
194
- executor_status: ExecutorStatus
253
+ hostname: str
254
+ flavor: ExecutorFlavor
255
+ version: str
256
+ status: ExecutorStatus
195
257
  free_resources: HostResources
196
258
  allowed_functions: _containers.RepeatedCompositeFieldContainer[AllowedFunction]
197
259
  function_executor_states: _containers.RepeatedCompositeFieldContainer[
198
260
  FunctionExecutorState
199
261
  ]
262
+ labels: _containers.ScalarMap[str, str]
263
+ state_hash: str
200
264
  def __init__(
201
265
  self,
202
266
  executor_id: _Optional[str] = ...,
203
267
  development_mode: bool = ...,
204
- executor_status: _Optional[_Union[ExecutorStatus, str]] = ...,
268
+ hostname: _Optional[str] = ...,
269
+ flavor: _Optional[_Union[ExecutorFlavor, str]] = ...,
270
+ version: _Optional[str] = ...,
271
+ status: _Optional[_Union[ExecutorStatus, str]] = ...,
205
272
  free_resources: _Optional[_Union[HostResources, _Mapping]] = ...,
206
273
  allowed_functions: _Optional[
207
274
  _Iterable[_Union[AllowedFunction, _Mapping]]
@@ -209,6 +276,8 @@ class ExecutorState(_message.Message):
209
276
  function_executor_states: _Optional[
210
277
  _Iterable[_Union[FunctionExecutorState, _Mapping]]
211
278
  ] = ...,
279
+ labels: _Optional[_Mapping[str, str]] = ...,
280
+ state_hash: _Optional[str] = ...,
212
281
  ) -> None: ...
213
282
 
214
283
  class ReportExecutorStateRequest(_message.Message):
@@ -252,7 +321,7 @@ class Task(_message.Message):
252
321
  graph_invocation_id: str
253
322
  input_key: str
254
323
  reducer_output_key: str
255
- timeout_ms: str
324
+ timeout_ms: int
256
325
  def __init__(
257
326
  self,
258
327
  id: _Optional[str] = ...,
@@ -263,7 +332,7 @@ class Task(_message.Message):
263
332
  graph_invocation_id: _Optional[str] = ...,
264
333
  input_key: _Optional[str] = ...,
265
334
  reducer_output_key: _Optional[str] = ...,
266
- timeout_ms: _Optional[str] = ...,
335
+ timeout_ms: _Optional[int] = ...,
267
336
  ) -> None: ...
268
337
 
269
338
  class TaskAllocation(_message.Message):
@@ -302,3 +371,89 @@ class DesiredExecutorState(_message.Message):
302
371
  task_allocations: _Optional[_Iterable[_Union[TaskAllocation, _Mapping]]] = ...,
303
372
  clock: _Optional[int] = ...,
304
373
  ) -> None: ...
374
+
375
+ class DataPayload(_message.Message):
376
+ __slots__ = ("path", "size", "sha256_hash")
377
+ PATH_FIELD_NUMBER: _ClassVar[int]
378
+ SIZE_FIELD_NUMBER: _ClassVar[int]
379
+ SHA256_HASH_FIELD_NUMBER: _ClassVar[int]
380
+ path: str
381
+ size: int
382
+ sha256_hash: str
383
+ def __init__(
384
+ self,
385
+ path: _Optional[str] = ...,
386
+ size: _Optional[int] = ...,
387
+ sha256_hash: _Optional[str] = ...,
388
+ ) -> None: ...
389
+
390
+ class ReportTaskOutcomeRequest(_message.Message):
391
+ __slots__ = (
392
+ "task_id",
393
+ "namespace",
394
+ "graph_name",
395
+ "function_name",
396
+ "graph_invocation_id",
397
+ "outcome",
398
+ "invocation_id",
399
+ "executor_id",
400
+ "reducer",
401
+ "next_functions",
402
+ "fn_outputs",
403
+ "stdout",
404
+ "stderr",
405
+ "output_encoding",
406
+ "output_encoding_version",
407
+ )
408
+ TASK_ID_FIELD_NUMBER: _ClassVar[int]
409
+ NAMESPACE_FIELD_NUMBER: _ClassVar[int]
410
+ GRAPH_NAME_FIELD_NUMBER: _ClassVar[int]
411
+ FUNCTION_NAME_FIELD_NUMBER: _ClassVar[int]
412
+ GRAPH_INVOCATION_ID_FIELD_NUMBER: _ClassVar[int]
413
+ OUTCOME_FIELD_NUMBER: _ClassVar[int]
414
+ INVOCATION_ID_FIELD_NUMBER: _ClassVar[int]
415
+ EXECUTOR_ID_FIELD_NUMBER: _ClassVar[int]
416
+ REDUCER_FIELD_NUMBER: _ClassVar[int]
417
+ NEXT_FUNCTIONS_FIELD_NUMBER: _ClassVar[int]
418
+ FN_OUTPUTS_FIELD_NUMBER: _ClassVar[int]
419
+ STDOUT_FIELD_NUMBER: _ClassVar[int]
420
+ STDERR_FIELD_NUMBER: _ClassVar[int]
421
+ OUTPUT_ENCODING_FIELD_NUMBER: _ClassVar[int]
422
+ OUTPUT_ENCODING_VERSION_FIELD_NUMBER: _ClassVar[int]
423
+ task_id: str
424
+ namespace: str
425
+ graph_name: str
426
+ function_name: str
427
+ graph_invocation_id: str
428
+ outcome: TaskOutcome
429
+ invocation_id: str
430
+ executor_id: str
431
+ reducer: bool
432
+ next_functions: _containers.RepeatedScalarFieldContainer[str]
433
+ fn_outputs: _containers.RepeatedCompositeFieldContainer[DataPayload]
434
+ stdout: DataPayload
435
+ stderr: DataPayload
436
+ output_encoding: OutputEncoding
437
+ output_encoding_version: int
438
+ def __init__(
439
+ self,
440
+ task_id: _Optional[str] = ...,
441
+ namespace: _Optional[str] = ...,
442
+ graph_name: _Optional[str] = ...,
443
+ function_name: _Optional[str] = ...,
444
+ graph_invocation_id: _Optional[str] = ...,
445
+ outcome: _Optional[_Union[TaskOutcome, str]] = ...,
446
+ invocation_id: _Optional[str] = ...,
447
+ executor_id: _Optional[str] = ...,
448
+ reducer: bool = ...,
449
+ next_functions: _Optional[_Iterable[str]] = ...,
450
+ fn_outputs: _Optional[_Iterable[_Union[DataPayload, _Mapping]]] = ...,
451
+ stdout: _Optional[_Union[DataPayload, _Mapping]] = ...,
452
+ stderr: _Optional[_Union[DataPayload, _Mapping]] = ...,
453
+ output_encoding: _Optional[_Union[OutputEncoding, str]] = ...,
454
+ output_encoding_version: _Optional[int] = ...,
455
+ ) -> None: ...
456
+
457
+ class ReportTaskOutcomeResponse(_message.Message):
458
+ __slots__ = ()
459
+ def __init__(self) -> None: ...