Skip to content

fix: align Dataset ORM defaults with database server defaults#35118

Open
claytonlin1110 wants to merge 5 commits intolanggenius:mainfrom
claytonlin1110:fix/dataset-orm-defaults
Open

fix: align Dataset ORM defaults with database server defaults#35118
claytonlin1110 wants to merge 5 commits intolanggenius:mainfrom
claytonlin1110:fix/dataset-orm-defaults

Conversation

@claytonlin1110
Copy link
Copy Markdown

@claytonlin1110 claytonlin1110 commented Apr 13, 2026

Summary

Fixes #31123

The Dataset model had several columns with database server_default values but no corresponding ORM-level defaults, so the class did not clearly reflect real insert behavior. This PR aligns declared defaults with the schema and clarifies nullable / optional fields.

Notes

  • data_source_type remains NULL by default so existing logic that treats “no source yet” as unset continues to work (e.g. when the first document defines the source).
  • tenant_id, name, and created_by are still required for a valid row; this change does not make arbitrarily minimal constructors valid for real inserts.

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-14 06:08:51.410048027 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-14 06:08:40.989932011 +0000
@@ -596,6 +596,8 @@
    --> services/audio_service.py:151:52
 ERROR Argument `str | None` is not assignable to parameter `value` with type `SQLCoreOperations[str] | str` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> services/conversation_service.py:131:33
+ERROR Argument `Literal['notion_import', 'upload_file', 'website_crawl']` is not assignable to parameter `value` with type `DataSourceType | SQLCoreOperations[DataSourceType | None] | None` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> services/dataset_service.py:1929:40
 ERROR `dict[str, bool | dict[str, Any] | str | None]` is not assignable to variable `data_source_info` with type `dict[str, bool | str]` [bad-assignment]
     --> services/dataset_service.py:2121:56
 ERROR `dict[str, bool | dict[str, Any] | str | None]` is not assignable to variable `data_source_info` with type `dict[str, bool | str]` [bad-assignment]
@@ -622,6 +624,8 @@
   --> services/hit_testing_service.py:94:21
 ERROR `handled_tenant_count` was assigned in the current scope before the nonlocal declaration [unknown-name]
   --> services/plugin/plugin_migration.py:92:34
+ERROR Argument `DataSourceType | None` is not assignable to parameter `datasource_type` with type `str` in function `RagPipelineTransformService._get_transform_yaml` [bad-argument-type]
+  --> services/rag_pipeline/rag_pipeline_transform_service.py:52:60
 ERROR `dict[str, Any]` is not assignable to attribute `credentials` with type `Never` [bad-assignment]
    --> services/trigger/trigger_provider_service.py:487:40
 ERROR `int` is not assignable to attribute `credential_expires_at` with type `Never` [bad-assignment]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Aligns the Dataset SQLAlchemy model’s ORM-side defaults with existing database server_default behaviors, and clarifies which fields are optional/nullable to better match real insert semantics.

Changes:

  • Adds ORM default values for fields that already have DB server_default values (e.g., provider, keyword_number, booleans, runtime_mode).
  • Makes data_source_type explicitly nullable and documents why it remains unset until first document ingestion.
  • Adds explicit default=None for several nullable/optional fields to reflect optionality in the ORM model.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/models/dataset.py Outdated
Comment thread api/models/dataset.py Outdated
Comment thread api/models/dataset.py Outdated
Comment thread api/models/dataset.py Outdated
Comment thread api/models/dataset.py Outdated
Comment thread api/models/dataset.py Outdated
Comment thread api/models/dataset.py Outdated
Comment thread api/models/dataset.py Outdated
@claytonlin1110
Copy link
Copy Markdown
Author

@asukaminato0721 Would you please review?

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-16 07:57:54.455695246 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-16 07:57:43.391754329 +0000
@@ -1,9 +1,5 @@
-ERROR Object of class `Server` has no attribute `app` [missing-attribute]
-   --> app_factory.py:132:5
 ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
-   --> controllers/console/app/app.py:552:13
-ERROR Object of class `object` has no attribute `value` [missing-attribute]
-  --> controllers/console/app/conversation_variables.py:48:24
+   --> controllers/console/app/app.py:561:13
 ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
   --> controllers/console/auth/email_register.py:75:108
 ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
