Skip to content

chore: inject session - #37941

Merged
asukaminato0721 merged 2 commits into
langgenius:mainfrom
asukaminato0721:db.session
Jun 26, 2026
Merged

asukaminato0721 merged 2 commits into
langgenius:mainfrom
asukaminato0721:db.session

Conversation

@asukaminato0721

Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

#35934

Screenshots

Before After
... ...

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 Jun 25, 2026
@dosubot dosubot Bot added the refactor label Jun 25, 2026
@github-actions

github-actions Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-06-26 02:28:59.638652154 +0000
+++ /tmp/pyrefly_pr.txt	2026-06-26 02:28:49.916659383 +0000
@@ -6905,35 +6905,35 @@
 ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
    --> tests/unit_tests/services/test_credit_pool_service.py:146:5
 ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.dataset_service.DatasetService.create_empty_dataset` [bad-argument-type]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:329:93
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:348:93
 ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.dataset_service.DatasetService.create_empty_dataset` [bad-argument-type]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:353:25
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:372:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.dataset_service.DatasetService.create_empty_dataset` [bad-argument-type]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:396:25
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:415:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `services.dataset_service.DatasetService._update_pipeline_knowledge_base_node_data` [bad-argument-type]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:713:70
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:736:70
 ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `services.dataset_service.DatasetService._update_pipeline_knowledge_base_node_data` [bad-argument-type]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:723:70
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:746:70
 ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `services.dataset_service.DatasetService._update_pipeline_knowledge_base_node_data` [bad-argument-type]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:762:70
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:785:70
 ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `services.dataset_service.DatasetService._update_pipeline_knowledge_base_node_data` [bad-argument-type]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:785:74
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:808:74
 ERROR Object of class `FakeAccount` has no attribute `current_tenant_id` [missing-attribute]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:852:9
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:875:9
 ERROR Object of class `FakeAccount` has no attribute `current_tenant_id` [missing-attribute]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:890:9
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:913:9
 ERROR Argument `None` is not assignable to parameter `embedding_model_provider` with type `str` in function `tests.unit_tests.services.dataset_service_test_helpers.DatasetServiceUnitDataFactory.create_dataset_mock` [bad-argument-type]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:956:38
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:979:38
 ERROR Argument `None` is not assignable to parameter `embedding_model` with type `str` in function `tests.unit_tests.services.dataset_service_test_helpers.DatasetServiceUnitDataFactory.create_dataset_mock` [bad-argument-type]
-   --> tests/unit_tests/services/test_dataset_service_dataset.py:957:29
+   --> tests/unit_tests/services/test_dataset_service_dataset.py:980:29
 ERROR Object of class `FakeAccount` has no attribute `current_tenant_id` [missing-attribute]
-    --> tests/unit_tests/services/test_dataset_service_dataset.py:1015:9
+    --> tests/unit_tests/services/test_dataset_service_dataset.py:1038:9
 ERROR Object of class `FakeAccount` has no attribute `current_tenant_id` [missing-attribute]
-    --> tests/unit_tests/services/test_dataset_service_dataset.py:1050:9
+    --> tests/unit_tests/services/test_dataset_service_dataset.py:1073:9
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | None` in function `services.dataset_service.DatasetService.check_dataset_operator_permission` [bad-argument-type]
-    --> tests/unit_tests/services/test_dataset_service_dataset.py:1361:67
+    --> tests/unit_tests/services/test_dataset_service_dataset.py:1384:67
 ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset | None` in function `services.dataset_service.DatasetService.check_dataset_operator_permission` [bad-argument-type]
-    --> tests/unit_tests/services/test_dataset_service_dataset.py:1364:81
+    --> tests/unit_tests/services/test_dataset_service_dataset.py:1387:81
 ERROR Object of class `FakeAccount` has no attribute `id` [missing-attribute]
   --> tests/unit_tests/services/test_dataset_service_document.py:91:9
 ERROR Object of class `FakeAccount` has no attribute `current_tenant_id` [missing-attribute]

@github-actions

github-actions Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 51.34% 51.34% +0.00%
Strict coverage 50.86% 50.86% +0.00%
Typed symbols 30,576 30,577 +1
Untyped symbols 29,254 29,254 0
Modules 2930 2930 0

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jun 25, 2026
@asukaminato0721
asukaminato0721 force-pushed the db.session branch 2 times, most recently from 20acd34 to 8efe961 Compare June 25, 2026 10:36
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Jun 25, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 26, 2026
@asukaminato0721
asukaminato0721 added this pull request to the merge queue Jun 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2026
@asukaminato0721
asukaminato0721 added this pull request to the merge queue Jun 26, 2026
Merged via the queue into langgenius:main with commit 8d09b32 Jun 26, 2026
31 checks passed
@asukaminato0721
asukaminato0721 deleted the db.session branch June 26, 2026 13:57
Ssazurov pushed a commit to Ssazurov/dify that referenced this pull request Aug 8, 2026
Co-authored-by: WH-2099 <wh2099@pm.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants