Repository navigation
Commit 78b3adc
authored
fix: deferral, refactor, microbatch progress, scenario, diff and clone fixes (#1212)
* fix(build): defer renamed models to their pre-migration relation
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.
* fix(refactor): let sqb mv keep a pending migrate_from on a same-name 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.
* fix(build): keep a line per microbatch when stdout is not a terminal
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.
* test: cover a partial mock read by two real models of a test chain
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.
* fix(scenario): name unmocked model inputs in S504 and list failures at 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.
* fix(diff): show example rows for side-only differences in unkeyed diffs
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.
* test: point the SQL Server waffle shop helper at the real macro path
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.
* feat(clone): report per-phase timings in --debug and the JSON document
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.
* fix(dbt): stream a result row for error-level dbt model results
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.
* fix(build): look up deferred pre-migration relations in the model's own 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.
* fix(diff): bound the unkeyed side-only sample query and close its cursor
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.
* fix(dbt): keep the message of warn and error-level dbt results
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.
* test: expect the clone logger among native logger names1 parent 62e126c commit 78b3adc
75 files changed
Lines changed: 2403 additions & 124 deletions
File tree
- crates
- sqlbuild-analysis/src/planner_scenario
- _helpers
- main
- tests
- sqlbuild-cli/src/diff_report/_helpers
- sqlbuild-core/src
- build_progress
- main
- tests
- dbt_events
- main
- tests
- scenario_command
- main
- tests
- sqlbuild-python/src/bindings/_helpers
- build_command
- build_progress
- clone
- dbt_interop
- planner_entries
- planner_phases
- result_output
- scenario_command
- sqlbuild-refactor/src/refactoring
- _helpers/planning
- main
- tests
- src/sqlbuild
- .agents/skills/sqlbuild/references/docs
- cli
- concepts
- adapters/sqlserver/classes
- adapter/contract/classes
- executor
- build
- classes
- diff/_helpers
- run
- _helpers/materializations
- tests
- e2e/src/sqlbuild/cli/commands/main
- build
- clone
- diff
- refactor
- scenario
- sqlserver
- test
- integration/src/sqlbuild
- adapters/sqlite
- compiler/planner/main
- unit
- scripts/native_module_paths/_helpers
- website/src/content/docs/docs
- cli
- concepts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
147 | | - | |
| 149 | + | |
| 150 | + | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | | - | |
51 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
52 | 64 | | |
53 | 65 | | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
57 | 97 | | |
58 | 98 | | |
59 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
79 | 129 | | |
80 | 130 | | |
81 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
104 | 119 | | |
105 | | - | |
106 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
107 | 128 | | |
108 | 129 | | |
109 | 130 | | |
| |||
116 | 137 | | |
117 | 138 | | |
118 | 139 | | |
119 | | - | |
| 140 | + | |
| 141 | + | |
120 | 142 | | |
121 | 143 | | |
122 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments