Skip to content

Conversation

mahadzaryab1
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 commented Apr 14, 2025

Which problem is this PR solving?

Description of the changes

  • Changes the remote storage server to accept v2 factories instead of v1

How was this change tested?

  • CI and unit tests

Checklist

Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Copy link

codecov bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.99%. Comparing base (fb4bbf7) to head (82e597b).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7024      +/-   ##
==========================================
- Coverage   96.00%   95.99%   -0.01%     
==========================================
  Files         347      349       +2     
  Lines       20626    20666      +40     
==========================================
+ Hits        19801    19838      +37     
- Misses        622      624       +2     
- Partials      203      204       +1     
Flag Coverage Δ
badger_v1 10.47% <0.00%> (-0.02%) ⬇️
badger_v2 2.17% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 15.75% <22.22%> (-0.02%) ⬇️
cassandra-4.x-v2-auto 2.16% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 2.16% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 15.75% <22.22%> (-0.02%) ⬇️
cassandra-5.x-v2-auto 2.16% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 2.16% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 20.85% <22.22%> (-0.03%) ⬇️
elasticsearch-7.x-v1 20.93% <22.22%> (-0.03%) ⬇️
elasticsearch-8.x-v1 21.11% <22.22%> (-0.03%) ⬇️
elasticsearch-8.x-v2 2.17% <0.00%> (-0.01%) ⬇️
grpc_v1 11.91% <44.44%> (+0.34%) ⬆️
grpc_v2 8.87% <44.44%> (+0.43%) ⬆️
kafka-3.x-v1 10.76% <0.00%> (-0.02%) ⬇️
kafka-3.x-v2 2.17% <0.00%> (-0.01%) ⬇️
memory_v2 2.17% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 20.99% <22.22%> (-0.03%) ⬇️
opensearch-2.x-v1 20.99% <22.22%> (-0.03%) ⬇️
opensearch-2.x-v2 2.17% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.59% <0.00%> (-0.01%) ⬇️
unittests 94.80% <100.00%> (-0.01%) ⬇️

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.

Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
@mahadzaryab1 mahadzaryab1 added the changelog:refactoring Internal code refactoring without functional changes label Apr 15, 2025
@mahadzaryab1 mahadzaryab1 force-pushed the upgrade-remote-storage branch from b1d9abd to e2afab9 Compare April 15, 2025 01:42
@mahadzaryab1 mahadzaryab1 changed the title [WIP][refactor] Change remote storage server to accept v2 factories [refactor] Change remote storage server to accept v2 factories Apr 15, 2025
server, err := app.NewServer(opts, storageFactory, tm, telset)

traceFactory := v1adapter.NewFactory(storageFactory)
depFactory := traceFactory.(depstore.Factory)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@yurishkuro should we do a runtime cast or do we want to create a new constructor instead?

Copy link
Member

Choose a reason for hiding this comment

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

hm, the bigger issue here is that if we want remote-storage to be fully v2 compatible there is not way to configure that, since you have to go through v1 CLI flags. We may need to make a breaking change and switch to yaml config similar to jaeger-v2

Copy link
Member

Choose a reason for hiding this comment

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

One thing we perhaps could do is have a subcommand migrate which will support all the existing v1 flags (but won't enable them by default on the main command) and will use those flags to populate the config structs and write them out as YAML. But I am not sure this binary is actually used by anyone, so I would start with a breaking change and if people complain we could go this way with migrate subcommand.

@mahadzaryab1 mahadzaryab1 marked this pull request as ready for review April 15, 2025 01:44
@mahadzaryab1 mahadzaryab1 requested a review from a team as a code owner April 15, 2025 01:44
@mahadzaryab1 mahadzaryab1 requested a review from albertteoh April 15, 2025 01:44
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
@@ -365,6 +377,7 @@ func TestServerGRPCTLS(t *testing.T) {
server, err := NewServer(
serverOptions,
f,
f,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

a little awkward to have to pass the same factory in twice - should I break it out into two fake factories?

Copy link
Member

Choose a reason for hiding this comment

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

it's fine, for the test

@mahadzaryab1 mahadzaryab1 added this pull request to the merge queue Apr 15, 2025
Merged via the queue into jaegertracing:main with commit 0967b78 Apr 15, 2025
56 checks passed
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
…rtracing#7024)

<!--
!! Please DELETE this comment before posting.
We appreciate your contribution to the Jaeger project! 👋🎉
-->

## Which problem is this PR solving?
- Towards jaegertracing#6979

## Description of the changes
- Changes the remote storage server to accept v2 factories instead of v1

## How was this change tested?
- CI and 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 <mahadzaryab1@gmail.com>
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
…rtracing#7024)

<!--
!! Please DELETE this comment before posting.
We appreciate your contribution to the Jaeger project! 👋🎉
-->

## Which problem is this PR solving?
- Towards jaegertracing#6979

## Description of the changes
- Changes the remote storage server to accept v2 factories instead of v1

## How was this change tested?
- CI and 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 <mahadzaryab1@gmail.com>
Signed-off-by: amol-verma-allen <amol.verma@allen.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage changelog:refactoring Internal code refactoring without functional changes v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants