vellum-workflow-server 1.6.4.post2__tar.gz → 1.7.0__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 (33) hide show
  1. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/PKG-INFO +2 -2
  2. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/pyproject.toml +2 -2
  3. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/api/tests/test_workflow_view_stream_workflow_route.py +71 -1
  4. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/README.md +0 -0
  5. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/__init__.py +0 -0
  6. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/api/__init__.py +0 -0
  7. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/api/auth_middleware.py +0 -0
  8. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/api/healthz_view.py +0 -0
  9. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/api/tests/__init__.py +0 -0
  10. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/api/tests/test_input_display_mapping.py +0 -0
  11. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/api/tests/test_workflow_view.py +0 -0
  12. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/api/workflow_view.py +0 -0
  13. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/code_exec_runner.py +0 -0
  14. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/config.py +0 -0
  15. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/core/__init__.py +0 -0
  16. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/core/cancel_workflow.py +0 -0
  17. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/core/events.py +0 -0
  18. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/core/executor.py +0 -0
  19. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/core/utils.py +0 -0
  20. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/core/workflow_executor_context.py +0 -0
  21. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/server.py +0 -0
  22. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/start.py +0 -0
  23. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/__init__.py +0 -0
  24. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/exit_handler.py +0 -0
  25. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/log_proxy.py +0 -0
  26. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/oom_killer.py +0 -0
  27. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/sentry.py +0 -0
  28. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/system_utils.py +0 -0
  29. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/tests/__init__.py +0 -0
  30. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/tests/test_sentry_integration.py +0 -0
  31. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/tests/test_system_utils.py +0 -0
  32. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/tests/test_utils.py +0 -0
  33. {vellum_workflow_server-1.6.4.post2 → vellum_workflow_server-1.7.0}/src/workflow_server/utils/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-workflow-server
3
- Version: 1.6.4.post2
3
+ Version: 1.7.0
4
4
  Summary:
5
5
  License: AGPL
6
6
  Requires-Python: >=3.9.0,<4
@@ -29,7 +29,7 @@ Requires-Dist: pyjwt (==2.10.0)
29
29
  Requires-Dist: python-dotenv (==1.0.1)
30
30
  Requires-Dist: retrying (==1.3.4)
31
31
  Requires-Dist: sentry-sdk[flask] (==2.20.0)
32
- Requires-Dist: vellum-ai (==1.6.4)
32
+ Requires-Dist: vellum-ai (==1.7.0)
33
33
  Description-Content-Type: text/markdown
34
34
 
35
35
  # Vellum Workflow Runner Server
@@ -3,7 +3,7 @@ name = "vellum-workflow-server"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "vellum-workflow-server"
6
- version = "1.6.4.post2"
6
+ version = "1.7.0"
7
7
  description = ""
8
8
  readme = "README.md"
9
9
  authors = []
@@ -45,7 +45,7 @@ flask = "2.3.3"
45
45
  orderly-set = "5.2.2"
46
46
  pebble = "5.0.7"
47
47
  gunicorn = "23.0.0"
48
- vellum-ai = "1.6.4"
48
+ vellum-ai = "1.7.0"
49
49
  python-dotenv = "1.0.1"
50
50
  retrying = "1.3.4"
51
51
  sentry-sdk = {extras = ["flask"], version = "2.20.0"}
@@ -396,7 +396,8 @@ from vellum.workflows.inputs import BaseInputs
396
396
  assert events[2]["name"] == "workflow.execution.rejected"
397
397
  assert events[2]["span_id"] == events[1]["span_id"]
398
398
  assert (
399
- "Failed to initialize workflow: unexpected indent (inputs.py, line 3)" in events[2]["body"]["error"]["message"]
399
+ "Failed to initialize workflow: Failed to load workflow module: unexpected indent (inputs.py, line 3)"
400
+ in events[2]["body"]["error"]["message"]
400
401
  )
401
402
 
402
403
  assert events[3] == {
@@ -1031,3 +1032,72 @@ class Workflow(BaseWorkflow):
1031
1032
  assert len(event_names) == 2, "Should include 2 events"
1032
1033
  assert "workflow.execution.initiated" in event_names, "Should include workflow.execution.initiated event"
1033
1034
  assert "workflow.execution.fulfilled" in event_names, "Should include workflow.execution.fulfilled event"
1035
+
1036
+
1037
+ def test_stream_workflow_route__with_invalid_nested_set_graph(both_stream_types):
1038
+ """
1039
+ Tests that a workflow with an invalid nested set graph structure raises a clear error in the stream response.
1040
+ """
1041
+ # GIVEN a Flask application and invalid workflow content with nested set graph
1042
+ span_id = uuid4()
1043
+
1044
+ invalid_workflow_content = """
1045
+ from vellum.workflows import BaseWorkflow
1046
+ from vellum.workflows.nodes import BaseNode
1047
+
1048
+ class TestNode(BaseNode):
1049
+ class Outputs(BaseNode.Outputs):
1050
+ value = "test"
1051
+
1052
+ class InvalidWorkflow(BaseWorkflow):
1053
+ graph = {TestNode, {TestNode}}
1054
+
1055
+ class Outputs(BaseWorkflow.Outputs):
1056
+ result = TestNode.Outputs.value
1057
+ """
1058
+
1059
+ request_body = {
1060
+ "timeout": 360,
1061
+ "execution_id": str(span_id),
1062
+ "inputs": [],
1063
+ "environment_api_key": "test",
1064
+ "module": "workflow",
1065
+ "files": {
1066
+ "__init__.py": "",
1067
+ "workflow.py": invalid_workflow_content,
1068
+ },
1069
+ }
1070
+
1071
+ # WHEN we call the stream route
1072
+ status_code, events = both_stream_types(request_body)
1073
+
1074
+ # THEN we get a 200 response
1075
+ assert status_code == 200, events
1076
+
1077
+ # THEN we get the expected events: vembda initiated, workflow initiated, workflow rejected, vembda fulfilled
1078
+ assert len(events) == 4
1079
+
1080
+ # AND the first event should be vembda execution initiated
1081
+ assert events[0]["name"] == "vembda.execution.initiated"
1082
+ assert events[0]["span_id"] == str(span_id)
1083
+
1084
+ # AND the second event should be workflow execution initiated
1085
+ assert events[1]["name"] == "workflow.execution.initiated"
1086
+
1087
+ # AND the third event should be workflow execution rejected
1088
+ assert events[2]["name"] == "workflow.execution.rejected"
1089
+ assert events[1]["span_id"] == events[2]["span_id"]
1090
+
1091
+ # AND the error message should contain information about the invalid graph structure
1092
+ error_message = events[2]["body"]["error"]["message"]
1093
+ expected_message = (
1094
+ "Failed to initialize workflow: Invalid graph structure detected. "
1095
+ "Nested sets or unsupported graph types are not allowed. "
1096
+ "Please contact Vellum support for assistance with Workflow configuration."
1097
+ )
1098
+ assert error_message == expected_message
1099
+
1100
+ # AND the fourth event should be vembda execution fulfilled
1101
+ assert events[3]["name"] == "vembda.execution.fulfilled"
1102
+ assert events[3]["span_id"] == str(span_id)
1103
+ assert events[3]["body"]["exit_code"] == 0