Commit 22be781
authored
Persist endpoint UUID for vector_search_endpoints drift detection (#5127)
## Changes
Persist `endpoint_uuid` in state and detect identity drift on
`vector_search_endpoints`.
The endpoint name is stable but its UUID changes if the endpoint is
deleted and recreated by name (e.g. via the workspace UI). Without
persisting the UUID:
- The bundle silently rebound permissions to a different backing
endpoint without recreating the endpoint resource.
- Anything else referencing `endpoint_uuid` (most importantly the
permissions object_id, but also indexes added on top in the next PR)
raced the recreate.
`VectorSearchEndpointState` now embeds `vectorsearch.CreateEndpoint` and
adds `EndpointUuid`. `DoCreate` records the UUID from the create
response; `DoUpdate` copies it from `entry.RemoteState` so unrelated
updates (e.g. `min_qps`) don't blank it out. `OverrideChangeDesc`
classifies `endpoint_uuid` drift as `Recreate` when saved differs from
remote, `Skip` otherwise.
`drift/recreated_same_name` flips from a "badness snapshot" (which
captured the old behavior of permissions silently rebinding) to the
recreate behavior, with a permissions block on the endpoint to verify
the cascade rebinds correctly.
`drift/min_qps/out.plan.direct.json` regenerates to include the new
`endpoint_uuid` skip entry in the detailed plan.
## Why
Splitting this out of the larger `vector_search_indexes` PR
([#5123](#5123)) so it can land
independently. The index PR builds on the persisted UUID for orphan
detection, but the endpoint UUID work stands on its own and is useful
regardless.
## Tests
- `make fmtfull`, `make checks`, `make lintfull` — clean.
- `make test` — green (`libs/apps/runlocal` needed `NODE_OPTIONS=` for
the harness leak; unrelated). `bundle/internal/schema
TestRequiredAnnotationsForNewFields` panics, which is failing on `main`
for unrelated reasons.
- `go test ./acceptance -run
'TestAccept/bundle/resources/vector_search_endpoints'` — all green,
including the flipped `drift/recreated_same_name`.
_This PR was written by Claude Code._1 parent 3c622e9 commit 22be781
8 files changed
Lines changed: 103 additions & 22 deletions
File tree
- acceptance/bundle
- refschema
- resources/vector_search_endpoints/drift
- min_qps
- recreated_same_name
- bundle/direct/dresources
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3042 | 3042 | | |
3043 | 3043 | | |
3044 | 3044 | | |
3045 | | - | |
| 3045 | + | |
3046 | 3046 | | |
3047 | 3047 | | |
3048 | 3048 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | | - | |
| 38 | + | |
36 | 39 | | |
37 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
47 | | - | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
35 | | - | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
19 | 38 | | |
20 | 39 | | |
21 | 40 | | |
| |||
41 | 60 | | |
42 | 61 | | |
43 | 62 | | |
44 | | - | |
45 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
46 | 68 | | |
47 | 69 | | |
48 | | - | |
| 70 | + | |
49 | 71 | | |
50 | 72 | | |
51 | 73 | | |
52 | 74 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
60 | 85 | | |
61 | 86 | | |
62 | 87 | | |
| |||
68 | 93 | | |
69 | 94 | | |
70 | 95 | | |
71 | | - | |
72 | | - | |
| 96 | + | |
| 97 | + | |
73 | 98 | | |
74 | 99 | | |
75 | 100 | | |
76 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
77 | 105 | | |
78 | 106 | | |
79 | 107 | | |
80 | | - | |
| 108 | + | |
81 | 109 | | |
82 | 110 | | |
83 | 111 | | |
84 | 112 | | |
85 | 113 | | |
86 | 114 | | |
87 | 115 | | |
88 | | - | |
| 116 | + | |
89 | 117 | | |
90 | 118 | | |
91 | 119 | | |
| |||
107 | 135 | | |
108 | 136 | | |
109 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
110 | 144 | | |
111 | 145 | | |
112 | 146 | | |
113 | 147 | | |
114 | 148 | | |
115 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
0 commit comments