Skip to content

feat: name failed checks in Dagster failures and make Recall runs self-describing - #1256

Merged
kvlonge merged 6 commits into
mainfrom
fix/dagster-recall-batch
Oct 26, 2026
Merged

kvlonge merged 6 commits into
mainfrom
fix/dagster-recall-batch

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Why

A SQLBuild command failing under Dagster did not name the failed audits, the selection flooded the run log and metadata, and failed checks were debug-level events. Recall could not tell a local sqb debug from a failed scheduled run, finding a job's runs meant parsing external_context, and an ambiguous ID prefix gave no help.

Changes

  • Dagster: the failure description starts with up to 10 failed checks and assets (name, model, failing rows), then "and N more"; metadata gains failed_checks and failed_check_count.
  • Dagster, breaking for metadata readers: the failure metadata key selection is replaced by selection_count plus selector_file; sensors that read selection must switch.
  • Dagster: the selection logs as a count at INFO, in full at DEBUG; failed checks log at ERROR (WARNING if warn).
  • Recall: invocations records origin (integration, ci from CI variables, or local) and command_mode for sqb debug. Additive columns, schema version 4, NULL on older rows.
  • Recall: the invocations view exposes integration, integration_job, integration_run_id and integration_retry on SQLite and ClickHouse; older non-JSON context reads as NULL.
  • Recall: output shows 8-character invocation IDs; an ambiguous prefix lists up to ten matches.
  • Rules: a plain @rel.keys group read in a SQL macro body no longer trips SQBRSQL028/029; real findings beside it still report.
  • Docs, skill and sqb recall schema describe all of the above.

Verification

  • SQLite CLI tests for origin, mode, integration columns (with a legacy repr row) and prefixes; a Dagster E2E with a failing not_null audit checks the description, metadata, ERROR log and origin; a DuckDB E2E for macro body rules.
  • ClickHouse E2E cases for schema version 4 and the integration columns (CI).
  • Rust unit tests for the summary, origin, mode, candidates and slot reads.
  • make test (before the rules fix), make check-ci, make check-e2e-shards and the hygiene scan pass.

…on job and run

Invocations record origin (integration, ci or local) and the mode of sqb debug, and the invocations view exposes the integration, job, run and retry from external_context, NULL for older non-JSON rows.
The failure description leads with the failed checks and assets, failure metadata lists the failed checks and counts the selection, and the selection is logged as a count with the full list at debug level.
…as bare columns

A plain read of a COLUMNS group stands as one bare column, as expansion pastes it, and every reference to one RELATION parameter as a relation shares one placeholder, so plain single-slot and undeclared reads through it are in scope. Real mixed-qualification and out-of-scope findings beside them are still reported.
@kvlonge
kvlonge enabled auto-merge (squash) October 26, 2026 03:35
… the previous columns

Derive the expected Recall schema version from RECALL_SCHEMA_VERSION, compare the rewritten ClickHouse views with the previous ones over the columns both have, and check the columns the invocations view adds separately.
@kvlonge
kvlonge merged commit 07fb51a into main Oct 26, 2026
46 checks passed
@kvlonge
kvlonge deleted the fix/dagster-recall-batch branch October 26, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant