Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[storage] Change storage extension to hold v2 factories #6699

Merged
merged 9 commits into from
Feb 12, 2025

Conversation

mahadzaryab1
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 commented Feb 9, 2025

Which problem is this PR solving?

Description of the changes

  • This PR refactors the jaegerstorage extension to hold the new tracestore.Factory instead of the v1 storage.Factory. Currently, all storage implementations are wrapped into the v1adapter. However, this PR unblocks the path for a native v2 storage implementation.

How was this change tested?

  • CI

Checklist

mahadzaryab1 added a commit that referenced this pull request Feb 9, 2025
## Which problem is this PR solving?
- Towards #6697

## Description of the changes
- This is a prequel to
#6699. This PR refactors the
`TraceReader` to conditionally propagate the implementations of
`storage.Purger` and `storage.SamplingStoreFactory`. Without this
change, the implementation of the aforementioned interfaces get lost
when we wrap a v1 `SpanReader`.

## How was this change tested?
- Added unit tests

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Mahad Zaryab <[email protected]>
mahadzaryab1 added a commit that referenced this pull request Feb 12, 2025
…6710)

## Which problem is this PR solving?
- Towards #6697

## Description of the changes
- This is a prequel to
#6699. This PR refactors
`v1adapter.Factory` to conditionally propagate the implementations of
`storage.Purger` and `storage.SamplingStoreFactory`. Without this
change, the implementation of the aforementioned interfaces get lost
when we wrap a v1 `storage.Factory` into the adapter..

## How was this change tested?
- Added unit tests

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Mahad Zaryab <[email protected]>
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.02%. Comparing base (b2119b9) to head (bf233e6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6699      +/-   ##
==========================================
+ Coverage   96.00%   96.02%   +0.02%     
==========================================
  Files         363      363              
  Lines       20591    20595       +4     
==========================================
+ Hits        19768    19777       +9     
+ Misses        629      624       -5     
  Partials      194      194              
Flag Coverage Δ
badger_v1 9.80% <0.00%> (ø)
badger_v2 1.81% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 14.76% <0.00%> (ø)
cassandra-4.x-v2-auto 1.80% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.80% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 14.76% <0.00%> (ø)
cassandra-5.x-v2-auto 1.80% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.80% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 19.08% <0.00%> (ø)
elasticsearch-7.x-v1 19.16% <0.00%> (ø)
elasticsearch-8.x-v1 19.33% <0.00%> (ø)
elasticsearch-8.x-v2 1.81% <0.00%> (-0.01%) ⬇️
grpc_v1 10.77% <0.00%> (ø)
grpc_v2 7.78% <0.00%> (-0.01%) ⬇️
kafka-3.x-v1 10.09% <0.00%> (ø)
kafka-3.x-v2 1.81% <0.00%> (-0.01%) ⬇️
memory_v2 1.81% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 19.21% <0.00%> (ø)
opensearch-2.x-v1 19.21% <0.00%> (ø)
opensearch-2.x-v2 1.81% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.48% <0.00%> (-0.01%) ⬇️
unittests 94.91% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mahadzaryab1 mahadzaryab1 marked this pull request as ready for review February 12, 2025 04:02
@mahadzaryab1 mahadzaryab1 requested a review from a team as a code owner February 12, 2025 04:02
@yurishkuro yurishkuro merged commit 348a687 into jaegertracing:main Feb 12, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change jaegerstorage Extension To Hold v2 Storage Factories
2 participants