Skip to content

doctor

etl_craft.services.doctor

doctor: check a configuration end to end, reporting every problem rather than the first.

Each check says what it looked at and what it found: OK, WARN (it works, but look at this) or FAIL (this will stop runs). The checks cover the settings used as written that look like variables nobody set, each secret, auth modes not verified against a live service here, the Engine DB (its connection, schema, tables and pending migrations), the warehouse (its connection, schema and, on Trino, that its catalog is Iceberg), how email is sent, whether cloning can write where it is set to, and the project folders.

Status

Bases: StrEnum

What a check found.

Check dataclass

One thing doctor looked at, and what it found.

ok

ok(name: str, detail: str) -> Check

Return a passing check.

warn

warn(name: str, detail: str) -> Check

Return a check that passes but deserves a look.

fail

fail(name: str, detail: str) -> Check

Return a failed check.

run_checks

run_checks(config: ConnectorConfig, *, engine_state: bool = True) -> list[Check]

Run every check and return them all, failures included.

engine_state adds the Engine DB's tables and pending migrations; setup, which creates them, leaves it out.