refactor: Move trigger workflow nodes into core workflow#33444
refactor: Move trigger workflow nodes into core workflow#33444
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request undertakes a significant refactoring effort to centralize the management and ownership of trigger-related workflow nodes. By relocating these nodes from the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 09:22:47.396402210 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 09:22:37.346407820 +0000
@@ -482,9 +482,9 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:332:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
- --> dify_graph/nodes/base/node.py:414:32
+ --> dify_graph/nodes/base/node.py:413:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
--> dify_graph/nodes/document_extractor/node.py:446:19
ERROR `+` is not supported between `list[Unknown]` and `str` [unsupported-operation]
@@ -5255,9 +5255,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
1 similar comment
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 09:22:47.396402210 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 09:22:37.346407820 +0000
@@ -482,9 +482,9 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:332:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
- --> dify_graph/nodes/base/node.py:414:32
+ --> dify_graph/nodes/base/node.py:413:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
--> dify_graph/nodes/document_extractor/node.py:446:19
ERROR `+` is not supported between `list[Unknown]` and `str` [unsupported-operation]
@@ -5255,9 +5255,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
There was a problem hiding this comment.
Code Review
This pull request refactors the codebase by moving trigger-related workflow nodes (trigger_plugin, trigger_schedule, trigger_webhook) from dify_graph.nodes to a new core.workflow.nodes package. This is a good structural improvement. The changes are mostly file moves and import path updates, which have been done consistently across services, tasks, and tests. A new core.workflow.nodes.node_mapping module correctly orchestrates the registration of both core and dify_graph nodes. The refactoring in dify_graph/nodes/base/node.py to use node_type for checks instead of isinstance is a welcome improvement for decoupling. The overall implementation is solid, and I did not find any issues.
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 10:17:57.410247135 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 10:17:48.752313203 +0000
@@ -484,7 +484,7 @@
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
--> dify_graph/nodes/base/node.py:331:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
- --> dify_graph/nodes/base/node.py:414:32
+ --> dify_graph/nodes/base/node.py:408:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
--> dify_graph/nodes/document_extractor/node.py:446:19
ERROR `+` is not supported between `list[Unknown]` and `str` [unsupported-operation]
@@ -5255,9 +5255,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
1 similar comment
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 10:17:57.410247135 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 10:17:48.752313203 +0000
@@ -484,7 +484,7 @@
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
--> dify_graph/nodes/base/node.py:331:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
- --> dify_graph/nodes/base/node.py:414:32
+ --> dify_graph/nodes/base/node.py:408:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
--> dify_graph/nodes/document_extractor/node.py:446:19
ERROR `+` is not supported between `list[Unknown]` and `str` [unsupported-operation]
@@ -5255,9 +5255,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
|
|
||
| from dify_graph.nodes.trigger_plugin.trigger_event_node import TriggerEventNode | ||
|
|
||
| if isinstance(self, TriggerEventNode): |
There was a problem hiding this comment.
Removing this branch drops provider_id from NodeRunStartedEvent for trigger-plugin nodes. I verified on the current head that next(TriggerEventNode(...).run()).provider_id == "", while downstream start-event consumers still use that field for trigger icon lookup in workflow_response_converter.py and workflow_app_runner.py. Please preserve the start-event provider metadata when moving the node, either by keying off self.node_type == NodeType.TRIGGER_PLUGIN here or by moving this into a node-level helper.
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 10:39:31.931060418 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 10:39:22.106122785 +0000
@@ -482,7 +482,7 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:335:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
--> dify_graph/nodes/base/node.py:414:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
1 similar comment
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 10:39:31.931060418 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 10:39:22.106122785 +0000
@@ -482,7 +482,7 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:335:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
--> dify_graph/nodes/base/node.py:414:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 10:47:50.912428179 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 10:47:41.870210877 +0000
@@ -482,7 +482,7 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:335:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
--> dify_graph/nodes/base/node.py:414:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
1 similar comment
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 10:47:50.912428179 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 10:47:41.870210877 +0000
@@ -482,7 +482,7 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:335:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
--> dify_graph/nodes/base/node.py:414:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 10:52:47.889692394 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 10:52:38.782761096 +0000
@@ -482,7 +482,7 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:335:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
--> dify_graph/nodes/base/node.py:414:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
1 similar comment
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 10:52:47.889692394 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 10:52:38.782761096 +0000
@@ -482,7 +482,7 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:335:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
--> dify_graph/nodes/base/node.py:414:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
a76162c to
34ef10c
Compare
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 11:15:40.912483522 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 11:15:31.379419476 +0000
@@ -482,7 +482,7 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:335:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
--> dify_graph/nodes/base/node.py:414:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
1 similar comment
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-14 11:15:40.912483522 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-14 11:15:31.379419476 +0000
@@ -482,7 +482,7 @@
ERROR `reason` may be uninitialized [unbound-name]
--> dify_graph/graph_engine/layers/execution_limits.py:141:81
ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
- --> dify_graph/nodes/base/node.py:331:31
+ --> dify_graph/nodes/base/node.py:335:31
ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
--> dify_graph/nodes/base/node.py:414:32
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
--> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16
|
Important
Fixes #<issue number>.Summary
Fixes #33442.
Move trigger-related workflow nodes into
core.workflow.Screenshots
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint gods