Skip to content

test: use SQLite sessions in controllers service api - #39059

Merged
asukaminato0721 merged 3 commits into
langgenius:mainfrom
asukaminato0721:split/sqlite-unit-013-controllers-service-api
Aug 3, 2026
Merged

test: use SQLite sessions in controllers service api#39059
asukaminato0721 merged 3 commits into
langgenius:mainfrom
asukaminato0721:split/sqlite-unit-013-controllers-service-api

Conversation

@asukaminato0721

@asukaminato0721 asukaminato0721 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Split 013 of 077 from #38784. This PR scopes the SQLite-session migration to controllers service api.

Files

  • api/tests/unit_tests/controllers/service_api/app/test_app.py

Authored scope

  • 954 changed lines (361 additions, 593 deletions)
  • 1 files

Temporary upstream autofix

The upstream autofix.ci workflow adds dify-agent-runtime/README.md (6 additions, 6 deletions) to every API PR. That shared bot diff will disappear here after #38784 merges.

Dependency

Depends on #38784. The target tests passed with that foundation applied; this branch stays based on main so its authored diff remains minimal.

Validation

Part of #32454

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-08-03 03:07:25.500978850 +0000
+++ /tmp/pyrefly_pr.txt	2026-08-03 03:07:14.438881750 +0000
@@ -2300,6 +2300,14 @@
    --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:209:12
 ERROR `in` is not supported between `Literal['PATCH']` and `None` [not-iterable]
    --> tests/unit_tests/controllers/openapi/test_workspaces_members.py:210:12
+ERROR Object of class `FromClause` has no attribute `delete` [missing-attribute]
+  --> tests/unit_tests/controllers/service_api/app/test_app.py:90:17
+ERROR Argument `list[FromClause]` is not assignable to parameter `tables` with type `Sequence[Table] | None` in function `sqlalchemy.sql.schema.MetaData.create_all` [bad-argument-type]
+   --> tests/unit_tests/controllers/service_api/app/test_app.py:135:56
+ERROR Returned type `AppDatabase` is not assignable to declared return type `Iterator[AppDatabase]` [bad-return]
+   --> tests/unit_tests/controllers/service_api/app/test_app.py:268:12
+ERROR Object of class `FromClause` has no attribute `delete` [missing-attribute]
+   --> tests/unit_tests/controllers/service_api/app/test_app.py:418:29
 ERROR Cannot index into `Iterable[bytes]` [bad-index]
    --> tests/unit_tests/controllers/service_api/app/test_audio.py:191:16
 ERROR Cannot index into `Response` [bad-index]

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 57.30% 57.39% +0.09%
Strict coverage 56.83% 56.92% +0.09%
Typed symbols 37,551 37,591 +40
Untyped symbols 28,216 28,142 -74
Modules 3091 3091 0

@asukaminato0721
asukaminato0721 marked this pull request as ready for review July 16, 2026 06:06
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 16, 2026
@41tair

41tair commented Jul 27, 2026

Copy link
Copy Markdown
Member

we need cover full user_input_form and session assertions, add zero multiple-tag cases.

@41tair 41tair left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need cover full user_input_form and session assertions, add zero multiple-tag cases.

@asukaminato0721
asukaminato0721 force-pushed the split/sqlite-unit-013-controllers-service-api branch from c1b5909 to ef99f4a Compare August 2, 2026 13:48
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Aug 2, 2026
@asukaminato0721
asukaminato0721 requested a review from 41tair August 3, 2026 03:05
@asukaminato0721
asukaminato0721 added this pull request to the merge queue Aug 3, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 3, 2026
Merged via the queue into langgenius:main with commit 0a05328 Aug 3, 2026
34 checks passed
@asukaminato0721
asukaminato0721 deleted the split/sqlite-unit-013-controllers-service-api branch August 3, 2026 15:59
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 size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants