-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Currently our storage integration tests (plugin/storage/integration/
and cmd/jaeger/internal/integration/
) operate in the existing v1 storage APIs. We want to migrate them to use V2 api from storage_v2/
.
The way these tests operate is each storage backend has its own entry point to the tests and that entry point is responsible for initializing various storage reader/write APIs
jaeger/plugin/storage/integration/integration.go
Lines 43 to 50 in d6456fb
type StorageIntegration struct { | |
SpanWriter spanstore.Writer | |
SpanReader spanstore.Reader | |
ArchiveSpanReader spanstore.Reader | |
ArchiveSpanWriter spanstore.Writer | |
DependencyWriter dependencystore.Writer | |
DependencyReader dependencystore.Reader | |
SamplingStore samplingstore.Store |
We can begin upgrading to v2 API by incrementally swapping these fields to have the corresponding v2 interfaces, e.g. replacing SpanReader spanstore.Reader
field with TraceReader tracestore.Reader
and adjusting the test functions using that interface accordingly. The backend entry points then can provide TraceReader from the existing v1 SpanReader by wrapping it in storage_v2/v1adapter
.
Then in the following PRs we can upgrade the remaining interfaces
- SpanReader Upgrade storage integration test to v2 Trace Reader #6388
- SpanWriter Upgrade storage integration test: use
TraceWriter
#6437 - ArchiveSpanReader Upgrade storage integration test: Use V2 Archive ReaderWriter #6489
- ArchiveSpanWriter Upgrade storage integration test: Use V2 Archive ReaderWriter #6489
- DependencyWriter [storage]Upgraded integration tests to use Dependency Writer of storage_v2 #6559
- DependencyReader Upgrade storage integration tests:
DependencyReader
to v2 #6477