fix(preprocess): restrict DWH root claims to writers

This commit is contained in:
2026-07-12 07:00:51 +02:00
parent c4dd6c8900
commit 22e806a41b
6 changed files with 238 additions and 49 deletions
+4 -5
View File
@@ -19,15 +19,14 @@ def run_dwh_from_config(
config: Path, *, steps: tuple[str, ...], resume: str | None = None,
):
from tht.cli.lsh_cmd import build_lsh_artifacts
from tht.cli.schema_cmd import _load_config_or_exit, physical_path, refresh_catalog
from tht.cli.schema_cmd import _load_config_or_exit, refresh_catalog
from tht.jobs.dwh_pipeline import (
DwhPreprocessPipeline, active_generation_dir, config_dwh_binding,
DwhPreprocessPipeline, config_dwh_binding,
)
cfg = _load_config_or_exit(config)
binding = config_dwh_binding(cfg)
workspace_root = cfg.paths.artifacts.parent
active = active_generation_dir(workspace_root)
lsh_names = (
f"{cfg.database.db_schema}_lsh.pkl",
f"{cfg.database.db_schema}_minhashes.pkl",
@@ -43,8 +42,8 @@ def run_dwh_from_config(
cfg, physical_file=physical, output_dir=output
),
lsh_filenames=lsh_names,
current_physical=physical_path(cfg),
current_lsh_dir=active if active is not None else cfg.paths.indexes / "lsh",
current_physical=cfg.paths.artifacts / "mschema" / "physical.yaml",
current_lsh_dir=cfg.paths.indexes / "lsh",
)
return pipeline.run(steps, resume_run_id=resume)