vellum-workflow-server 0.14.70__tar.gz → 0.14.70.post2__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-0.14.70 → vellum_workflow_server-0.14.70.post2}/PKG-INFO +1 -1
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/pyproject.toml +1 -1
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/api/tests/test_workflow_view_stream_workflow_route.py +41 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/core/executor.py +3 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/core/workflow_executor_context.py +1 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/README.md +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/__init__.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/api/__init__.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/api/auth_middleware.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/api/healthz_view.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/api/tests/__init__.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/api/tests/test_input_display_mapping.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/api/tests/test_workflow_view.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/api/workflow_view.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/code_exec_runner.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/config.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/core/__init__.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/core/cancel_workflow.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/core/events.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/server.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/start.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/utils/__init__.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/utils/exit_handler.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/utils/log_proxy.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/utils/oom_killer.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/utils/sentry.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/utils/tests/__init__.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/utils/tests/test_utils.py +0 -0
- {vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/utils/utils.py +0 -0
|
@@ -743,3 +743,44 @@ class EndNodeDisplay(BaseNodeDisplay[EndNode]):
|
|
|
743
743
|
assert len(events) > 3, json.dumps(events[-1])
|
|
744
744
|
assert events[2]["name"] == "node.execution.initiated", json.dumps(events[-1])
|
|
745
745
|
assert events[2]["body"]["inputs"] == {"fruit": "cherry"}
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
def test_stream_workflow_route__with_environment_variables(both_stream_types):
|
|
749
|
+
# GIVEN a valid request body with environment variables
|
|
750
|
+
span_id = uuid4()
|
|
751
|
+
request_body = {
|
|
752
|
+
"execution_id": str(span_id),
|
|
753
|
+
"inputs": [],
|
|
754
|
+
"environment_api_key": "test",
|
|
755
|
+
"module": "workflow",
|
|
756
|
+
"timeout": 360,
|
|
757
|
+
"environment_variables": {"TEST_ENV_VAR": "test_value", "ANOTHER_VAR": "another_value"},
|
|
758
|
+
"files": {
|
|
759
|
+
"__init__.py": "",
|
|
760
|
+
"workflow.py": """\
|
|
761
|
+
from vellum.workflows import BaseWorkflow
|
|
762
|
+
from vellum.workflows.references import EnvironmentVariableReference
|
|
763
|
+
|
|
764
|
+
class Workflow(BaseWorkflow):
|
|
765
|
+
class Outputs(BaseWorkflow.Outputs):
|
|
766
|
+
env_var_value = EnvironmentVariableReference(name="TEST_ENV_VAR", default="not_found")
|
|
767
|
+
another_var_value = EnvironmentVariableReference(name="ANOTHER_VAR", default="not_found")
|
|
768
|
+
""",
|
|
769
|
+
},
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
# WHEN we call the stream route
|
|
773
|
+
status_code, events = both_stream_types(request_body)
|
|
774
|
+
|
|
775
|
+
# THEN we get a 200 response
|
|
776
|
+
assert status_code == 200, events
|
|
777
|
+
|
|
778
|
+
# THEN we get the expected events
|
|
779
|
+
assert events[0]["name"] == "vembda.execution.initiated"
|
|
780
|
+
assert events[1]["name"] == "workflow.execution.initiated"
|
|
781
|
+
assert events[2]["name"] == "workflow.execution.fulfilled"
|
|
782
|
+
|
|
783
|
+
# AND the environment variables are accessible in the workflow
|
|
784
|
+
outputs = events[2]["body"]["outputs"]
|
|
785
|
+
assert outputs["env_var_value"] == "test_value"
|
|
786
|
+
assert outputs["another_var_value"] == "another_value"
|
|
@@ -342,6 +342,9 @@ def _create_workflow_context(executor_context: BaseExecutorContext) -> WorkflowC
|
|
|
342
342
|
else:
|
|
343
343
|
environment = VellumEnvironment.PRODUCTION
|
|
344
344
|
|
|
345
|
+
if executor_context.environment_variables:
|
|
346
|
+
os.environ.update(executor_context.environment_variables)
|
|
347
|
+
|
|
345
348
|
return WorkflowContext(
|
|
346
349
|
vellum_client=Vellum(
|
|
347
350
|
api_key=executor_context.environment_api_key,
|
|
@@ -22,6 +22,7 @@ class BaseExecutorContext(UniversalBaseModel):
|
|
|
22
22
|
stream_start_time: int = 0
|
|
23
23
|
vembda_public_url: Optional[str] = None
|
|
24
24
|
node_output_mocks: Optional[list[Any]] = None
|
|
25
|
+
environment_variables: Optional[dict[str, str]] = None
|
|
25
26
|
|
|
26
27
|
@property
|
|
27
28
|
def container_overhead_latency(self) -> int:
|
|
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
|
{vellum_workflow_server-0.14.70 → vellum_workflow_server-0.14.70.post2}/src/workflow_server/start.py
RENAMED
|
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
|