Skip to content

Conversation

Manik2708
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • The responsibility of converting the v1 factory to v2 factory is now given to storage backend for cassandra

How was this change tested?

  • Unit Tests

Checklist

@Manik2708 Manik2708 requested a review from a team as a code owner June 17, 2025 19:07
@Manik2708 Manik2708 requested a review from mahadzaryab1 June 17, 2025 19:07
@Manik2708
Copy link
Contributor Author

Manik2708 commented Jun 17, 2025

@yurishkuro As far I can understand this is the meaning of removing conversions. I maybe wrong but after doing this for other backends we can refactoring E2E tests. I aim to remove this type of conversion:

s.TraceReader = v1adapter.NewTraceReader(spanReader)

Am I right? If this seems right, I will start refactoring for cassandra in this PR

@yurishkuro
Copy link
Member

sorry I don't follow the purpose of this, please elaborate.

@Manik2708
Copy link
Contributor Author

sorry I don't follow the purpose of this, please elaborate.

@yurishkuro So the second check point of the issue says this Remove unnecessary downgrades done in the tests themselves, leave the downgrades to the storage implementations (when they don't yet support v2 API). As far I could understand is we need to get rid of the downgrades which we are doing in the integration tests. We have to give the responsibility of downgrading to the storage backend (for those for which v2 API is not yet implemented). Am I understanding right? This PR tries to do this!

@Manik2708
Copy link
Contributor Author

@yurishkuro I have a doubt, if we will refactor the integration tests to use the v2 factory directly, will it be ok if we will not be testing the flags in e2e tests as v2 factory is directly initialized by config not by flags!

@yurishkuro
Copy link
Member

if we will refactor the integration tests to use the v2 factory directly, will it be ok if we will not be testing the flags in e2e tests as v2 factory is directly initialized by config not by flags!

the flags have their own unit tests, the e2e tests use flags not because we need to test them but because there was no other way to initialize v1 factories. Since we can use the configs now we can just populate the config struct instead of flags.

@Manik2708 Manik2708 marked this pull request as draft June 25, 2025 10:04
Copy link

codecov bot commented Jun 25, 2025

Codecov Report

Attention: Patch coverage is 95.52239% with 3 lines in your changes missing coverage. Please review.

Project coverage is 96.17%. Comparing base (cc7ea8d) to head (b82010c).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
internal/storage/v2/cassandra/factory.go 94.33% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7228      +/-   ##
==========================================
- Coverage   96.20%   96.17%   -0.04%     
==========================================
  Files         370      372       +2     
  Lines       22216    22259      +43     
==========================================
+ Hits        21374    21407      +33     
- Misses        630      638       +8     
- Partials      212      214       +2     
Flag Coverage Δ
badger_v1 9.81% <0.00%> (-0.05%) ⬇️
badger_v2 1.82% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 12.97% <51.51%> (-1.85%) ⬇️
cassandra-4.x-v2-auto 1.81% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.81% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 12.97% <51.51%> (-1.85%) ⬇️
cassandra-5.x-v2-auto 1.81% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.81% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 20.69% <0.00%> (-0.09%) ⬇️
elasticsearch-7.x-v1 20.74% <0.00%> (-0.09%) ⬇️
elasticsearch-8.x-v1 20.92% <0.00%> (-0.09%) ⬇️
elasticsearch-8.x-v2 1.82% <0.00%> (-0.01%) ⬇️
grpc_v1 11.34% <0.00%> (-0.05%) ⬇️
grpc_v2 1.82% <0.00%> (-0.01%) ⬇️
kafka-3.x-v1 10.16% <0.00%> (-0.05%) ⬇️
kafka-3.x-v2 1.82% <0.00%> (-0.01%) ⬇️
memory_v2 1.82% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 20.79% <0.00%> (-0.09%) ⬇️
opensearch-2.x-v1 20.79% <0.00%> (-0.09%) ⬇️
opensearch-2.x-v2 1.82% <0.00%> (-0.01%) ⬇️
query 1.82% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.50% <0.00%> (-0.01%) ⬇️
unittests 95.02% <91.04%> (-0.04%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Manik2708 Manik2708 requested a review from yurishkuro June 27, 2025 20:51
@Manik2708 Manik2708 marked this pull request as ready for review June 27, 2025 20:52
@dosubot dosubot bot added the area/storage label Jun 27, 2025
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside from one question - LGTM

@yurishkuro yurishkuro added the changelog:exprimental Change to an experimental part of the code label Jun 28, 2025
Signed-off-by: Manik2708 <mehtamanik96@gmail.com>
@Manik2708 Manik2708 force-pushed the cassandra-factory branch from 727ec26 to b82010c Compare June 29, 2025 09:50
@Manik2708 Manik2708 requested a review from yurishkuro June 29, 2025 09:50
@yurishkuro yurishkuro added this pull request to the merge queue Jul 1, 2025
Merged via the queue into jaegertracing:main with commit c650aa0 Jul 1, 2025
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage changelog:exprimental Change to an experimental part of the code storage/cassandra v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants