Skip to content

planning: a CDC baseline leg admitted because its source could not be read warns that the text-declaration check did not run - #1245

Open
panchenkoai wants to merge 1 commit into
mainfrom
warn-text-declaration-unchecked
Open

panchenkoai wants to merge 1 commit into
mainfrom
warn-text-declaration-unchecked

Conversation

@panchenkoai

Copy link
Copy Markdown
Collaborator

Why

refuse_text_the_stream_renders_otherwise (src/pipeline/planning.rs) refuses a pending CDC baseline leg that declares text over a PostgreSQL date, time, timestamp or array column (see #1233). When its own connect or describe failed it admitted the leg with no word, so the check could be skipped unseen. This closes the Limit paragraph of #1233 (owner decision, option 2: admit, but say so).

What

  • The guard still admits the leg and changes no exit code. It now logs one WARN naming the export, the failed step (connect or describe), the credential-masked cause (redact_error), and that the text-declaration check did not run.
  • The guard reads on the probe that plan_batch_export already holds; it connects itself (connect_source) only when the caller holds none. The extra connection is gone wherever a probe exists.
  • Tests (lib, assert! based, WARN read through the repo's install_warn_capture seam):
    • an unreachable source: admitted, exactly one WARN with the step and the message, no password text;
    • a failed describe: same;
    • a held probe answers the check (refusal on it, WARN on its failure) and a connect that would panic is never called;
    • neighbours unchanged and silent: no snapshot parent, no declaration, non-PostgreSQL source, a clean read of another column.
  • changelog.d/cdc-baseline-text-check-unchecked-warns.md, docs/fail-loud-matrix.yaml (new row, PostgreSQL test cell, other engines na with reasons), docs/type-mapping.md one clause.

Evidence

Check Result
RED (mutant: WARN body emptied, which is main's silent admit) 3 failed: unreachable-source, failed-describe, held-probe tests
RED (mutant: held probe ignored, always connect) 1 failed: held-probe test
GREEN cargo test --lib pipeline::planning: 10 passed, 0 failed
Offline suite (pr-ready --fast) unit 5394 passed; integration 1371 passed
Clippy, default and --no-default-features --features jemalloc, -D warnings clean
cargo mutants --in-diff 3 mutants tested: 2 caught, 1 unviable, 0 missed

Not verified: Snowflake NOT VERIFIED (quota error 090073, untouched; not applicable to a log line). No live cell: the change is a log line on a path whose behaviour is otherwise unchanged. Typos, lychee, agnix and gitleaks NOT RUN locally (pinned tools not installed); CI grades them.

Invariants

  • I1: not applicable; no type mapping or value delivery changes.
  • I2: not applicable; no write path changes.
  • I3: touched; the check is a config/catalog decision of plan, check and doctor and stays in plan_batch_export, the seam run, check and doctor share; its failure to run is now visible.
  • I4: not applicable; no state or checkpoint is read or written.
  • I5: not applicable; no staging or destination change.

Existing users: nothing written before the upgrade changes; a source that was unreachable gets one new WARN and the same exit code.

… read warns that the text-declaration check did not run

The guard that refuses a baseline leg declaring text over a PostgreSQL
date, time, timestamp or array column admitted the leg silently when its
own connect or describe failed. It now admits it with a WARN naming the
export, the failed step, the credential-masked cause and that the check
did not run; exit codes are unchanged. The check reads on the probe
plan_batch_export already holds and opens its own connection only when
the caller holds none.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant