Add governed Dataflow search source

This commit is contained in:
2026-07-29 20:37:08 +02:00
parent fa013ea24b
commit 5f3303fb21
4 changed files with 435 additions and 2 deletions
+22
View File
@@ -35,6 +35,7 @@ from govoplan_core.core.datasources import (
from govoplan_core.core.policy import (
CAPABILITY_POLICY_DEFINITION_GOVERNANCE,
)
from govoplan_core.core.search import SearchSourceProviderRegistration
from govoplan_core.core.views import ViewSurface
from govoplan_core.db.base import Base
from govoplan_dataflow.backend.db import models as dataflow_models
@@ -196,6 +197,14 @@ def _trigger_provider(context: ModuleContext):
return SqlDataflowTriggerDispatcher(registry=context.registry)
def _search_source_provider(context: ModuleContext):
from govoplan_dataflow.backend.search_source import (
create_dataflow_search_source,
)
return create_dataflow_search_source(context)
def _tenant_summary(session, tenant_id: str) -> dict[str, int]:
return {
"dataflow_pipelines": (
@@ -241,6 +250,7 @@ manifest = ModuleManifest(
"policy",
"reporting",
"risk_compliance",
"search",
"workflow",
),
optional_capabilities=(
@@ -292,6 +302,12 @@ manifest = ModuleManifest(
version_max_exclusive="1.0.0",
optional=True,
),
ModuleInterfaceRequirement(
name="search.source",
version_min="1.0.0",
version_max_exclusive="2.0.0",
optional=True,
),
),
permissions=PERMISSIONS,
role_templates=ROLE_TEMPLATES,
@@ -339,6 +355,12 @@ manifest = ModuleManifest(
CAPABILITY_DATAFLOW_RUN_LIFECYCLE: _run_provider,
CAPABILITY_DATAFLOW_TRIGGER_DISPATCHER: _trigger_provider,
},
search_sources=(
SearchSourceProviderRegistration(
id="dataflow.pipelines",
factory=_search_source_provider,
),
),
tenant_summary_providers=(_tenant_summary,),
migration_spec=MigrationSpec(
module_id=MODULE_ID,