@@ -16,12 +12,8 @@
   --> controllers/console/setup.py:40:2
 ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
   --> controllers/console/setup.py:65:2
-ERROR Object of class `Server` has no attribute `app` [missing-attribute]
-  --> controllers/console/socketio/workflow.py:45:14
 ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
   --> controllers/console/version.py:30:2
-ERROR Object of class `object` has no attribute `value` [missing-attribute]
-  --> controllers/service_api/app/conversation.py:87:24
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
@@ -86,6 +78,18 @@
    --> core/rag/datasource/keyword/jieba/jieba.py:157:29
 ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
   --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:116:61
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:126:62
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:152:61
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:158:62
+ERROR `response` may be uninitialized [unbound-name]
+   --> core/rag/extractor/firecrawl/firecrawl_app.py:183:16
+ERROR `response` may be uninitialized [unbound-name]
+   --> core/rag/extractor/firecrawl/firecrawl_app.py:192:16
 ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.post` [bad-argument-type]
    --> core/rag/extractor/notion_extractor.py:106:25
 ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.request` [bad-argument-type]
@@ -126,8 +130,6 @@
   --> extensions/storage/huawei_obs_storage.py:27:23
 ERROR Cannot index into `Literal['']` [bad-index]
   --> extensions/storage/huawei_obs_storage.py:31:20
-ERROR Object of class `object` has no attribute `value` [missing-attribute]
-  --> fields/conversation_variable_fields.py:60:24
 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 Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `dify_vdb_alibabacloud_mysql.alibabacloud_mysql_vector.AlibabaCloudMySQLVectorFactory.init_vector` [bad-argument-type]
@@ -594,6 +596,8 @@
    --> services/audio_service.py:151:52
 ERROR Argument `str | None` is not assignable to parameter `value` with type `SQLCoreOperations[str] | str` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> services/conversation_service.py:131:33
+ERROR Argument `Literal['notion_import', 'upload_file', 'website_crawl']` is not assignable to parameter `value` with type `DataSourceType | SQLCoreOperations[DataSourceType | None] | None` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> services/dataset_service.py:1929:40
 ERROR `dict[str, bool | dict[str, Any] | str | None]` is not assignable to variable `data_source_info` with type `dict[str, bool | str]` [bad-assignment]
     --> services/dataset_service.py:2121:56
 ERROR `dict[str, bool | dict[str, Any] | str | None]` is not assignable to variable `data_source_info` with type `dict[str, bool | str]` [bad-assignment]
@@ -620,6 +624,8 @@
   --> services/hit_testing_service.py:94:21
 ERROR `handled_tenant_count` was assigned in the current scope before the nonlocal declaration [unknown-name]
   --> services/plugin/plugin_migration.py:92:34
+ERROR Argument `DataSourceType | None` is not assignable to parameter `datasource_type` with type `str` in function `RagPipelineTransformService._get_transform_yaml` [bad-argument-type]
+  --> services/rag_pipeline/rag_pipeline_transform_service.py:52:60
 ERROR `dict[str, Any]` is not assignable to attribute `credentials` with type `Never` [bad-assignment]
    --> services/trigger/trigger_provider_service.py:487:40
 ERROR `int` is not assignable to attribute `credential_expires_at` with type `Never` [bad-assignment]
