Skip to content

refactor: select in workflow_tools_manage_service#34477

Merged
asukaminato0721 merged 1 commit intolanggenius:mainfrom
RenzoMXD:refactor/select-workflow-tools-manage-service
Apr 2, 2026
Merged

refactor: select in workflow_tools_manage_service#34477
asukaminato0721 merged 1 commit intolanggenius:mainfrom
RenzoMXD:refactor/select-workflow-tools-manage-service

Conversation

@RenzoMXD
Copy link
Copy Markdown
Contributor

@RenzoMXD RenzoMXD commented Apr 2, 2026

Summary

  • Migrate all 10 db.session.query() calls to SQLAlchemy 2.x select() style in workflow_tools_manage_service.py
  • Replace .first() with db.session.scalar() + .limit(1) for single-row queries
  • Replace .query().where().delete() with db.session.execute(delete().where())

Test plan

  • All 79 unit tests pass for tools service tests
  • Type checks pass (basedpyright + pyrefly + mypy)

Part of #22668

@RenzoMXD RenzoMXD requested a review from QuantumGhost as a code owner April 2, 2026 11:18
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. refactor labels Apr 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Pyrefly Diff

No changes detected.

@RenzoMXD
Copy link
Copy Markdown
Contributor Author

RenzoMXD commented Apr 2, 2026

Review please. @asukaminato0721

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 2, 2026
@asukaminato0721 asukaminato0721 added this pull request to the merge queue Apr 2, 2026
Merged via the queue into langgenius:main with commit dbfb474 Apr 2, 2026
27 of 29 checks passed
@RenzoMXD RenzoMXD deleted the refactor/select-workflow-tools-manage-service branch April 2, 2026 12:50
volcano303 pushed a commit to volcano303/dify that referenced this pull request Apr 7, 2026
HanqingZ pushed a commit to HanqingZ/dify that referenced this pull request Apr 23, 2026
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