vellum-workflow-server 0.14.70.post81__tar.gz → 1.9.7__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.

Potentially problematic release.


This version of vellum-workflow-server might be problematic. Click here for more details.

Files changed (42) hide show
  1. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/PKG-INFO +3 -2
  2. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/pyproject.toml +7 -2
  3. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/api/auth_middleware.py +2 -2
  4. vellum_workflow_server-1.9.7/src/workflow_server/api/status_view.py +19 -0
  5. vellum_workflow_server-1.9.7/src/workflow_server/api/tests/test_workflow_view.py +824 -0
  6. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/api/tests/test_workflow_view_stream_workflow_route.py +477 -20
  7. vellum_workflow_server-1.9.7/src/workflow_server/api/workflow_view.py +667 -0
  8. vellum_workflow_server-1.9.7/src/workflow_server/code_exec_runner.py +61 -0
  9. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/config.py +16 -0
  10. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/core/cancel_workflow.py +7 -5
  11. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/core/events.py +1 -0
  12. vellum_workflow_server-1.9.7/src/workflow_server/core/executor.py +499 -0
  13. vellum_workflow_server-1.9.7/src/workflow_server/core/utils.py +55 -0
  14. vellum_workflow_server-1.9.7/src/workflow_server/core/workflow_executor_context.py +98 -0
  15. vellum_workflow_server-1.9.7/src/workflow_server/logging_config.py +39 -0
  16. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/server.py +22 -5
  17. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/start.py +22 -5
  18. vellum_workflow_server-1.9.7/src/workflow_server/utils/exit_handler.py +56 -0
  19. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/utils/oom_killer.py +18 -34
  20. vellum_workflow_server-1.9.7/src/workflow_server/utils/sentry.py +86 -0
  21. vellum_workflow_server-1.9.7/src/workflow_server/utils/system_utils.py +109 -0
  22. vellum_workflow_server-1.9.7/src/workflow_server/utils/tests/test_sentry_integration.py +143 -0
  23. vellum_workflow_server-1.9.7/src/workflow_server/utils/tests/test_system_utils.py +114 -0
  24. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/utils/tests/test_utils.py +12 -0
  25. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/utils/utils.py +14 -2
  26. vellum_workflow_server-0.14.70.post81/src/workflow_server/api/tests/test_workflow_view.py +0 -228
  27. vellum_workflow_server-0.14.70.post81/src/workflow_server/api/workflow_view.py +0 -390
  28. vellum_workflow_server-0.14.70.post81/src/workflow_server/code_exec_runner.py +0 -86
  29. vellum_workflow_server-0.14.70.post81/src/workflow_server/core/executor.py +0 -470
  30. vellum_workflow_server-0.14.70.post81/src/workflow_server/core/workflow_executor_context.py +0 -42
  31. vellum_workflow_server-0.14.70.post81/src/workflow_server/utils/exit_handler.py +0 -27
  32. vellum_workflow_server-0.14.70.post81/src/workflow_server/utils/sentry.py +0 -31
  33. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/README.md +0 -0
  34. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/__init__.py +0 -0
  35. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/api/__init__.py +0 -0
  36. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/api/healthz_view.py +0 -0
  37. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/api/tests/__init__.py +0 -0
  38. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/api/tests/test_input_display_mapping.py +0 -0
  39. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/core/__init__.py +0 -0
  40. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/utils/__init__.py +0 -0
  41. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/utils/log_proxy.py +0 -0
  42. {vellum_workflow_server-0.14.70.post81 → vellum_workflow_server-1.9.7}/src/workflow_server/utils/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-workflow-server
3
- Version: 0.14.70.post81
3
+ Version: 1.9.7
4
4
  Summary:
5
5
  License: AGPL
6
6
  Requires-Python: >=3.9.0,<4
@@ -27,8 +27,9 @@ Requires-Dist: orderly-set (==5.2.2)
27
27
  Requires-Dist: pebble (==5.0.7)
28
28
  Requires-Dist: pyjwt (==2.10.0)
29
29
  Requires-Dist: python-dotenv (==1.0.1)
30
+ Requires-Dist: retrying (==1.3.4)
30
31
  Requires-Dist: sentry-sdk[flask] (==2.20.0)
31
- Requires-Dist: vellum-ai (==0.14.70)
32
+ Requires-Dist: vellum-ai (==1.9.7)
32
33
  Description-Content-Type: text/markdown
33
34
 
34
35
  # Vellum Workflow Runner Server
@@ -1,6 +1,9 @@
1
+ [project]
2
+ name = "vellum-workflow-server"
3
+
1
4
  [tool.poetry]
2
5
  name = "vellum-workflow-server"
3
- version = "0.14.70.post81"
6
+ version = "1.9.7"
4
7
  description = ""
5
8
  readme = "README.md"
6
9
  authors = []
@@ -29,6 +32,7 @@ packages = [
29
32
 
30
33
  [tool.poetry.group.dev.dependencies]
31
34
  requests-mock = "^1.12.1"
35
+ pytest-mock = "^3.14.1"
32
36
 
33
37
  [project.urls]
34
38
  Repository = 'https://github.com/vellum-ai/vembda-service'
@@ -41,8 +45,9 @@ flask = "2.3.3"
41
45
  orderly-set = "5.2.2"
42
46
  pebble = "5.0.7"
43
47
  gunicorn = "23.0.0"
44
- vellum-ai = "0.14.70"
48
+ vellum-ai = "1.9.7"
45
49
  python-dotenv = "1.0.1"
50
+ retrying = "1.3.4"
46
51
  sentry-sdk = {extras = ["flask"], version = "2.20.0"}
47
52
 
48
53
  [tool.poetry.dev-dependencies]
@@ -5,7 +5,7 @@ from flask import Flask, Request, Response
5
5
  import jwt
6
6
  from jwt import ExpiredSignatureError
7
7
 
8
- from workflow_server.config import IS_VPC, NAMESPACE, VEMBDA_PUBLIC_KEY, is_development
8
+ from workflow_server.config import IS_ASYNC_MODE, IS_VPC, NAMESPACE, VEMBDA_PUBLIC_KEY, is_development
9
9
 
10
10
 
11
11
  class AuthMiddleware:
@@ -15,7 +15,7 @@ class AuthMiddleware:
15
15
  def __call__(self, environ: Dict[str, Any], start_response: Any) -> Any:
16
16
  try:
17
17
  request = Request(environ)
18
- if not request.path.startswith("/healthz") and not is_development() and not IS_VPC:
18
+ if not request.path.startswith("/healthz") and not is_development() and not IS_VPC and not IS_ASYNC_MODE:
19
19
  token = request.headers.get("X-Vembda-Signature")
20
20
  if token:
21
21
  decoded = jwt.decode(token, VEMBDA_PUBLIC_KEY, algorithms=["RS256"])
@@ -0,0 +1,19 @@
1
+ from typing import Tuple
2
+
3
+ from flask import Blueprint, Response, jsonify
4
+
5
+ from workflow_server.config import CONCURRENCY
6
+ from workflow_server.utils.system_utils import get_active_process_count
7
+
8
+ bp = Blueprint("status", __name__)
9
+
10
+
11
+ @bp.route("/is_available", methods=["GET"])
12
+ def is_available() -> Tuple[Response, int]:
13
+ resp = jsonify(
14
+ available=get_active_process_count() < CONCURRENCY,
15
+ process_count=get_active_process_count(),
16
+ max_concurrency=CONCURRENCY,
17
+ )
18
+
19
+ return resp, 200