vellum-workflow-server 1.7.4.post2__py3-none-any.whl → 1.7.5.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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-workflow-server
3
- Version: 1.7.4.post2
3
+ Version: 1.7.5.post1
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.7.4)
32
+ Requires-Dist: vellum-ai (==1.7.5)
33
33
  Description-Content-Type: text/markdown
34
34
 
35
35
  # Vellum Workflow Runner Server
@@ -5,15 +5,15 @@ workflow_server/api/healthz_view.py,sha256=itiRvBDBXncrw8Kbbc73UZLwqMAhgHOR3uSre
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
7
  workflow_server/api/tests/test_workflow_view.py,sha256=XfsW8_hFKN5rzp2UFVviVoLW-8FD-nvD6mSZHnIyrWM,30483
8
- workflow_server/api/tests/test_workflow_view_stream_workflow_route.py,sha256=kCNcouRXA_zW1WliLDHCeqiLvQInSg70jLsBMFRk2PY,36960
8
+ workflow_server/api/tests/test_workflow_view_stream_workflow_route.py,sha256=l4sfma1uNB2CtFjxKTIQ2SSn-PpyxaSWJZyy7VYSDYM,37311
9
9
  workflow_server/api/workflow_view.py,sha256=WJC8wfdgqIDk5LLdRN2rom1M4qKvqHroxXpCjYczmjg,19859
10
10
  workflow_server/code_exec_runner.py,sha256=DLNNrinCRbnkSvlqVvSZ1wv_etI7r_kKAXNPGMj3jBk,2196
11
- workflow_server/config.py,sha256=qmmTr6ty3ZN5LDOFs3TfUxYshYe6Mmn_LanplHHeE9Q,1796
11
+ workflow_server/config.py,sha256=CKU7qKC5k1_M1AFOJn_nUqntA46KPk_Z7fblfQaGC-0,1877
12
12
  workflow_server/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- workflow_server/core/cancel_workflow.py,sha256=zsP703UOPe_ulPXdbn6osiw-xTFa7IsaWzvXZJWHcKw,2216
13
+ workflow_server/core/cancel_workflow.py,sha256=QcEeYUIrxq4pub-z9BlGi5fLI3gVRml-56rMCW7j5Hc,2212
14
14
  workflow_server/core/events.py,sha256=24MA66DVQuaLJJcZrS8IL1Zq4Ohi9CoouKZ5VgoH3Cs,1402
15
- workflow_server/core/executor.py,sha256=yuWD3swkJh-pPQvcvBG1xkKij-1DH5WhLx8dDfB2Fxg,17662
16
- workflow_server/core/utils.py,sha256=C59WjckMGDwAyeKe62RmmaMJPi42RZobDVJVptE0k7c,2112
15
+ workflow_server/core/executor.py,sha256=IazlinBkJ9kTqhB-6iiCozB2mblc0CshDEChVml_CZ4,17630
16
+ workflow_server/core/utils.py,sha256=si0NB4Suurc-mn8NYdn59xM9CkPrfOP1aWEVrZvifDI,1929
17
17
  workflow_server/core/workflow_executor_context.py,sha256=rSjgkWenRGpFOwioRXNnUhGnEI7isOB-Qk7Tw-2JwnM,4521
18
18
  workflow_server/server.py,sha256=lhHPmK1PhRZd6eCkj1C0acK3YwaApZgoPHghMChw0fc,1461
19
19
  workflow_server/start.py,sha256=WHZEsLen8mtGX-wF3xUbB91_NpC_GBRtOEi87OR1rv4,2360
@@ -27,8 +27,8 @@ workflow_server/utils/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
27
27
  workflow_server/utils/tests/test_sentry_integration.py,sha256=LGmWiaLhFrx-jslrRjRq9JY6Z5ShLZyx_N_L0-FU6OI,2100
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
- workflow_server/utils/utils.py,sha256=ZPoM1Suhid22dpB8oEFLux8wx-9iyzmSfWuYxSCrgWk,4774
31
- vellum_workflow_server-1.7.4.post2.dist-info/METADATA,sha256=ExLFKBDGeHWAx7-vmmk21IIWZ6z3FogJdNgwXc12yKo,2273
32
- vellum_workflow_server-1.7.4.post2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
- vellum_workflow_server-1.7.4.post2.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
34
- vellum_workflow_server-1.7.4.post2.dist-info/RECORD,,
30
+ workflow_server/utils/utils.py,sha256=m7iMJtor5SQLWu7jlJw-X5Q3nmbq69BCxTMv6qnFYrA,4835
31
+ vellum_workflow_server-1.7.5.post1.dist-info/METADATA,sha256=AS79hT9zNyxoVj6nYGoLmTvDLmND6YvsDTgtaaTT_3I,2273
32
+ vellum_workflow_server-1.7.5.post1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
+ vellum_workflow_server-1.7.5.post1.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
34
+ vellum_workflow_server-1.7.5.post1.dist-info/RECORD,,
@@ -645,10 +645,13 @@ class TimeoutWorkflow(BaseWorkflow):
645
645
  assert "workflow.execution.initiated" in event_names
646
646
  assert "node.execution.initiated" in event_names
647
647
 