@@ -638,6 +644,8 @@
   --> tests/integration_tests/controllers/console/app/test_feedback_export_api.py:32:22
 ERROR Argument `Literal['normal']` is not assignable to parameter `value` with type `AppStatus | SQLCoreOperations[AppStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
   --> tests/integration_tests/controllers/console/app/test_model_config_permissions.py:28:22
+ERROR Attribute `current_tenant_id` of class `Account` is a read-only property and cannot be set [read-only]
+  --> tests/integration_tests/controllers/console/workspace/test_trigger_provider_permissions.py:46:9
 ERROR `dict[str, str]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
   --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:76:21
 ERROR Argument `_GP` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.nodes.datasource.datasource_node.DatasourceNode.__init__` [bad-argument-type]
@@ -664,6 +672,8 @@
    --> tests/integration_tests/services/test_workflow_draft_variable_service.py:651:21
 ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
    --> tests/integration_tests/services/test_workflow_draft_variable_service.py:817:21
+ERROR Argument `Literal['unsupported_language']` is not assignable to parameter `language` with type `CodeLanguage` in function `core.helper.code_executor.code_executor.CodeExecutor.execute_workflow_code_template` [bad-argument-type]
+  --> tests/integration_tests/workflow/nodes/code_executor/test_code_executor.py:10:62
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.code.code_node.CodeNode.__init__` [bad-argument-type]
   --> tests/integration_tests/workflow/nodes/test_code.py:68:16
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
@@ -687,11 +697,15 @@
 ERROR `dict[str, str | None]` is not assignable to attribute `env` with type `dict[str, str]` [bad-assignment]
    --> tests/test_containers_integration_tests/conftest.py:204:39
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
-   --> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:633:51
+   --> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:632:51
+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/test_containers_integration_tests/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:196:9
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
+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/test_containers_integration_tests/controllers/console/helpers.py:40:48
 ERROR `SimpleNamespace` is not assignable to attribute `mcp_ns` with type `Namespace` [bad-assignment]
   --> tests/test_containers_integration_tests/controllers/mcp/test_mcp.py:27:21
 ERROR Attribute `payload` of class `Namespace` is a read-only property and cannot be set [read-only]
@@ -704,8 +718,6 @@
    --> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:183:29
 ERROR Missing argument `tag_id` in function `controllers.service_api.dataset.dataset.TagDeletePayload.__init__` [missing-argument]
    --> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:195:29
-ERROR `in` is not supported between `Literal['webapp-logo']` and `None` [not-iterable]
-   --> tests/test_containers_integration_tests/controllers/web/test_site.py:133:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:74:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
@@ -720,6 +732,10 @@
    --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:162:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
    --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:179:33
+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/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:95:20
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+   --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:104:20
 ERROR Attribute `file_service` of class `TestPauseStatePersistenceLayerTestContainers` is a read-only descriptor with no `__set__` and cannot be set [read-only]
    --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:156:9
 ERROR Attribute `workflow_run_service` of class `TestPauseStatePersistenceLayerTestContainers` is a read-only descriptor with no `__set__` and cannot be set [read-only]
@@ -802,12 +818,20 @@
    --> tests/test_containers_integration_tests/core/rag/retrieval/test_dataset_retrieval_integration.py:574:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/core/rag/retrieval/test_dataset_retrieval_integration.py:584:23
+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/test_containers_integration_tests/core/repositories/test_human_input_form_repository_impl.py:32:48
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+  --> tests/test_containers_integration_tests/core/repositories/test_human_input_form_repository_impl.py:42:20
 ERROR `dict[str, Any]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:105:40
 ERROR `dict[str, Any]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:120:40
 ERROR `dict[str, Any]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:134:38
+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/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:178:20
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:187:20
 ERROR Argument `Connection | Engine` is not assignable to parameter `session_factory` with type `Engine | sessionmaker[Unknown]` in function `core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:264:29
 ERROR Argument `Connection | Engine` is not assignable to parameter `session_factory` with type `Engine | sessionmaker[Unknown]` in function `core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository.__init__` [bad-argument-type]
@@ -886,6 +910,12 @@
     --> tests/test_containers_integration_tests/services/test_account_service.py:2320:33
 ERROR TypedDict `TenantCustomConfigDict` does not have key `feature_flags` [bad-typed-dict-key]
     --> tests/test_containers_integration_tests/services/test_account_service.py:2321:33
