refactor: human input node decouple db (#32900)

This commit is contained in:
wangxiaolei
2026-03-04 13:18:32 +08:00
committed by GitHub
parent b584434e28
commit e14b09d4db
12 changed files with 69 additions and 58 deletions

View File

@ -100,7 +100,7 @@ class TestHumanInputFormRepositoryImplWithContainers:
member_emails=["member1@example.com", "member2@example.com"],
)
repository = HumanInputFormRepositoryImpl(session_factory=engine, tenant_id=tenant.id)
repository = HumanInputFormRepositoryImpl(tenant_id=tenant.id)
params = _build_form_params(
delivery_methods=[_build_email_delivery(whole_workspace=True, recipients=[])],
)
@ -129,7 +129,7 @@ class TestHumanInputFormRepositoryImplWithContainers:
member_emails=["primary@example.com", "secondary@example.com"],
)
repository = HumanInputFormRepositoryImpl(session_factory=engine, tenant_id=tenant.id)
repository = HumanInputFormRepositoryImpl(tenant_id=tenant.id)
params = _build_form_params(
delivery_methods=[
_build_email_delivery(
@ -173,7 +173,7 @@ class TestHumanInputFormRepositoryImplWithContainers:
member_emails=["prefill@example.com"],
)
repository = HumanInputFormRepositoryImpl(session_factory=engine, tenant_id=tenant.id)
repository = HumanInputFormRepositoryImpl(tenant_id=tenant.id)
resolved_values = {"greeting": "Hello!"}
params = FormCreateParams(
app_id=str(uuid4()),
@ -210,7 +210,7 @@ class TestHumanInputFormRepositoryImplWithContainers:
member_emails=["ui@example.com"],
)
repository = HumanInputFormRepositoryImpl(session_factory=engine, tenant_id=tenant.id)
repository = HumanInputFormRepositoryImpl(tenant_id=tenant.id)
params = FormCreateParams(
app_id=str(uuid4()),
workflow_execution_id=str(uuid4()),

View File

@ -96,8 +96,7 @@ def _build_form(db_session_with_containers, tenant, account, *, app_id: str, wor
delivery_methods=[delivery_method],
)
engine = db_session_with_containers.get_bind()
repo = HumanInputFormRepositoryImpl(session_factory=engine, tenant_id=tenant.id)
repo = HumanInputFormRepositoryImpl(tenant_id=tenant.id)
params = FormCreateParams(
app_id=app_id,
workflow_execution_id=workflow_execution_id,