vellum-workflow-server 1.7.8.post1__tar.gz → 1.7.8.post3__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.
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/PKG-INFO +1 -1
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/pyproject.toml +1 -1
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/api/tests/test_workflow_view_stream_workflow_route.py +2 -2
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/core/executor.py +8 -35
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/start.py +7 -1
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/README.md +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/__init__.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/api/__init__.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/api/auth_middleware.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/api/healthz_view.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/api/tests/__init__.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/api/tests/test_input_display_mapping.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/api/tests/test_workflow_view.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/api/workflow_view.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/code_exec_runner.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/config.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/core/__init__.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/core/cancel_workflow.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/core/events.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/core/utils.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/core/workflow_executor_context.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/server.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/__init__.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/exit_handler.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/log_proxy.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/oom_killer.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/sentry.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/system_utils.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/tests/__init__.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/tests/test_sentry_integration.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/tests/test_system_utils.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/tests/test_utils.py +0 -0
- {vellum_workflow_server-1.7.8.post1 → vellum_workflow_server-1.7.8.post3}/src/workflow_server/utils/utils.py +0 -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
|
-
"
|
|
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
|
-
"
|
|
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
|
)
|
|
@@ -15,7 +15,6 @@ from uuid import UUID, uuid4
|
|
|
15
15
|
from typing import Any, Callable, Generator, Iterator, Optional, Tuple, Type
|
|
16
16
|
|
|
17
17
|
from vellum_ee.workflows.display.utils.events import event_enricher
|
|
18
|
-
from vellum_ee.workflows.display.workflows import BaseWorkflowDisplay
|
|
19
18
|
from vellum_ee.workflows.server.virtual_file_loader import VirtualFileFinder
|
|
20
19
|
|
|
21
20
|
from vellum.workflows import BaseWorkflow
|
|
@@ -23,7 +22,6 @@ from vellum.workflows.emitters.base import BaseWorkflowEmitter
|
|
|
23
22
|
from vellum.workflows.emitters.vellum_emitter import VellumEmitter
|
|
24
23
|
from vellum.workflows.events.exception_handling import stream_initialization_exception
|
|
25
24
|
from vellum.workflows.events.types import BaseEvent
|
|
26
|
-
from vellum.workflows.events.workflow import WorkflowEventDisplayContext
|
|
27
25
|
from vellum.workflows.exceptions import WorkflowInitializationException
|
|
28
26
|
from vellum.workflows.inputs import BaseInputs
|
|
29
27
|
from vellum.workflows.nodes import BaseNode
|
|
@@ -147,10 +145,9 @@ def stream_workflow(
|
|
|
147
145
|
) -> tuple[Iterator[dict], UUID]:
|
|
148
146
|
cancel_watcher_kill_switch = ThreadingEvent()
|
|
149
147
|
try:
|
|
150
|
-
workflow, namespace =
|
|
148
|
+
workflow, namespace = _create_workflow(executor_context)
|
|
151
149
|
workflow_inputs = _get_workflow_inputs(executor_context, workflow.__class__)
|
|
152
150
|
|
|
153
|
-
display_context = _gather_display_context(workflow, namespace)
|
|
154
151
|
workflow_state = (
|
|
155
152
|
workflow.deserialize_state(
|
|
156
153
|
executor_context.state,
|
|
@@ -222,8 +219,6 @@ def stream_workflow(
|
|
|
222
219
|
if first:
|
|
223
220
|
executor_context.stream_start_time = time.time_ns()
|
|
224
221
|
first = False
|
|
225
|
-
if event.name == "workflow.execution.initiated":
|
|
226
|
-
event.body.display_context = display_context
|
|
227
222
|
|
|
228
223
|
yield _dump_event(
|
|
229
224
|
event=event,
|
|
@@ -252,7 +247,7 @@ def stream_node(
|
|
|
252
247
|
executor_context: NodeExecutorContext,
|
|
253
248
|
disable_redirect: bool = True,
|
|
254
249
|
) -> Iterator[dict]:
|
|
255
|
-
workflow, namespace =
|
|
250
|
+
workflow, namespace = _create_workflow(executor_context)
|
|
256
251
|
Node: Optional[Type[BaseNode]] = None
|
|
257
252
|
|
|
258
253
|
for workflow_node in workflow.get_nodes():
|
|
@@ -336,7 +331,11 @@ def _call_stream(
|
|
|
336
331
|
yield vembda_fulfilled_event.model_dump(mode="json")
|
|
337
332
|
|
|
338
333
|
|
|
339
|
-
def _create_workflow(executor_context: BaseExecutorContext
|
|
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
|
+
|
|
340
339
|
workflow_context = _create_workflow_context(executor_context)
|
|
341
340
|
Workflow = BaseWorkflow.load_from_module(namespace)
|
|
342
341
|
VembdaExecutionFulfilledEvent.model_rebuild(
|
|
@@ -368,7 +367,7 @@ def _create_workflow(executor_context: BaseExecutorContext, namespace: str) -> B
|
|
|
368
367
|
resolvers=resolvers,
|
|
369
368
|
)
|
|
370
369
|
|
|
371
|
-
return workflow
|
|
370
|
+
return workflow, namespace
|
|
372
371
|
|
|
373
372
|
|
|
374
373
|
def _create_workflow_context(executor_context: BaseExecutorContext) -> WorkflowContext:
|
|
@@ -474,29 +473,3 @@ def _get_run_from_node(executor_context: WorkflowExecutorContext, workflow: Base
|
|
|
474
473
|
return node
|
|
475
474
|
|
|
476
475
|
return None
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
def _gather_workflow(context: BaseExecutorContext) -> Tuple[BaseWorkflow, str]:
|
|
480
|
-
try:
|
|
481
|
-
namespace = _get_file_namespace(context)
|
|
482
|
-
if namespace != LOCAL_WORKFLOW_MODULE:
|
|
483
|
-
sys.meta_path.append(VirtualFileFinder(context.files, namespace))
|
|
484
|
-
workflow = _create_workflow(
|
|
485
|
-
executor_context=context,
|
|
486
|
-
namespace=namespace,
|
|
487
|
-
)
|
|
488
|
-
return workflow, namespace
|
|
489
|
-
except Exception as e:
|
|
490
|
-
logger.exception("Failed to initialize Workflow")
|
|
491
|
-
raise WorkflowInitializationException(
|
|
492
|
-
message=f"Failed to initialize workflow: {e}",
|
|
493
|
-
workflow_definition=BaseWorkflow,
|
|
494
|
-
) from e
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
def _gather_display_context(workflow: BaseWorkflow, namespace: str) -> Optional["WorkflowEventDisplayContext"]:
|
|
498
|
-
try:
|
|
499
|
-
return BaseWorkflowDisplay.gather_event_display_context(namespace, workflow.__class__)
|
|
500
|
-
except Exception:
|
|
501
|
-
logger.exception("Unable to Parse Workflow Display Context")
|
|
502
|
-
return None
|
|
@@ -32,11 +32,17 @@ class CustomGunicornLogger(glogging.Logger):
|
|
|
32
32
|
|
|
33
33
|
logger = logging.getLogger("gunicorn.access")
|
|
34
34
|
logger.addFilter(HealthCheckFilter())
|
|
35
|
+
logger.addFilter(SignalFilter())
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
class HealthCheckFilter(logging.Filter):
|
|
38
39
|
def filter(self, record: Any) -> bool:
|
|
39
|
-
return "
|
|
40
|
+
return "Handling signal: winch" not in record.getMessage()
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class SignalFilter(logging.Filter):
|
|
44
|
+
def filter(self, record: Any) -> bool:
|
|
45
|
+
return "SIGTERM" not in record.getMessage()
|
|
40
46
|
|
|
41
47
|
|
|
42
48
|
def start() -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|