feat(logging): Auto-inject app_id / workflow_id / node_id and error_s…#38163
Open
ruanimal wants to merge 2 commits into
Open
feat(logging): Auto-inject app_id / workflow_id / node_id and error_s…#38163ruanimal wants to merge 2 commits into
ruanimal wants to merge 2 commits into
Conversation
…ource into workflow runtime logs
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-06-29 09:54:13.722419814 +0000
+++ /tmp/pyrefly_pr.txt 2026-06-29 09:53:58.583237836 +0000
@@ -4123,6 +4123,32 @@
--> tests/unit_tests/core/app/test_llm_quota.py:626:28
ERROR Argument `SimpleNamespace` is not assignable to parameter `file` with type `File` in function `core.app.workflow.file_runtime.DifyWorkflowFileRuntime.resolve_file_url` [bad-argument-type]
--> tests/unit_tests/core/app/workflow/test_file_runtime.py:60:39
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_start` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:61:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_start` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:70:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_end` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:73:31
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_start` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:83:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_start` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:97:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_end` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:100:31
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_start` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:103:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_end` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:106:31
+ERROR Argument `object` is not assignable to parameter `event` with type `GraphEngineEvent` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_event` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:112:24
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_start` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:126:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_end` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:128:31
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_start` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:133:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.app.workflow.layers.log_context.WorkflowLogContextLayer.on_node_run_end` [bad-argument-type]
+ --> tests/unit_tests/core/app/workflow/test_log_context_layer.py:135:31
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.node_factory.DifyNodeFactory.__init__` [bad-argument-type]
--> tests/unit_tests/core/app/workflow/test_node_factory.py:71:31
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.workflow.node_factory.DifyNodeFactory.__init__` [bad-argument-type]
@@ -6244,23 +6270,23 @@
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.workflow.workflow_entry.WorkflowEntry.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:299:37
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.workflow.workflow_entry.WorkflowEntry.single_step_run` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:461:26
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:524:26
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.workflow.workflow_entry.WorkflowEntry.single_step_run` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:516:26
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:579:26
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.workflow.workflow_entry.WorkflowEntry.single_step_run` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:585:26
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:648:26
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.workflow.workflow_entry.WorkflowEntry.single_step_run` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:643:30
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:706:30
ERROR Class member `EmptySplitKey.split` overrides parent class `UserString` in an inconsistent manner [bad-override]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:866:17
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:929:17
ERROR Class member `EmptySplitKey.split` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:866:17
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:929:17
ERROR Argument `dict[TestMappingUserInputsBranches.test_rejects_invalid_node_variable_key.EmptySplitKey, list[str]]` is not assignable to parameter `variable_mapping` with type `Mapping[str, Sequence[str]]` in function `core.workflow.workflow_entry.WorkflowEntry.mapping_user_inputs_to_variable_pool` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:871:34
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:934:34
ERROR Argument `TestWorkflowEntryTracing.test_traced_node_run_reports_success.FakeNode` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.workflow.workflow_entry.WorkflowEntry._traced_node_run` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:922:73
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:985:73
ERROR Argument `TestWorkflowEntryTracing.test_traced_node_run_reports_errors.FakeNode` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.workflow.workflow_entry.WorkflowEntry._traced_node_run` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:945:68
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:1008:68
ERROR Missing argument `case` in function `enterprise.telemetry.contracts.TelemetryEnvelope.__init__` [missing-argument]
--> tests/unit_tests/enterprise/telemetry/test_contracts.py:111:30
ERROR Missing argument `tenant_id` in function `enterprise.telemetry.contracts.TelemetryEnvelope.__init__` [missing-argument]
|
Contributor
Pyrefly Type Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #38156
Important
Fixes #<issue number>.Summary
Screenshots
Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods