Self Checks
Dify version
1.15.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
While reading PR #37895 I noticed the same db.session.commit()
side-effect bug exists in two more files that were not part of that fix.
File 1: api/core/app/apps/base_app_runner.py lines 440-442
File 2: api/core/callback_handler/index_tool_callback_handler.py
lines 49-50 and 73-89
✔️ Expected Behavior
These methods should use an independent session for side-effect writes,
same as the pattern applied in #37895.
❌ Actual Behavior
Both files still call db.session.commit() on the shared request-scoped
session. Happy to submit a PR with the fix if this looks right.
Self Checks
Dify version
1.15.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
While reading PR #37895 I noticed the same
db.session.commit()side-effect bug exists in two more files that were not part of that fix.
File 1:
api/core/app/apps/base_app_runner.pylines 440-442File 2:
api/core/callback_handler/index_tool_callback_handler.pylines 49-50 and 73-89
✔️ Expected Behavior
These methods should use an independent session for side-effect writes,
same as the pattern applied in #37895.
❌ Actual Behavior
Both files still call
db.session.commit()on the shared request-scopedsession. Happy to submit a PR with the fix if this looks right.