tdfs4ds.migration.sanity¶
tdfs4ds.migration.sanity
¶
Sanity check of the processes a migration promotes (0.3.6.13).
plan_migration runs the workflow assessment on the SOURCE store, scoped to the
closure, before it inventories anything, and keeps the result in plan['sanity']:
the report opens with it. A process used from outside the package (a loop around
run, values closed by hand) does not reproduce its data from its registered
form, and promoting it carries that to production.
The assessment reads the store named by tdfs4ds.SCHEMA / view_schema()
(catalogs, follow-up, lineage, SQL versions, storage layout), so it runs inside
:func:source_store, which points those names, and the read-only set, at the
source and puts them back in a finally. No LLM, nothing is written; a finding
never blocks migrate_objects (approvals stay about conflicts).
logger_safe
¶
Wrapper around the global logger that only emits logs when
tdfs4ds.DISPLAY_LOGS is True. level is a string like "info", "error", etc.
source_store
¶
Point SCHEMA / SCHEMA_VIEW at the source store and empty the read-only
set (a union with the target would give the closure's processes to both),
restored in a finally. Everything the assessment reads goes through these
names; the per-store caches of optional tables (available() of the process
options, the manager registry...) are keyed by what they read, not by the store,
so a store without an optional table reads as it would on its own.
check_names
¶
The assessment checks mode stands for, read when called so a check added
to workflow_assessment later is picked up by itself. cheap keeps
closed_entities: its reads are EXPLAIN-gated, and without it a custom step closing
periods around roll_out shows nothing (its runs look like a roll_out).
run_sanity
¶
The plan['sanity'] block. Never raises: a failed run is stated in error.
assess is the assessment function (default tdfs4ds.assess_workflow).