indexify 0.3.12__tar.gz → 0.3.13__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {indexify-0.3.12 → indexify-0.3.13}/PKG-INFO +1 -1
  2. {indexify-0.3.12 → indexify-0.3.13}/pyproject.toml +1 -1
  3. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/function_executor.py +28 -1
  4. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/metrics/function_executor.py +16 -0
  5. {indexify-0.3.12 → indexify-0.3.13}/README.md +0 -0
  6. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/cli/cli.py +0 -0
  7. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/README.md +0 -0
  8. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/api_objects.py +0 -0
  9. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/downloader.py +0 -0
  10. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/executor.py +0 -0
  11. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/function_executor_state.py +0 -0
  12. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/function_executor_states_container.py +0 -0
  13. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/health_checker.py +0 -0
  14. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/invocation_state_client.py +0 -0
  15. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/metrics/function_executor_state.py +0 -0
  16. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/metrics/function_executor_state_container.py +0 -0
  17. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/metrics/health_checker.py +0 -0
  18. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/metrics/invocation_state_client.py +0 -0
  19. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/metrics/single_task_runner.py +0 -0
  20. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/server/client_configuration.py +0 -0
  21. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/server/function_executor_server.py +0 -0
  22. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/server/function_executor_server_factory.py +0 -0
  23. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/server/subprocess_function_executor_server.py +0 -0
  24. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/server/subprocess_function_executor_server_factory.py +0 -0
  25. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/single_task_runner.py +0 -0
  26. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/task_input.py +0 -0
  27. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/function_executor/task_output.py +0 -0
  28. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/metrics/downloader.py +0 -0
  29. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/metrics/executor.py +0 -0
  30. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/metrics/task_fetcher.py +0 -0
  31. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/metrics/task_reporter.py +0 -0
  32. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/metrics/task_runner.py +0 -0
  33. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/monitoring/function_allowlist.py +0 -0
  34. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/monitoring/handler.py +0 -0
  35. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/monitoring/health_check_handler.py +0 -0
  36. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/monitoring/health_checker/generic_health_checker.py +0 -0
  37. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/monitoring/health_checker/health_checker.py +0 -0
  38. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/monitoring/metrics.py +0 -0
  39. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/monitoring/prometheus_metrics_handler.py +0 -0
  40. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/monitoring/server.py +0 -0
  41. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/monitoring/startup_probe_handler.py +0 -0
  42. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/runtime_probes.py +0 -0
  43. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/task_fetcher.py +0 -0
  44. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/task_reporter.py +0 -0
  45. {indexify-0.3.12 → indexify-0.3.13}/src/indexify/executor/task_runner.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: indexify
3
- Version: 0.3.12
3
+ Version: 0.3.13
4
4
  Summary: Open Source Indexify components and helper tools
5
5
  Home-page: https://github.com/tensorlakeai/indexify
6
6
  License: Apache 2.0
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "indexify"
3
3
  # Incremented if any of the components provided in this packages are updated.
4
- version = "0.3.12"
4
+ version = "0.3.13"
5
5
  description = "Open Source Indexify components and helper tools"
6
6
  authors = ["Tensorlake Inc. <support@tensorlake.ai>"]
7
7
  license = "Apache 2.0"
@@ -3,12 +3,15 @@ from typing import Any, Optional
3
3
 
4
4
  import grpc
5
5
  from tensorlake.function_executor.proto.function_executor_pb2 import (
6
+ InfoRequest,
7
+ InfoResponse,
6
8
  InitializeRequest,
7
9
  InitializeResponse,
8
10
  )
9
11
  from tensorlake.function_executor.proto.function_executor_pb2_grpc import (
10
12
  FunctionExecutorStub,
11
13
  )
14
+ from tensorlake.function_executor.proto.message_validator import MessageValidator
12
15
  from tensorlake.utils.http_client import get_httpx_client
13
16
 
14
17
  from .health_checker import HealthChecker
@@ -36,7 +39,10 @@ from .metrics.function_executor import (
36
39
  metric_destroys,
37
40
  metric_establish_channel_errors,
38
41
  metric_establish_channel_latency,
42
+ metric_function_executor_infos,
39
43
  metric_function_executors_count,
44
+ metric_get_info_rpc_errors,
45
+ metric_get_info_rpc_latency,
40
46
  metric_initialize_rpc_errors,
41
47
  metric_initialize_rpc_latency,
42
48
  )
@@ -96,6 +102,7 @@ class FunctionExecutor:
96
102
  await self._create_server(config)
97
103
  await self._establish_channel()
98
104
  stub: FunctionExecutorStub = FunctionExecutorStub(self._channel)
105
+ await _collect_server_info(stub)
99
106
  await _initialize_server(stub, initialize_request)
100
107
  await self._create_invocation_state_client(
101
108
  stub=stub,
@@ -262,9 +269,29 @@ class FunctionExecutor:
262
269
  self._health_checker = None
263
270
 
264
271
 
272
+ async def _collect_server_info(stub: FunctionExecutorStub) -> None:
273
+ with (
274
+ metric_get_info_rpc_errors.count_exceptions(),
275
+ metric_get_info_rpc_latency.time(),
276
+ ):
277
+ info: InfoResponse = await stub.get_info(InfoRequest())
278
+ validator = MessageValidator(info)
279
+ validator.required_field("version")
280
+ validator.required_field("sdk_version")
281
+ validator.required_field("sdk_language")
282
+ validator.required_field("sdk_language_version")
283
+
284
+ metric_function_executor_infos.labels(
285
+ version=info.version,
286
+ sdk_version=info.sdk_version,
287
+ sdk_language=info.sdk_language,
288
+ sdk_language_version=info.sdk_language_version,
289
+ ).inc()
290
+
291
+
265
292
  async def _initialize_server(
266
293
  stub: FunctionExecutorStub, initialize_request: InitializeRequest
267
- ):
294
+ ) -> None:
268
295
  with (
269
296
  metric_initialize_rpc_errors.count_exceptions(),
270
297
  metric_initialize_rpc_latency.time(),
@@ -78,6 +78,22 @@ metric_destroy_channel_errors: prometheus_client.Counter = prometheus_client.Cou
78
78
  "Number of Function Executor channel destruction errors",
79
79
  )
80
80
 
81
+ # FE get_info RPC metrics.
82
+ metric_get_info_rpc_latency: prometheus_client.Histogram = (
83
+ latency_metric_for_fast_operation(
84
+ "function_executor_get_info_rpc", "Function Executor get_info RPC"
85
+ )
86
+ )
87
+ metric_get_info_rpc_errors: prometheus_client.Counter = prometheus_client.Counter(
88
+ "function_executor_get_info_rpc_errors",
89
+ "Number of Function Executor get_info RPC errors",
90
+ )
91
+ metric_function_executor_infos: prometheus_client.Counter = prometheus_client.Counter(
92
+ "function_executor_infos",
93
+ "Number of Function Executors with particular info",
94
+ ["version", "sdk_version", "sdk_language", "sdk_language_version"],
95
+ )
96
+
81
97
  # FE initialization RPC metrics.
82
98
  metric_initialize_rpc_latency: prometheus_client.Histogram = (
83
99
  latency_metric_for_customer_controlled_operation(
File without changes