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

[jaeger-v2] Consolidate v1 and v2 Configurations for GRPC Storage #6042

Merged
merged 7 commits into from
Oct 4, 2024

Conversation

mahadzaryab1
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 commented Oct 4, 2024

Which problem is this PR solving?

Description of the changes

  • We were currently maintaining two entirely separate configurations for v1 and v2 for the GRPC Storage Component and were initializing v1 configurations and then translating them to the v2 configurations which were the ones actually being used. This caused an issue where one configuration field was left out of the translation method (see [grpc storage]: Propagate tenant to grpc backend #6030 for more details).
  • In this PR, we consolidate the v1 and v2 configurations into a single config type that is directly initialized to avoid having configurations that diverge or running into issues like the one described above.

How was this change tested?

  • Unit tests were updated
  • Integration tests were not touched but should still pass since this was just an internal change and the interface was not touched

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>
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 Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.90%. Comparing base (d6631f5) to head (79311ef).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6042      +/-   ##
==========================================
- Coverage   96.92%   96.90%   -0.02%     
==========================================
  Files         349      349              
  Lines       16600    16587      -13     
==========================================
- Hits        16089    16074      -15     
- Misses        328      329       +1     
- Partials      183      184       +1     
Flag Coverage Δ
badger_v1 8.00% <0.00%> (+0.01%) ⬆️
badger_v2 1.82% <0.00%> (+<0.01%) ⬆️
cassandra-4.x-v1 15.77% <0.00%> (+0.02%) ⬆️
cassandra-4.x-v2 1.74% <0.00%> (+<0.01%) ⬆️
cassandra-5.x-v1 15.77% <0.00%> (+0.02%) ⬆️
cassandra-5.x-v2 1.74% <0.00%> (+<0.01%) ⬆️
elasticsearch-6.x-v1 18.71% <0.00%> (+0.01%) ⬆️
elasticsearch-7.x-v1 18.77% <0.00%> (+0.02%) ⬆️
elasticsearch-8.x-v1 18.96% <0.00%> (+0.01%) ⬆️
elasticsearch-8.x-v2 1.81% <0.00%> (-0.01%) ⬇️
grpc_v1 9.38% <73.33%> (-0.15%) ⬇️
grpc_v2 7.13% <0.00%> (+0.01%) ⬆️
kafka-v1 9.71% <0.00%> (+0.01%) ⬆️
kafka-v2 1.82% <0.00%> (+<0.01%) ⬆️
memory_v2 1.82% <0.00%> (+<0.01%) ⬆️
opensearch-1.x-v1 18.81% <0.00%> (+0.01%) ⬆️
opensearch-2.x-v1 18.81% <0.00%> (+0.02%) ⬆️
opensearch-2.x-v2 1.81% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.46% <0.00%> (+<0.01%) ⬆️
unittests 95.70% <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.

@yurishkuro yurishkuro added the changelog:exprimental Change to an experimental part of the code label Oct 4, 2024
@yurishkuro
Copy link
Member

lgtm

Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
@mahadzaryab1 mahadzaryab1 marked this pull request as ready for review October 4, 2024 00:28
@mahadzaryab1 mahadzaryab1 requested a review from a team as a code owner October 4, 2024 00:28
@mahadzaryab1
Copy link
Collaborator Author

mahadzaryab1 commented Oct 4, 2024

@yurishkuro I don't believe this is a breaking change because the v1 config was being translated to v2 which is what was being used. Let me know if that's incorrect.

@@ -113,15 +113,15 @@ func TestNewFactoryError(t *testing.T) {
t.Run("viper", func(t *testing.T) {
f := NewFactory()
f.InitFromViper(viper.New(), zap.NewNop())
f.configV2 = cfg
f.config = *cfg
Copy link
Member

Choose a reason for hiding this comment

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

remove & from declaration and * from here

@yurishkuro yurishkuro merged commit fa31b89 into jaegertracing:main Oct 4, 2024
52 checks passed
@mahadzaryab1 mahadzaryab1 deleted the consolidate-grpc branch October 31, 2024 22:35
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 v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jaeger-v2] Consolidate v1 and v2 Configs For GRPC Storage
2 participants