Repository navigation
refactor(api): isolate native webhook runtime - #45912
Merged
Merged
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-11-10 03:54:45.875447172 +0000
+++ /tmp/pyrefly_pr.txt 2026-11-10 03:54:33.431366126 +0000
@@ -1010,16 +1010,6 @@
--> tests/e2e_tests/containers/services/test_webapp_auth_service.py:45:14
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_webapp_auth_service.py:46:19
-ERROR Argument `Literal['workflow']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_webhook_service.py:62:14
-ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:69:72
-ERROR Argument `Literal['workflow']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:91:18
-ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:92:23
-ERROR Class `WebhookServiceRelationshipFactory` has no class attribute `_read_cache` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_webhook_service_relationships.py:549:26
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
--> tests/e2e_tests/containers/services/test_workflow_app_service.py:126:38
ERROR Argument `Literal['app-run']` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowRunTriggeredFrom] | WorkflowRunTriggeredFrom` in function `models.workflow.WorkflowRun.__init__` [bad-argument-type]
@@ -1598,12 +1588,10 @@
--> tests/e2e_tests/containers/trigger/conftest.py:65:14
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/trigger/conftest.py:66:19
-ERROR Argument `str | None` is not assignable to parameter `workflow_id` with type `SQLCoreOperations[str] | str` in function `models.trigger.WorkflowTriggerLog.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:208:25
ERROR Argument `dict[str, str | dict[str, str | dict[str, str]]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `core.trigger.debug.event_selectors.TriggerDebugEventPoller.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:310:21
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:293:21
ERROR Argument `dict[str, Any]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:611:49
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:588:49
ERROR Class member `StaticRepo.get_form` overrides parent class `HumanInputFormRepository` in an inconsistent manner [bad-override]
--> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:137:9
ERROR Argument `_TestFileReferenceFactory` is not assignable to parameter `file_reference_factory` with type `DifyFileReferenceFactory | None` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
@@ -2698,8 +2686,6 @@
--> tests/unit_tests/controllers/service_api/test_wraps.py:963:16
ERROR Object of class `FromClause` has no attribute `drop` [missing-attribute]
--> tests/unit_tests/controllers/trigger/test_trigger.py:46:5
-ERROR `_RequestStub` is not assignable to attribute `request` with type `Request` [bad-assignment]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:70:22
ERROR Argument `None` is not assignable to parameter `type` with type `EndUserType | SQLCoreOperations[EndUserType]` in function `models.model.EndUser.__init__` [bad-argument-type]
--> tests/unit_tests/controllers/web/test_wraps.py:387:81
ERROR Expected 1 more positional argument [bad-argument-count]
@@ -5895,42 +5881,6 @@
--> tests/unit_tests/services/tools/test_tools_transform_service.py:85:9
ERROR Object of class `Mapping` has no attribute `startswith` [missing-attribute]
--> tests/unit_tests/services/tools/test_tools_transform_service.py:819:20
-ERROR Argument `dict[str, dict[Unknown, Unknown]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:589:83
-ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:599:83
-ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:609:83
-ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:618:83
-ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:627:83
-ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:637:83
-ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:895:38
-ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:924:42
-ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:946:42
-ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:966:45
-ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:987:41
-ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:1011:45
-ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:1032:45
-ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:1053:45
-ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:1073:41
-ERROR Argument `dict[str, str | dict[str, str]]` is not assignable to parameter `webhook_data` with type `RawWebhookDataDict` in function `services.trigger.webhook_service.WebhookService._validate_http_metadata` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:1356:61
-ERROR Argument `dict[str, dict[str, int] | dict[str, str]]` is not assignable to parameter `webhook_data` with type `RawWebhookDataDict` in function `services.trigger.webhook_service.WebhookService.build_workflow_inputs` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:1368:59
-ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/trigger/test_webhook_service.py:1379:69
ERROR Cannot find module `dify_graph.enums` [missing-import]
--> tests/unit_tests/services/workflow/test_workflow_converter.py:36:5
ERROR Cannot find module `dify_graph.model_runtime.entities.llm_entities` [missing-import]
|
Contributor
Pyrefly Type Coverage
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #45912 +/- ##
==========================================
- Coverage 90.09% 90.09% -0.01%
==========================================
Files 6269 6271 +2
Lines 392030 392013 -17
Branches 78453 78442 -11
==========================================
- Hits 353203 353170 -33
- Misses 32735 32750 +15
- Partials 6092 6093 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Stream29
reviewed
Nov 9, 2026
…ok-runtime # Conflicts: # api/controllers/trigger/webhook.py # api/services/trigger/webhook_service.py # api/tests/unit_tests/controllers/trigger/test_webhook.py # api/tests/unit_tests/services/trigger/test_webhook_service.py
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 10, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 10, 2026
2 of 5 tasks
This was referenced Nov 23, 2026
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.
Summary
part of #39993
Refactor native webhook execution into injected admission, request parsing, and workflow dispatch components. Persist webhook bindings through the existing publication transaction and keep draft bindings scoped to the owning app.
Preserve the existing webhook response and validation behavior, including request size limits and numeric parameter handling.