Commit 9af42e1
committed
refactor(storage): fold ChangeStore into storage, drop dead store
## Summary
### Why?
Two "change"-related stores were in the wrong shape. `ChangeStore` — the
real, used store that records per-URI claims for in-flight requests and
backs `start`'s URI claiming and `validate`'s overlap detection — lived
as its own top-level extension and was injected into controllers as a
separate dependency, bypassing the `storage.Storage` aggregator that owns
every other entity store. Meanwhile `ChangeProviderStore` (exposed via
`Storage.GetChangeProviderStore()`, with a mysql impl, mock, and schema)
was dead code: no controller ever called it, and its `entity.ChangeProvider`
was orphaned alongside it.
### What?
- Move `ChangeStore` into `package storage`: the interface, mysql impl,
and `change.sql` schema now live under `extension/storage[/mysql]`, and
`ChangeStore` is a first-class member of the `Storage` aggregator via
`GetChangeStore()` — matching every other store.
- `start` and `validate` controllers drop their separate `changeStore`
constructor param and read `store.GetChangeStore()`; the example
orchestrator no longer constructs/injects it separately.
- Delete the dead `ChangeProviderStore` (interface, mysql, mock, schema),
`GetChangeProviderStore()`, and the orphaned `entity/change_provider.go`.
- Fold the standalone changestore integration suite into the shared
`StorageContractSuite` (driven through `GetChangeStore()`); e2e drops the
now-redundant changestore schema apply.
## Test Plan
- ✅ `make build`, `make test` (start/validate controllers pass against the
storage-package mock)
- ✅ `make lint`, `make check-gazelle`, `make check-mocks`, `make check-tidy`
(no drift; `go.mod` / `MODULE.bazel` unchanged)
- ✅ `make integration-test` (storage mysql suite now exercises the change
store via `GetChangeStore()`)
- ✅ `make e2e-test` (full land→validate flow: URI claim + overlap detection,
`change` table applied from the storage schema dir)1 parent f17c76f commit 9af42e1
37 files changed
Lines changed: 191 additions & 633 deletions
File tree
- example/submitqueue/orchestrator/server
- submitqueue
- entity
- extension
- changestore
- mock
- mysql
- schema
- storage
- mock
- mysql
- schema
- orchestrator/controller
- start
- validate
- test
- e2e/submitqueue
- integration/submitqueue/extension
- changestore/mysql
- storage
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
| |||
164 | 162 | | |
165 | 163 | | |
166 | 164 | | |
167 | | - | |
168 | | - | |
169 | 165 | | |
170 | 166 | | |
171 | 167 | | |
| |||
234 | 230 | | |
235 | 231 | | |
236 | 232 | | |
237 | | - | |
| 233 | + | |
238 | 234 | | |
239 | 235 | | |
240 | 236 | | |
| |||
460 | 456 | | |
461 | 457 | | |
462 | 458 | | |
463 | | - | |
| 459 | + | |
464 | 460 | | |
465 | 461 | | |
466 | 462 | | |
467 | 463 | | |
468 | | - | |
469 | 464 | | |
470 | 465 | | |
471 | 466 | | |
| |||
490 | 485 | | |
491 | 486 | | |
492 | 487 | | |
493 | | - | |
494 | 488 | | |
495 | 489 | | |
496 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Lines changed: 0 additions & 5 deletions
This file was deleted.
0 commit comments