Repository navigation
Commit 8816dfa
authored
refactor(api): keep plan diffs in one place and drop unwatched node-state views (#1588)
* refactor(plan): keep every model diff beside the plan document
A location always detaches model diff text and the server reads a diff only
from where it stored it, so the inline lookup and the copied diff type go.
* refactor(api): drop unwatched node-state views and tag the node list by snapshot
The node states cache kept refreshing every target anyone had read for
the life of the server. A change stream now holds its target watched
while it is open; a store signal refreshes watched targets and drops the
others, which the next read loads again.
The node list no longer embeds states, which node-states serves, so it
is serialized once per snapshot and its ETag is the snapshot ID: a build
no longer invalidates it.
* refactor(runs): make the publication cache concrete
SnapshotSlots and cached only ever held prepared publications, so they
name CachedPublication instead of a type parameter.
* fix(ui): read node states beside the stateless node list
The node list no longer carries states, so the catalog keeps the states
it holds while the list and states are read again, and a node page or
overview opened without the held list reads the states with it. The
server keeps a dropped target's entry while a refresh is still pending,
so the refresh cannot push the old entry's versions to a new stream.
* fix(api): keep a node-states entry with a refresh due, and refuse a partial overview once
A refresh that finds its target changed again runs another pass, so the
entry stays held while one is due as well as while one is scheduled. A
read without the held node list asks for the states only once the list
is allowed, so a partial viewer's refusal is recorded once.
* test(api): read node states beside the node list in catalog and check tests
The node list no longer carries states, so the catalog-read and
check-count tests read them from node-states as clients do. The
wide-listing statement guard still counts the node list alone, within
its unchanged budget.1 parent 069c955 commit 8816dfa
36 files changed
Lines changed: 419 additions & 265 deletions
File tree
- clients/typescript/src
- crates
- sqlbuild-cli/src/native_commands
- _helpers/location
- tests
- sqlbuild-core/src/plan_display
- main
- tests
- sqlbuild-orchestration
- src
- api
- _helpers/resources
- node_states
- _helpers
- main
- platform
- main/person_reads
- runs
- _helpers/lifecycle
- warehouse_metadata
- tests
- api
- node_status
- runs
- ui/src/lib
- api
- state
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1650 | 1650 | | |
1651 | 1651 | | |
1652 | 1652 | | |
1653 | | - | |
| 1653 | + | |
1654 | 1654 | | |
1655 | 1655 | | |
1656 | 1656 | | |
| |||
2275 | 2275 | | |
2276 | 2276 | | |
2277 | 2277 | | |
2278 | | - | |
| 2278 | + | |
2279 | 2279 | | |
2280 | 2280 | | |
2281 | 2281 | | |
| |||
2739 | 2739 | | |
2740 | 2740 | | |
2741 | 2741 | | |
2742 | | - | |
| 2742 | + | |
2743 | 2743 | | |
2744 | 2744 | | |
2745 | 2745 | | |
| |||
5643 | 5643 | | |
5644 | 5644 | | |
5645 | 5645 | | |
5646 | | - | |
| 5646 | + | |
5647 | 5647 | | |
5648 | 5648 | | |
5649 | 5649 | | |
| |||
5654 | 5654 | | |
5655 | 5655 | | |
5656 | 5656 | | |
5657 | | - | |
| 5657 | + | |
5658 | 5658 | | |
5659 | 5659 | | |
5660 | | - | |
| 5660 | + | |
5661 | 5661 | | |
5662 | 5662 | | |
5663 | 5663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 23 | | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
46 | 34 | | |
47 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | | - | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
591 | 590 | | |
592 | 591 | | |
593 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
594 | 601 | | |
595 | 602 | | |
596 | 603 | | |
597 | 604 | | |
598 | 605 | | |
599 | | - | |
600 | | - | |
601 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
602 | 609 | | |
603 | 610 | | |
604 | 611 | | |
605 | | - | |
| 612 | + | |
606 | 613 | | |
607 | | - | |
| 614 | + | |
608 | 615 | | |
609 | 616 | | |
610 | 617 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
0 commit comments