Skip to content

refactor(api): Clean DB session - non pure-mechanic part#38597

Draft
cqjjjzr wants to merge 2 commits into
langgenius:mainfrom
cqjjjzr:db-session
Draft

refactor(api): Clean DB session - non pure-mechanic part#38597
cqjjjzr wants to merge 2 commits into
langgenius:mainfrom
cqjjjzr:db-session

Conversation

@cqjjjzr

@cqjjjzr cqjjjzr commented Jul 9, 2026

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

Continuation of #38227, the non-mechanic possibly behavior changing parts.

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

@cqjjjzr cqjjjzr changed the title refactor(api): Clean DB session - non-mechanic part refactor(api): Clean DB session - non pure-mechanic part Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-07-09 07:52:58.553052078 +0000
+++ /tmp/pyrefly_pr.txt	2026-07-09 07:52:49.028009143 +0000
@@ -8066,12 +8066,8 @@
    --> tests/unit_tests/services/test_summary_index_service.py:118:82
 ERROR Key `a` is not defined in TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
    --> tests/unit_tests/services/test_summary_index_service.py:118:83
-ERROR Object of class `NoneType` has no attribute `status` [missing-attribute]
-    --> tests/unit_tests/services/test_summary_index_service.py:1024:12
-ERROR Object of class `NoneType` has no attribute `error` [missing-attribute]
-    --> tests/unit_tests/services/test_summary_index_service.py:1025:39
 ERROR Object of class `NoneType` has no attribute `endswith` [missing-attribute]
-    --> tests/unit_tests/services/test_summary_index_service.py:1086:12
+    --> tests/unit_tests/services/test_summary_index_service.py:1181:12
 ERROR Cannot set item in `dict[str, int]` [unsupported-operation]
    --> tests/unit_tests/services/test_variable_truncator.py:142:31
 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]

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 52.64% 52.65% +0.00%
Strict coverage 52.16% 52.17% +0.00%
Typed symbols 32,587 32,593 +6
Untyped symbols 29,585 29,585 0
Modules 2982 2982 0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant