vellum-workflow-server 1.7.8.post2__tar.gz → 1.7.9__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 (33) hide show
  1. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/PKG-INFO +2 -2
  2. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/pyproject.toml +2 -2
  3. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/api/tests/test_workflow_view_stream_workflow_route.py +2 -2
  4. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/core/executor.py +8 -22
  5. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/README.md +0 -0
  6. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/__init__.py +0 -0
  7. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/api/__init__.py +0 -0
  8. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/api/auth_middleware.py +0 -0
  9. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/api/healthz_view.py +0 -0
  10. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/api/tests/__init__.py +0 -0
  11. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/api/tests/test_input_display_mapping.py +0 -0
  12. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/api/tests/test_workflow_view.py +0 -0
  13. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/api/workflow_view.py +0 -0
  14. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/code_exec_runner.py +0 -0
  15. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/config.py +0 -0
  16. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/core/__init__.py +0 -0
  17. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/core/cancel_workflow.py +0 -0
  18. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/core/events.py +0 -0
  19. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/core/utils.py +0 -0
  20. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/core/workflow_executor_context.py +0 -0
  21. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/server.py +0 -0
  22. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/start.py +0 -0
  23. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/__init__.py +0 -0
  24. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/exit_handler.py +0 -0
  25. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/log_proxy.py +0 -0
  26. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/oom_killer.py +0 -0
  27. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/sentry.py +0 -0
  28. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/system_utils.py +0 -0
  29. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/tests/__init__.py +0 -0
  30. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/tests/test_sentry_integration.py +0 -0
  31. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/tests/test_system_utils.py +0 -0
  32. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/src/workflow_server/utils/tests/test_utils.py +0 -0
  33. {vellum_workflow_server-1.7.8.post2 → vellum_workflow_server-1.7.9}/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.7.8.post2
3
+ Version: 1.7.9
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.8)
32
+ Requires-Dist: vellum-ai (==1.7.9)
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.7.8.post2"
6
+ version = "1.7.9"
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.7.8"
48
+ vellum-ai = "1.7.9"
49
49
  python-dotenv = "1.0.1"
50
50
  retrying = "1.3.4"
51
51
  sentry-sdk = {extras = ["flask"], version = "2.20.0"}
@@ -421,7 +421,7 @@ from vellum.workflows.inputs import BaseInputs
421
421
  assert events[2]["name"] == "workflow.execution.rejected"
422
422
  assert events[2]["span_id"] == events[1]["span_id"]
423
423
  assert (
424
- "Failed to initialize workflow: Syntax Error raised while loading Workflow: "
424
+ "Syntax Error raised while loading Workflow: "
425
425
  "unexpected indent (inputs.py, line 3)" in events[2]["body"]["error"]["message"]
426
426
  )
427
427
 
@@ -1178,7 +1178,7 @@ class InvalidWorkflow(BaseWorkflow):
1178
1178
  # AND the error message should contain information about the invalid graph structure
1179
1179
  error_message = events[2]["body"]["error"]["message"]
1180
1180
  expected_message = (
1181
- "Failed to initialize workflow: Invalid graph structure detected. "
1181
+ "Invalid graph structure detected. "
1182
1182
  "Nested sets or unsupported graph types are not allowed. "
1183
1183
  "Please contact Vellum support for assistance with Workflow configuration."
1184
1184
  )
@@ -145,7 +145,7 @@ def stream_workflow(
145
145
  ) -> tuple[Iterator[dict], UUID]:
146
146
  cancel_watcher_kill_switch = ThreadingEvent()
147
147
  try:
148
- workflow, namespace = _gather_workflow(executor_context)
148
+ workflow, namespace = _create_workflow(executor_context)
149
149
  workflow_inputs = _get_workflow_inputs(executor_context, workflow.__class__)
150
150
 
151
151
  workflow_state = (
@@ -247,7 +247,7 @@ def stream_node(
247
247
  executor_context: NodeExecutorContext,
248
248
  disable_redirect: bool = True,
249
249
  ) -> Iterator[dict]:
250
- workflow, namespace = _gather_workflow(executor_context)
250
+ workflow, namespace = _create_workflow(executor_context)
251
251
  Node: Optional[Type[BaseNode]] = None
252
252
 
253
253
  for workflow_node in workflow.get_nodes():
@@ -331,7 +331,11 @@ def _call_stream(
331
331
  yield vembda_fulfilled_event.model_dump(mode="json")
332
332
 
333
333
 
334
- def _create_workflow(executor_context: BaseExecutorContext, namespace: str) -> BaseWorkflow:
334
+ def _create_workflow(executor_context: BaseExecutorContext) -> Tuple[BaseWorkflow, str]:
335
+ namespace = _get_file_namespace(executor_context)
336
+ if namespace != LOCAL_WORKFLOW_MODULE:
337
+ sys.meta_path.append(VirtualFileFinder(executor_context.files, namespace))
338
+
335
339
  workflow_context = _create_workflow_context(executor_context)
336
340
  Workflow = BaseWorkflow.load_from_module(namespace)
337
341
  VembdaExecutionFulfilledEvent.model_rebuild(
@@ -363,7 +367,7 @@ def _create_workflow(executor_context: BaseExecutorContext, namespace: str) -> B
363
367
  resolvers=resolvers,
364
368
  )
365
369
 
366
- return workflow
370
+ return workflow, namespace
367
371
 
368
372
 
369
373
  def _create_workflow_context(executor_context: BaseExecutorContext) -> WorkflowContext:
@@ -469,21 +473,3 @@ def _get_run_from_node(executor_context: WorkflowExecutorContext, workflow: Base
469
473
  return node
470
474
 
471
475
  return None
472
-
473
-
474
- def _gather_workflow(context: BaseExecutorContext) -> Tuple[BaseWorkflow, str]:
475
- try:
476
- namespace = _get_file_namespace(context)
477
- if namespace != LOCAL_WORKFLOW_MODULE:
478
- sys.meta_path.append(VirtualFileFinder(context.files, namespace))
479
- workflow = _create_workflow(
480
- executor_context=context,
481
- namespace=namespace,
482
- )
483
- return workflow, namespace
484
- except Exception as e:
485
- logger.exception("Failed to initialize Workflow")
486
- raise WorkflowInitializationException(
487
- message=f"Failed to initialize workflow: {e}",
488
- workflow_definition=BaseWorkflow,
489
- ) from e