vellum-workflow-server 1.7.0__py3-none-any.whl → 1.7.0.post1__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.
Potentially problematic release.
This version of vellum-workflow-server might be problematic. Click here for more details.
- {vellum_workflow_server-1.7.0.dist-info → vellum_workflow_server-1.7.0.post1.dist-info}/METADATA +1 -1
- {vellum_workflow_server-1.7.0.dist-info → vellum_workflow_server-1.7.0.post1.dist-info}/RECORD +6 -6
- workflow_server/api/tests/test_workflow_view.py +43 -1
- workflow_server/api/workflow_view.py +1 -8
- {vellum_workflow_server-1.7.0.dist-info → vellum_workflow_server-1.7.0.post1.dist-info}/WHEEL +0 -0
- {vellum_workflow_server-1.7.0.dist-info → vellum_workflow_server-1.7.0.post1.dist-info}/entry_points.txt +0 -0
{vellum_workflow_server-1.7.0.dist-info → vellum_workflow_server-1.7.0.post1.dist-info}/RECORD
RENAMED
|
@@ -4,9 +4,9 @@ workflow_server/api/auth_middleware.py,sha256=IlZaCiwZ5nwQqk5sYQorvOFj7lt0p1ZSSE
|
|
|
4
4
|
workflow_server/api/healthz_view.py,sha256=itiRvBDBXncrw8Kbbc73UZLwqMAhgHOR3uSre_dAfgY,404
|
|
5
5
|
workflow_server/api/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
workflow_server/api/tests/test_input_display_mapping.py,sha256=drBZqMudFyB5wgiUOcMgRXz7E7ge-Qgxbstw4E4f0zE,2211
|
|
7
|
-
workflow_server/api/tests/test_workflow_view.py,sha256=
|
|
7
|
+
workflow_server/api/tests/test_workflow_view.py,sha256=XfsW8_hFKN5rzp2UFVviVoLW-8FD-nvD6mSZHnIyrWM,30483
|
|
8
8
|
workflow_server/api/tests/test_workflow_view_stream_workflow_route.py,sha256=K_T-AGeVZ-UOe5Cy8n8-yRof4eZPmLjEqvlEYalaIBo,33847
|
|
9
|
-
workflow_server/api/workflow_view.py,sha256=
|
|
9
|
+
workflow_server/api/workflow_view.py,sha256=TBwrtWeQtrRaOUNT_lUTPS_6MqK3-JUrkd91hIDByPA,20179
|
|
10
10
|
workflow_server/code_exec_runner.py,sha256=5uTjHJ231aX6vMwPKRvLcQdbsIxhjTsGMk8G0MEnasU,2152
|
|
11
11
|
workflow_server/config.py,sha256=qmmTr6ty3ZN5LDOFs3TfUxYshYe6Mmn_LanplHHeE9Q,1796
|
|
12
12
|
workflow_server/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -28,7 +28,7 @@ workflow_server/utils/tests/test_sentry_integration.py,sha256=LGmWiaLhFrx-jslrRj
|
|
|
28
28
|
workflow_server/utils/tests/test_system_utils.py,sha256=_4GwXvVvU5BrATxUEWwQIPg0bzQXMWBtiBmjP8MTxJM,4314
|
|
29
29
|
workflow_server/utils/tests/test_utils.py,sha256=0Nq6du8o-iBtTrip9_wgHES53JSiJbVdSXaBnPobw3s,6930
|
|
30
30
|
workflow_server/utils/utils.py,sha256=ZPoM1Suhid22dpB8oEFLux8wx-9iyzmSfWuYxSCrgWk,4774
|
|
31
|
-
vellum_workflow_server-1.7.0.dist-info/METADATA,sha256=
|
|
32
|
-
vellum_workflow_server-1.7.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
33
|
-
vellum_workflow_server-1.7.0.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
|
|
34
|
-
vellum_workflow_server-1.7.0.dist-info/RECORD,,
|
|
31
|
+
vellum_workflow_server-1.7.0.post1.dist-info/METADATA,sha256=QgS_WIUlRyosFr7Bkm-epkharNF-Hi7gtRDLcASzlUc,2273
|
|
32
|
+
vellum_workflow_server-1.7.0.post1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
33
|
+
vellum_workflow_server-1.7.0.post1.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
|
|
34
|
+
vellum_workflow_server-1.7.0.post1.dist-info/RECORD,,
|
|
@@ -429,7 +429,7 @@ class BrokenNode(BaseNode) # Missing colon
|
|
|
429
429
|
with flask_app.test_client() as test_client:
|
|
430
430
|
response = test_client.post("/workflow/serialize", json={"files": {"broken_node.py": invalid_content}})
|
|
431
431
|
|
|
432
|
-
# THEN we should get a
|
|
432
|
+
# THEN we should get a 400 response
|
|
433
433
|
assert response.status_code == 400
|
|
434
434
|
|
|
435
435
|
# AND the response should contain an error message
|
|
@@ -729,3 +729,45 @@ class Workflow(BaseWorkflow):
|
|
|
729
729
|
assert events[0]["name"] == "vembda.execution.initiated"
|
|
730
730
|
assert events[1]["name"] == "vembda.execution.fulfilled"
|
|
731
731
|
assert len(events) == 2
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
def test_serialize_route__with_invalid_nested_set_graph():
|
|
735
|
+
"""
|
|
736
|
+
Tests that a workflow with an invalid nested set graph structure raises a clear user-facing exception.
|
|
737
|
+
"""
|
|
738
|
+
# GIVEN a Flask application
|
|
739
|
+
flask_app = create_app()
|
|
740
|
+
|
|
741
|
+
invalid_workflow_content = """
|
|
742
|
+
from vellum.workflows import BaseWorkflow
|
|
743
|
+
from vellum.workflows.nodes import BaseNode
|
|
744
|
+
|
|
745
|
+
class TestNode(BaseNode):
|
|
746
|
+
class Outputs(BaseNode.Outputs):
|
|
747
|
+
value = "test"
|
|
748
|
+
|
|
749
|
+
class InvalidWorkflow(BaseWorkflow):
|
|
750
|
+
graph = {TestNode, {TestNode}}
|
|
751
|
+
|
|
752
|
+
class Outputs(BaseWorkflow.Outputs):
|
|
753
|
+
result = TestNode.Outputs.value
|
|
754
|
+
"""
|
|
755
|
+
|
|
756
|
+
workflow_files = {
|
|
757
|
+
"__init__.py": "",
|
|
758
|
+
"workflow.py": invalid_workflow_content,
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
# WHEN we make a request to the serialize route
|
|
762
|
+
with flask_app.test_client() as test_client:
|
|
763
|
+
response = test_client.post("/workflow/serialize", json={"files": workflow_files})
|
|
764
|
+
|
|
765
|
+
# THEN we should get a 400 response
|
|
766
|
+
assert response.status_code == 400
|
|
767
|
+
|
|
768
|
+
# AND the response should contain a user-friendly error message
|
|
769
|
+
assert "detail" in response.json
|
|
770
|
+
error_detail = response.json["detail"]
|
|
771
|
+
assert "Serialization failed" in error_detail
|
|
772
|
+
assert "Invalid graph structure detected" in error_detail
|
|
773
|
+
assert "contact Vellum support" in error_detail
|
|
@@ -23,7 +23,6 @@ from vellum_ee.workflows.display.types import WorkflowDisplayContext
|
|
|
23
23
|
from vellum_ee.workflows.display.workflows import BaseWorkflowDisplay
|
|
24
24
|
from vellum_ee.workflows.server.virtual_file_loader import VirtualFileFinder
|
|
25
25
|
|
|
26
|
-
from vellum.workflows import BaseWorkflow
|
|
27
26
|
from vellum.workflows.exceptions import WorkflowInitializationException
|
|
28
27
|
from vellum.workflows.nodes import BaseNode
|
|
29
28
|
from workflow_server.config import ENABLE_PROCESS_WRAPPER, MEMORY_LIMIT_MB
|
|
@@ -446,13 +445,7 @@ def serialize_route() -> Response:
|
|
|
446
445
|
|
|
447
446
|
try:
|
|
448
447
|
sys.meta_path.append(virtual_finder)
|
|
449
|
-
|
|
450
|
-
result = BaseWorkflowDisplay.serialize_module(namespace, client=client)
|
|
451
|
-
except Exception as e:
|
|
452
|
-
raise WorkflowInitializationException(
|
|
453
|
-
message=str(e),
|
|
454
|
-
workflow_definition=BaseWorkflow,
|
|
455
|
-
) from e
|
|
448
|
+
result = BaseWorkflowDisplay.serialize_module(namespace, client=client)
|
|
456
449
|
|
|
457
450
|
return Response(
|
|
458
451
|
json.dumps(result.model_dump()),
|
{vellum_workflow_server-1.7.0.dist-info → vellum_workflow_server-1.7.0.post1.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|