Repository navigation
Commit 1ccf4d9
authored
feat(build)!: rename maintained models to dynamic and close their hold gaps (#1594)
* fix(build): close the maintained-model hold gaps and two rebuild residuals
- A model created during a build now runs the same earliest-hold check as
acquire once its pause is recorded, so two builds creating the same model
no longer both hold it. Our create made the model active, so it is
suspended either way; the build holding it resumes it at its end, and a
build that backed out resumes it itself at its end when no other build
holds it, so a model never stays suspended after both back out.
- When the losing build cannot close its own pause, the A718 error now names
that failure too instead of being replaced by it.
- Pauses are ordered by the warehouse clock when each insert starts, but an
insert commits later. A build now also backs out for a rival that paused
within the time its own insert took, since that rival may have read the
table before our pause committed, and when a takeover closed its pause
before it read the table back. Two builds that start at the same moment
can both stop with A718; neither builds alongside the other.
- A snapshot's first build and full rebuild turn change tracking on when a
maintained model reads it, as table builds already do (new optional
render_track_changes adapter method; Snowflake runs ALTER TABLE ... SET
CHANGE_TRACKING = TRUE).
- The planner's change check drops refresh_mode when it is the default, on
both the recorded and the current side, so writing out or removing the
default no longer recreates the model. Stored-status hashes are unchanged.
* feat(build)!: rename maintained models to dynamic models
The model kind is now called dynamic everywhere: `materialized dynamic`, the
`[dynamic]` project section (still `heartbeat_grace` and
`allow_ignore_grace`), the `pause_dynamic` target setting, the
`--ignore-dynamic-grace` build flag, the `_sqlbuild_dynamic_pauses` state
table, plan actions and wording, error text, the Dynamic models docs page
and the tests. Error codes are unchanged.
BREAKING CHANGE: `materialized maintained`, `[maintained]`,
`pause_maintained` and `--ignore-maintained-grace` are no longer accepted;
use `materialized dynamic`, `[dynamic]`, `pause_dynamic` and
`--ignore-dynamic-grace`. The materialization is part of a model's version
identity, so each existing model is recreated once, with a full recompute,
by its first build after the rename. Builds record pauses in
`_sqlbuild_dynamic_pauses` and no longer read `_sqlbuild_maintained_pauses`:
let builds on the previous version finish before upgrading, resume by hand
any model a killed older build left suspended, then drop the old table.1 parent 8fbfce8 commit 1ccf4d9
163 files changed
Lines changed: 1712 additions & 1119 deletions
File tree
- crates
- sqlbuild-analysis/src
- assembly
- dynamic_checks
- main
- tests
- maintained_checks
- main
- tests
- dynamic_refresh
- _helpers
- main
- tests
- maintained_refresh
- main
- planner_changes/main
- planner_strategy
- main
- tests
- sqlbuild-cli/src
- argv
- dispatch
- sqlbuild-config/src
- effective
- project
- _helpers
- main
- tests
- sqlbuild-core/src
- cli_text
- _helpers
- tests
- fingerprint_identity
- main
- tests
- sqlbuild-model-config/src/model_validation
- _helpers
- main
- tests
- sqlbuild-orchestration/tests/api
- sqlbuild-python-base/src/records
- _helpers
- compiler_enums
- contract_records
- planner_records
- sqlbuild-python-compile/src/compile_driver/_helpers/setup
- sqlbuild-python-front/src/discovery/main/project
- sqlbuild-python-planner/src
- live_reads
- plan_output/_helpers
- planner_entries/_helpers/plans
- planner_phases
- _helpers/outputs
- main/outputs
- planner_strategy/_helpers
- planner_warehouse
- sqlbuild-python/src/bindings/_helpers
- build_command
- exported_constants
- src/sqlbuild
- .agents/skills/sqlbuild/references/docs
- cli
- concepts
- adapters
- models
- adapters/snowflake/classes
- adapter/contract
- classes
- executor
- build
- _helpers
- classes
- main
- dynamic_pauses
- _helpers
- classes
- main
- maintained_pauses
- _helpers
- classes
- main
- run
- _helpers
- execution
- materializations
- main
- tests
- e2e/src/sqlbuild/cli/commands/main/compile
- goldens/compiler/failure
- integration/src/sqlbuild
- compiler/planner/main
- executor
- dynamic_pauses
- maintained_pauses
- run
- dynamic
- maintained
- unit/src/sqlbuild
- adapters/snowflake
- adapter/contract/classes/strict_adapter
- compiler/planner/_helpers/changes
- ui/src/lib
- api/types
- run
- website/src
- content/docs/docs
- cli
- concepts
- adapters
- models
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 | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | | - | |
4 | | - | |
5 | 5 | | |
6 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
This file was deleted.
0 commit comments