648
- # TODO: Re-enable once solved SDK-side
649
- # assert "node.execution.rejected" in event_names, "Should emit node.execution.rejected on timeout"
648
+ assert "node.execution.rejected" in event_names, "Should emit node.execution.rejected on timeout"
649
+ node_execution_rejected = next(e for e in events if e["name"] == "node.execution.rejected")
650
+ assert "vellum/workflows/runner/runner.py" in node_execution_rejected["body"]["stacktrace"]
650
651
 
651
652
  assert "workflow.execution.rejected" in event_names, "Should emit workflow.execution.rejected on timeout"
653
+ workflow_execution_rejected = next(e for e in events if e["name"] == "workflow.execution.rejected")
654
+ assert "vellum/workflows/runner/runner.py" in workflow_execution_rejected["body"]["stacktrace"]
652
655
 
653
656
  assert "vembda.execution.fulfilled" in event_names
654
657
  vembda_fulfilled = next(e for e in events if e["name"] == "vembda.execution.fulfilled")
workflow_server/config.py CHANGED
@@ -28,6 +28,7 @@ PORT = os.getenv("PORT", "8000")
28
28
  VELLUM_API_URL_HOST = os.getenv("VELLUM_API_URL_HOST", "localhost")
29
29
  VELLUM_API_URL_PORT = os.getenv("VELLUM_API_URL_PORT", 8000)
30
30
  CONCURRENCY = int(os.getenv("CONCURRENCY", "8"))
31
+ CONTAINER_IMAGE = os.getenv("CONTAINER_IMAGE", "python-workflow-runtime:latest")
31
32
  ENABLE_PROCESS_WRAPPER = os.getenv("ENABLE_PROCESS_WRAPPER", "true").lower() == "true"
32
33
 
33
34
  # This controls if we should just load a module already available in the py path for running
@@ -6,7 +6,7 @@ from typing import Optional
6
6
 
7
7
  import requests
8
8
 
9
- from workflow_server.core.utils import CancelSignal
9
+ from vellum.workflows.types import CancelSignal
10
10
 
11
11
  _TIMER_INTERVAL = 5
12
12
 
@@ -32,6 +32,7 @@ from vellum.workflows.resolvers.base import BaseWorkflowResolver
32
32
  from vellum.workflows.resolvers.resolver import VellumResolver
33
33
  from vellum.workflows.state.context import WorkflowContext
34
34
  from vellum.workflows.state.store import EmptyStore
35
+ from vellum.workflows.types import CancelSignal
35
36
  from vellum.workflows.workflows.event_filters import all_workflow_event_filter
36
37
  from workflow_server.config import LOCAL_DEPLOYMENT, LOCAL_WORKFLOW_MODULE
37
38
  from workflow_server.core.cancel_workflow import CancelWorkflowWatcherThread
@@ -42,7 +43,6 @@ from workflow_server.core.events import (
42
43
  VembdaExecutionFulfilledEvent,
43
44
  )
44
45
  from workflow_server.core.utils import (
45
- CancelSignal,
46
46
  create_vembda_rejected_event,
47
47
  is_events_emitting_enabled,
48
48
  serialize_vembda_rejected_event,
@@ -172,8 +172,7 @@ def stream_workflow(
172
172
  state=workflow_state,
173
173
  node_output_mocks=node_output_mocks,
174
174
  event_filter=all_workflow_event_filter,
175
- # TODO: Fix type in SDK
176
- cancel_signal=cancel_signal, # type: ignore[arg-type]
175
+ cancel_signal=cancel_signal,
177
176
  entrypoint_nodes=[run_from_node] if run_from_node else None,
178
177
  previous_execution_id=executor_context.previous_execution_id,
179
178
  )
@@ -1,14 +1,10 @@
1
1
  from datetime import datetime
2
- from multiprocessing.synchronize import Event as MultiprocessingEvent
3
- from threading import Event as ThreadingEvent
4
2
  from uuid import uuid4
5
- from typing import Optional, Union
3
+ from typing import Optional
6
4
 
7
5
  from workflow_server.core.events import VembdaExecutionFulfilledBody, VembdaExecutionFulfilledEvent
8
6
  from workflow_server.core.workflow_executor_context import BaseExecutorContext
9
7
 
10
- CancelSignal = Union[MultiprocessingEvent, ThreadingEvent]
11
-
12
8
 
13
9
  def _create_vembda_rejected_event_base(
14
10
  executor_context: Optional[BaseExecutorContext], error_message: str, timed_out: bool
@@ -15,7 +15,7 @@ from vellum import (
15
15
  VellumImage,
16
16
  VellumVideo,
17
17
  )
18
- from workflow_server.config import is_development
18
+ from workflow_server.config import CONTAINER_IMAGE, is_development
19
19
 
20
20
 
21
21
  def convert_json_inputs_to_vellum(inputs: List[dict]) -> dict:
@@ -62,6 +62,7 @@ def get_version() -> dict:
62
62
  return {
63
63
  "sdk_version": version("vellum-ai"),
64
64
  "server_version": "local" if is_development() else version("vellum-workflow-server"),
65
+ "container_image": CONTAINER_IMAGE,
65
66
  }
66
67
 
67
68