Repository navigation
fix: deferral, refactor, microbatch progress, scenario, diff and clone fixes - #1212
Merged
Merged
Conversation
kvlonge
enabled auto-merge (squash)
October 22, 2026 03:36
kvlonge
force-pushed
the
fix/bug-batch-2
branch
from
October 22, 2026 04:06
713490c to
8cfb643
Compare
When --defer-to resolves an unselected model that the deferred target has not built under its current name, and the model declares migrate_from, read the migrate_from relation there instead and say so in the plan.
…move A move that keeps the model's name and relation carries its undeployed migrate_from with the file. Renames, and moves that change the relation, are still refused until the earlier migration is deployed.
Captured and debug output now gets one permanent line per completed batch with its position, cursor window, rows and elapsed time; terminals keep the live spinner. Verbose query diagnostics are capped per resource instead of per run, so one model's statements no longer hide another's.
Each missing column is padded once whichever real models read the mock and however they spell it. The duplicate padding was fixed when required fixture columns started being keyed by casefolded name; this pins the reported shape.
…t the end When a scenario mocks some of a model's inputs but leaves others that read sources real, S504 names that model and its unmocked inputs with the CTEs to add, and counts the sources instead of listing one line each. sqb scenario test now ends with the failed scenarios and their first error line.
Unkeyed diffs now sample the complete rows one side holds more often than the other, bounded by --max-row-only-examples, in the text output and as examples.from_only_rows and to_only_rows in --json. Key example lists stay empty, so truncated_by_count reflects the rows actually collected.
The helper rewrote macros/time.py, which the fixture no longer has, so it failed before reaching the warehouse. Use models/marts/_macros/time.py and fail loudly when any fixture rewrite no longer matches.
Clone logs the duration of each target compile, source inspection, planning and execution under --debug, and the --json-output document reports them in seconds under phase_timings.
An error-level LogModelResult carries a message, so it was buffered as a node message instead of reporting the node's result. Result events now take precedence, and the row streams as soon as dbt reports it.
…wn schema A bare migrate_from name now resolves in the model's deferred database and schema, and the current-name check lists that schema instead of matching a same-named relation in any deferred schema. Origins are looked up only for unselected upstreams, after selection, and a schema that cannot be listed keeps the previous deferral with a plan warning instead of failing planning.
The sample query now ends in LIMIT (TOP on SQL Server), so client-side cursors no longer download every differing row, and the cursor is closed after the fetch.
A warn or error-level dbt result event now carries its own message on the streamed row, so test, seed and batch rows keep lines such as FAIL 3.
kvlonge
force-pushed
the
fix/bug-batch-2
branch
from
October 22, 2026 04:55
8cfb643 to
e9bb5bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A batch of user-facing bugs: deferral picked the wrong origin relation for models with
migrate_from,sqb mvrefused harmless same-name moves, non-TTY microbatch builds printed no per-batch progress, S504 did not name the model that caused it, unkeyed diffs showed no example rows,sqb clonehad no phase timings, and dbt builds dropped the live row for error-level model results.Changes
sqb mvallows a same-name move with a pendingmigrate_fromunless the move changes the relation.sqb scenario testends with a failures list.from_only_rows/to_only_rowsin JSON).sqb clonelogs per-phase timings under--debugand addsphase_timingsto its JSON document.Residual:
sqb compile --defer-to(static path) still renders the current name of a renamed upstream, whilesqb buildreads the pre-migration relation.Verification
uv sync --all-extrasandmake check-cipass.