+ERROR Argument `Literal['pending']` is not assignable to parameter `value` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> tests/test_containers_integration_tests/services/test_account_service.py:2854:35
+ERROR Argument `Literal['active']` is not assignable to parameter `value` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> tests/test_containers_integration_tests/services/test_account_service.py:2944:35
+ERROR Argument `Literal['archive']` is not assignable to parameter `value` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> tests/test_containers_integration_tests/services/test_account_service.py:3334:25
 ERROR Argument `dict[str, AppMode | str] | dict[str, str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_advanced_prompt_template_service.py:701:63
 ERROR Argument `dict[str, AppMode | str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
@@ -1139,12 +1169,6 @@
 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/test_containers_integration_tests/services/test_dataset_service_get_segments.py:44:62
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/test_containers_integration_tests/services/test_dataset_service_permissions.py:37:20
-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/test_containers_integration_tests/services/test_dataset_service_permissions.py:39:58
-ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/test_containers_integration_tests/services/test_dataset_service_permissions.py:66:20
-ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_dataset_service_retrieval.py:45:20
 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/test_containers_integration_tests/services/test_dataset_service_retrieval.py:49:20
@@ -1154,6 +1178,10 @@
    --> tests/test_containers_integration_tests/services/test_dataset_service_retrieval.py:156:29
 ERROR Argument `Literal['knowledge']` is not assignable to parameter `type` with type `SQLCoreOperations[TagType] | TagType` in function `models.model.Tag.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_dataset_service_retrieval.py:179:18
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+  --> tests/test_containers_integration_tests/services/test_dataset_service_update_dataset.py:29:20
+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/test_containers_integration_tests/services/test_dataset_service_update_dataset.py:34:61
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_end_user_service.py:37:18
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -1246,7 +1274,7 @@
    --> tests/test_containers_integration_tests/services/test_model_provider_service.py:187:24
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
   --> tests/test_containers_integration_tests/services/test_ops_service.py:59:13
-ERROR Argument `dict[str, Any] | dict[Unknown, Unknown] | object | None` is not assignable to parameter `tracing_config` with type `SQLCoreOperations[dict[str, Any] | None] | dict[str, Any] | None` in function `models.model.TraceAppConfig.__init__` [bad-argument-type]
+ERROR Argument `dict[Unknown, Unknown] | object | None` is not assignable to parameter `tracing_config` with type `SQLCoreOperations[dict[Unknown, Unknown] | None] | dict[Unknown, Unknown] | None` in function `models.model.TraceAppConfig.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_ops_service.py:84:28
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/test_containers_integration_tests/services/test_recommended_app_service.py:198:16
@@ -1279,16 +1307,6 @@
 ERROR Argument `Literal['end_user']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.web.SavedMessage.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_saved_message_service.py:602:67
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/test_containers_integration_tests/services/test_schedule_service.py:30:20
-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/test_containers_integration_tests/services/test_schedule_service.py:32:58
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_schedule_service.py:319:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_schedule_service.py:353:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_schedule_service.py:382:22
-ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_tag_service.py:59:20
 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/test_containers_integration_tests/services/test_tag_service.py:68:20
@@ -1376,10 +1394,6 @@
    --> tests/test_containers_integration_tests/services/test_webhook_service.py:496:79
 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/test_containers_integration_tests/services/test_webhook_service.py:505:79
-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/test_containers_integration_tests/services/test_webhook_service_relationships.py:36:72
-ERROR Class `WebhookServiceRelationshipFactory` has no class attribute `_read_cache` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_webhook_service_relationships.py:468:26
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/services/test_workflow_app_service.py:101:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `log` with type `WorkflowAppLog` in function `services.workflow_app_service.LogView.__init__` [bad-argument-type]
@@ -1625,129 +1639,129 @@
 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/services/workflow/test_workflow_node_execution_service_repository.py:21:64
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/test_containers_integration_tests/tasks/test_add_document_to_index_task.py:56:20
+  --> tests/test_containers_integration_tests/tasks/test_add_document_to_index_task.py:55:20
 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/test_containers_integration_tests/tasks/test_add_document_to_index_task.py:63:20
+  --> tests/test_containers_integration_tests/tasks/test_add_document_to_index_task.py:62:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/test_containers_integration_tests/tasks/test_batch_clean_document_task.py:73:20
+  --> tests/test_containers_integration_tests/tasks/test_batch_clean_document_task.py:72:20
 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/test_containers_integration_tests/tasks/test_batch_clean_document_task.py:82:20
+  --> tests/test_containers_integration_tests/tasks/test_batch_clean_document_task.py:81:20
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_batch_clean_document_task.py:297:23
+   --> tests/test_containers_integration_tests/tasks/test_batch_clean_document_task.py:294:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_batch_clean_document_task.py:698:27
+   --> tests/test_containers_integration_tests/tasks/test_batch_clean_document_task.py:677:27
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:101:20
+   --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:100:20
 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/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:110:20
+   --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:109:20
 ERROR `>` is not supported between `None` and `Literal[0]` [unsupported-operation]
-   --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:314:16
+   --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:316:16
 ERROR `>` is not supported between `None` and `Literal[0]` [unsupported-operation]
-   --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:707:16
+   --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:708:16
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:113:20
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:112:20
 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/test_containers_integration_tests/tasks/test_clean_dataset_task.py:123:20
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:122:20
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:298:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:297:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:301:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:300:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:422:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:409:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:425:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:412:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:498:36
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:477:36
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:501:26
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:480:26
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:555:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:532:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:558:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:535:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:644:36
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:617:36
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:647:26
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:620:26
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:761:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:730:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:764:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:733:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:855:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:816:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:858:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:819:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-    --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1012:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:971:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-    --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1015:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:974:22
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:91:23
+  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:90:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:108:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:107:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:131:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:130:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:228:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:222:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:277:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:271:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:289:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:283:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:310:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:304:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:365:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:359:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:377:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:371:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:399:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:393:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:453:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:445:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:470:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:462:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:492:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:484:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:582:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:560:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:594:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:572:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:619:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:597:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:682:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:656:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:694:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:668:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:714:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:688:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:764:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:738:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:782:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:756:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:805:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:779:31
 ERROR `num_segments_per_doc` may be uninitialized [unbound-name]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:833:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:803:32
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:882:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:850:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1004:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:965:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1030:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:991:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1052:31
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1013:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1119:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1076:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1132:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1089:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1169:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1126:27
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/tasks/test_create_segment_to_index_task.py:75:20
 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/test_containers_integration_tests/tasks/test_create_segment_to_index_task.py:84:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_dataset_indexing_task.py:123:20
+   --> tests/test_containers_integration_tests/tasks/test_dataset_indexing_task.py:122:20
 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/test_containers_integration_tests/tasks/test_dataset_indexing_task.py:128:53
+   --> tests/test_containers_integration_tests/tasks/test_dataset_indexing_task.py:127:53
 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/test_containers_integration_tests/tasks/test_delete_segment_from_index_task.py:52:84
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -1759,21 +1773,25 @@
 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/test_containers_integration_tests/tasks/test_disable_segment_from_index_task.py:64:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:54:20
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:53:20
 ERROR Object of class `Account` has no attribute `tenant_id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:59:9
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:58:9
 ERROR Object of class `Account` has no attribute `type` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:60:9
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:59:9
 ERROR `Literal['owner']` is not assignable to attribute `role` with type `TenantAccountRole | None` [bad-assignment]
-  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:61:24
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:60:24
 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/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:71:20
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:70:20
 ERROR Object of class `Account` has no attribute `tenant_id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:73:21
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:72:21
 ERROR Object of class `DatasetProcessRule` has no attribute `tenant_id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:234:9
+   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:233:9
 ERROR Object of class `DatasetProcessRule` has no attribute `updated_by` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:246:9
+   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:245:9
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+  --> tests/test_containers_integration_tests/tasks/test_document_indexing_sync_task.py:33:20
+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/test_containers_integration_tests/tasks/test_document_indexing_sync_task.py:38:61
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/tasks/test_document_indexing_task.py:74:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -1783,17 +1801,17 @@
 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/test_containers_integration_tests/tasks/test_document_indexing_task.py:163:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:44:20
+  --> tests/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:43:20
 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/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:49:53
+  --> tests/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:48:53
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-  --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:85:20
+  --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:84:20
 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/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:92:20
+  --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:91:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:220:20
+   --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:219:20
 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/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:227:20
+   --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:226:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/tasks/test_enable_segments_to_index_task.py:55:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -1826,6 +1844,14 @@
   --> tests/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.py:72:20
 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/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.py:79:20
+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/test_containers_integration_tests/test_workflow_pause_integration.py:184:20
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+   --> tests/test_containers_integration_tests/test_workflow_pause_integration.py:193:20
+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/test_containers_integration_tests/test_workflow_pause_integration.py:699:20
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+   --> tests/test_containers_integration_tests/test_workflow_pause_integration.py:708:20
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/trigger/conftest.py:37:79
 ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `core.trigger.debug.event_selectors.TriggerDebugEventPoller.__init__` [bad-argument-type]
@@ -1895,17 +1921,9 @@
 ERROR Object of class `object` has no attribute `exec_module` [missing-attribute]
    --> tests/unit_tests/controllers/console/app/test_app_response_models.py:111:5
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/app/test_workflow.py:26:40
+  --> tests/unit_tests/controllers/console/app/test_workflow.py:25:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
-ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:405:5
-ERROR `in` is not supported between `Literal['Maximum']` and `None` [not-iterable]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:433:12
-ERROR Argument `dict[str, float | list[Unknown] | str]` is not assignable to parameter `payload` with type `dict[str, object] | None` in function `_patch_payload` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow_comment_api.py:157:29
-ERROR Argument `dict[str, float | str]` is not assignable to parameter `payload` with type `dict[str, object] | None` in function `_patch_payload` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow_comment_api.py:189:29
+  --> tests/unit_tests/controllers/console/app/test_workflow.py:43:42
 ERROR Type `Response` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:87:9
 ERROR Type `Response` is not iterable [not-iterable]
@@ -2004,6 +2022,8 @@
   --> tests/unit_tests/controllers/console/test_human_input_form.py:47:57
 ERROR Object of class `Flask` has no attribute `login_manager` [missing-attribute]
   --> tests/unit_tests/controllers/console/test_workspace_account.py:23:5
+ERROR Argument `Literal['active']` is not assignable to parameter `value` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+  --> tests/unit_tests/controllers/console/test_workspace_account.py:36:22
 ERROR `SimpleNamespace | object` is not assignable to attribute `_current_tenant` with type `Tenant | None` [bad-assignment]
   --> tests/unit_tests/controllers/console/test_workspace_account.py:37:31
 ERROR Object of class `Flask` has no attribute `login_manager` [missing-attribute]
@@ -2057,39 +2077,39 @@
 ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
    --> tests/unit_tests/controllers/files/test_upload.py:170:26
 ERROR Could not find name `Import` [unknown-name]
-   --> tests/unit_tests/controllers/inner_api/app/test_dsl.py:120:71
+   --> tests/unit_tests/controllers/inner_api/app/test_dsl.py:119:71
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:169:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:168:44
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:169:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:168:44
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:186:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:185:31
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:186:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:185:31
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:201:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:200:35
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:201:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:200:35
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:223:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:222:44
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:223:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:222:44
 ERROR Argument `type[PluginTestPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:251:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:250:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:257:36
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:256:36
 ERROR Argument `type[PluginTestPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:266:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:265:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:273:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:272:31
 ERROR Argument `type[TestPluginData.test_should_raise_error_on_invalid_payload.InvalidPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:284:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:283:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:291:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:290:31
 ERROR Argument `type[PluginTestPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:297:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:296:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:303:36
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:302:36
 ERROR Cannot index into `Iterable[bytes]` [bad-index]
    --> tests/unit_tests/controllers/service_api/app/test_audio.py:189:16
 ERROR Cannot index into `Response` [bad-index]
@@ -2099,11 +2119,11 @@
 ERROR Argument `list[dict[str, Any]] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
    --> tests/unit_tests/controllers/service_api/app/test_completion.py:156:20
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
-  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:84:35
+  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:80:35
 ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
-  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:89:35
+  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:85:35
 ERROR Missing argument `session` in function `services.conversation_service.ConversationService.pagination_by_last_id` [missing-argument]
-   --> tests/unit_tests/controllers/service_api/app/test_conversation.py:427:59
+   --> tests/unit_tests/controllers/service_api/app/test_conversation.py:383:59
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
   --> tests/unit_tests/controllers/service_api/app/test_message.py:94:63
 ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
@@ -2117,21 +2137,21 @@
 ERROR Argument value `Literal[102]` violates Pydantic `le` constraint `Literal[101]` for field `limit` [bad-argument-type]
    --> tests/unit_tests/controllers/service_api/app/test_message.py:188:31
 ERROR Argument `list[dict[str, Any]] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:109:20
+  --> tests/unit_tests/controllers/service_api/app/test_workflow.py:92:20
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:171:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:154:30
 ERROR Argument value `Literal[100000]` violates Pydantic `le` constraint `Literal[99999]` for field `page` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:176:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:159:30
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:181:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:164:30
 ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:186:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:169:30
 ERROR Object of class `dict` has no attribute `page` [missing-attribute]
-   --> tests/unit_tests/controll\n\n... (truncated) ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dataset seems missing many fields, or have strange default?

2 participants