Repository navigation
fix: legacy model_type deserialization regression - #34717
Merged
asukaminato0721 merged 2 commits intoApr 8, 2026
Merged
Conversation
6 tasks done
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-08 04:01:32.499122306 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-08 04:01:22.744096855 +0000
@@ -307,6 +307,8 @@
--> extensions/storage/huawei_obs_storage.py:31:20
ERROR Argument `Module[Crypto.Hash.SHA1] | Unknown` is not assignable to parameter with type `Hash | HashModule` [bad-argument-type]
--> libs/gmpy2_pkcs10aep_cipher.py:73:49
+ERROR Returned type `object` is not assignable to declared return type `T | None` [bad-return]
+ --> models/types.py:152:24
ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
--> schedule/queue_monitor_task.py:14:21
ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
@@ -724,15 +726,15 @@
ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=str, port=int, decode_responses=Literal[False]) [no-matching-overload]
--> tests/test_containers_integration_tests/libs/broadcast_channel/redis/test_streams_channel.py:38:27
ERROR Object of class `TypeEngine` has no attribute `length` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:96:16
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:104:16
ERROR Object of class `NoneType` has no attribute `user_type` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:133:20
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:141:20
ERROR Object of class `NoneType` has no attribute `user_type_nullable` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:134:20
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:142:20
ERROR Object of class `NoneType` has no attribute `user_type` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:138:20
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:146:20
ERROR Object of class `NoneType` has no attribute `user_type_nullable` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:139:20
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:147:20
ERROR Cannot instantiate `DifyAPISQLAlchemyWorkflowNodeExecutionRepository` because the following members are abstract: `save`, `save_execution_data`, `get_by_workflow_execution` [bad-instantiation]
--> tests/test_containers_integration_tests/repositories/test_sqlalchemy_api_workflow_node_execution_repository.py:122:70
ERROR Generator function should return `Generator` [bad-return]
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-08 04:15:05.946029252 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-08 04:14:57.110026187 +0000
@@ -724,15 +724,15 @@
ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=str, port=int, decode_responses=Literal[False]) [no-matching-overload]
--> tests/test_containers_integration_tests/libs/broadcast_channel/redis/test_streams_channel.py:38:27
ERROR Object of class `TypeEngine` has no attribute `length` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:96:16
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:104:16
ERROR Object of class `NoneType` has no attribute `user_type` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:133:20
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:141:20
ERROR Object of class `NoneType` has no attribute `user_type_nullable` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:134:20
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:142:20
ERROR Object of class `NoneType` has no attribute `user_type` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:138:20
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:146:20
ERROR Object of class `NoneType` has no attribute `user_type_nullable` [missing-attribute]
- --> tests/test_containers_integration_tests/models/test_types_enum_text.py:139:20
+ --> tests/test_containers_integration_tests/models/test_types_enum_text.py:147:20
ERROR Cannot instantiate `DifyAPISQLAlchemyWorkflowNodeExecutionRepository` because the following members are abstract: `save`, `save_execution_data`, `get_by_workflow_execution` [bad-instantiation]
--> tests/test_containers_integration_tests/repositories/test_sqlalchemy_api_workflow_node_execution_repository.py:122:70
ERROR Generator function should return `Generator` [bad-return]
|
asukaminato0721
enabled auto-merge
April 8, 2026 05:07
asukaminato0721
approved these changes
Apr 8, 2026
4 of 5 tasks
HanqingZ
pushed a commit
to HanqingZ/dify
that referenced
this pull request
Apr 23, 2026
This was referenced May 20, 2026
Ssazurov
pushed a commit
to Ssazurov/dify
that referenced
this pull request
Aug 8, 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.
Important
Fixes #<issue number>.Summary
Fixes #34683
This PR fixes a backward-compatibility regression introduced in #34300.
After provider-related model_type fields were migrated to EnumText(ModelType), workspaces containing legacy persisted values such as
text-generation,embeddings, orrerankingcould no longer be loaded correctlyScreenshots
Checklist
make lintandmake type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods