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

[refactor] Conditionally implement interfaces in v1adapter #6701

Merged

Conversation

mahadzaryab1
Copy link
Collaborator

Which problem is this PR solving?

Description of the changes

  • This is a prequel to [storage] Change storage extension to hold v2 factories #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

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

codecov bot commented Feb 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.00%. Comparing base (1ac7d6d) to head (cecb6ae).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6701      +/-   ##
==========================================
- Coverage   96.02%   96.00%   -0.02%     
==========================================
  Files         363      363              
  Lines       20568    20592      +24     
==========================================
+ Hits        19750    19769      +19     
- Misses        624      628       +4     
- Partials      194      195       +1     
Flag Coverage Δ
badger_v1 9.88% <38.46%> (+0.05%) ⬆️
badger_v2 1.81% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 14.83% <38.46%> (+0.04%) ⬆️
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.83% <38.46%> (+0.04%) ⬆️
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.16% <38.46%> (+0.03%) ⬆️
elasticsearch-7.x-v1 19.24% <38.46%> (+0.03%) ⬆️
elasticsearch-8.x-v1 19.41% <38.46%> (+0.03%) ⬆️
elasticsearch-8.x-v2 1.81% <0.00%> (-0.01%) ⬇️
grpc_v1 10.85% <38.46%> (+0.05%) ⬆️
grpc_v2 7.78% <0.00%> (-0.02%) ⬇️
kafka-3.x-v1 10.17% <38.46%> (+0.05%) ⬆️
kafka-3.x-v2 1.81% <0.00%> (-0.01%) ⬇️
memory_v2 1.81% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 19.29% <38.46%> (+0.03%) ⬆️
opensearch-2.x-v1 19.29% <38.46%> (+0.03%) ⬆️
opensearch-2.x-v2 1.81% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.48% <0.00%> (-0.01%) ⬇️
unittests 94.88% <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.

Signed-off-by: Mahad Zaryab <[email protected]>
@mahadzaryab1 mahadzaryab1 enabled auto-merge (squash) February 9, 2025 22:43
@mahadzaryab1 mahadzaryab1 merged commit 97188f4 into jaegertracing:main Feb 9, 2025
55 checks passed
@mahadzaryab1 mahadzaryab1 deleted the conditional-interfaces branch February 9, 2025 22:52
mahadzaryab1 added a commit to mahadzaryab1/jaeger that referenced this pull request Feb 11, 2025
mahadzaryab1 added a commit to mahadzaryab1/jaeger that referenced this pull request Feb 11, 2025
mahadzaryab1 added a commit that referenced this pull request Feb 11, 2025
## Description of the changes
- This PR reverts the changes to #6701 since v1 implements the `Purger`
and `SamplingStoreFactory` on `storage.Factory` instead of on
`spanstore.Reader`.

## How was this change tested?
- CI

## 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`
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.

2 participants