dify/api/core/helper/code_executor
EvanYao826 fe29a6585e fix: remove premature db.session operations and validate code language
Remove premature db.session.commit() and db.session.close() calls that
break transaction isolation and cause DetachedInstanceError:

- DatasetRetrieval._on_query: remove commit(), stage audit rows on the
  scoped session for the caller to commit (#37886)
- cloud_edition_billing_rate_limit_check: remove commit() after adding
  rate limit log, upstream session state is no longer flushed (#37885)
- ToolEngine._create_message_files: replace commit()+close() with
  flush() to obtain IDs without ending the transaction (#37884)

Add defensive validation for unsupported code languages in
CodeExecutor.execute_code to prevent sending null language to the
sandbox service (#37874)
2026-06-25 14:16:24 +08:00
..
javascript refactor: add missing @override decorator to code executor providers and transformers (#36496) 2026-05-21 19:39:10 +00:00
jinja2 refactor: add missing @override decorator to code executor providers and transformers (#36496) 2026-05-21 19:39:10 +00:00
python3 refactor: add missing @override decorator to code executor providers and transformers (#36496) 2026-05-21 19:39:10 +00:00
__init__.py refactor(code_executor): update input type annotations to use Mapping for better type safety (#10478) 2024-11-11 13:10:39 +08:00
code_executor.py fix: remove premature db.session operations and validate code language 2026-06-25 14:16:24 +08:00
code_node_provider.py refactor(typing): Fixup typing A2 - workflow engine & nodes (#31723) 2026-01-31 18:00:56 +09:00
template_transformer.py refactor: convert isinstance chains to match/case (part 8) (#36869) 2026-05-31 14:11:05 +00:00