Skip to content

Conversation

mahadzaryab1
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 commented Mar 6, 2025

Which problem is this PR solving?

Description of the changes

  • This PR removes the gogoproto annotations from trace_storage.proto and dependency_storage.proto to avoid introducing a dependency on gogo for users. Instead, it uses a similar patching mechanism to api_v3 to add the annotations when generating the *.pb.go files.

How was this change tested?

  • CI

Checklist

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

codecov bot commented Mar 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.02%. Comparing base (6037db2) to head (09d1861).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6819      +/-   ##
==========================================
- Coverage   96.06%   96.02%   -0.04%     
==========================================
  Files         364      364              
  Lines       20712    20712              
==========================================
- Hits        19897    19889       -8     
- Misses        622      628       +6     
- Partials      193      195       +2     
Flag Coverage Δ
badger_v1 9.86% <ø> (ø)
badger_v2 1.98% <ø> (ø)
cassandra-4.x-v1-manual 14.87% <ø> (ø)
cassandra-4.x-v2-auto 1.97% <ø> (ø)
cassandra-4.x-v2-manual 1.97% <ø> (ø)
cassandra-5.x-v1-manual 14.87% <ø> (ø)
cassandra-5.x-v2-auto 1.97% <ø> (ø)
cassandra-5.x-v2-manual 1.97% <ø> (ø)
elasticsearch-6.x-v1 19.26% <ø> (ø)
elasticsearch-7.x-v1 19.34% <ø> (ø)
elasticsearch-8.x-v1 19.51% <ø> (ø)
elasticsearch-8.x-v2 1.98% <ø> (-0.12%) ⬇️
grpc_v1 10.90% <ø> (ø)
grpc_v2 7.95% <ø> (ø)
kafka-3.x-v1 10.16% <ø> (ø)
kafka-3.x-v2 1.98% <ø> (ø)
memory_v2 1.98% <ø> (ø)
opensearch-1.x-v1 19.39% <ø> (ø)
opensearch-2.x-v1 19.39% <ø> (ø)
opensearch-2.x-v2 1.98% <ø> (ø)
tailsampling-processor 0.48% <ø> (ø)
unittests 94.91% <ø> (-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.

@yurishkuro
Copy link
Member

let's inject then back with SED

mahadzaryab1 and others added 5 commits March 8, 2025 14:47
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>
patch-storage-v2:
mkdir -p proto-gen/.patched/storage_v2
cp internal/storage/v2/grpc/trace_storage.proto proto-gen/.patched/storage_v2/
cp internal/storage/v2/grpc/dependency_storage.proto proto-gen/.patched/storage_v2/
Copy link
Member

Choose a reason for hiding this comment

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

Why copy? It will get overwritten, is it not?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed it to follow the same structure as the command for api_v3

@@ -135,7 +147,7 @@ API_V3_PATCHED=$(API_V3_PATCHED_DIR)/query_service.proto
patch-api-v3:
mkdir -p $(API_V3_PATCHED_DIR)
cat idl/proto/api_v3/query_service.proto | \
$(SED) -f ./proto-gen/patch-api-v3.sed \
$(SED) -f ./proto-gen/patch.sed \
Copy link
Member

Choose a reason for hiding this comment

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

I didn't realize the sed file is reusable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah its just a generic file that adds annotations for timestamps and durations

s|import "google/protobuf/duration.proto";|import "google/protobuf/duration.proto";\
\
import "gogoproto/gogo.proto";\
\
option (gogoproto.marshaler_all) = true;\
option (gogoproto.unmarshaler_all) = true;\
option (gogoproto.sizer_all) = true;\
|g

s|google.protobuf.Timestamp \(.*\);|google.protobuf.Timestamp \1 \
  [\
  (gogoproto.nullable) = false,\
  (gogoproto.stdtime) = true\
  ];|g

s|google.protobuf.Duration \(.*\);|google.protobuf.Duration \1 \
  [\
  (gogoproto.nullable) = false,\
  (gogoproto.stdduration) = true\
  ];|g

Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
@mahadzaryab1 mahadzaryab1 requested a review from yurishkuro March 9, 2025 02:40
@mahadzaryab1 mahadzaryab1 added this pull request to the merge queue Mar 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 9, 2025
@mahadzaryab1 mahadzaryab1 added this pull request to the merge queue Mar 9, 2025
Merged via the queue into jaegertracing:main with commit 9a8f06b Mar 9, 2025
56 checks passed
@mahadzaryab1 mahadzaryab1 deleted the remove-gogo-annotations branch April 2, 2025 17:13
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
…dependency_storage.proto` (jaegertracing#6819)

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

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

## Description of the changes
- This PR removes the gogoproto annotations from `trace_storage.proto`
and `dependency_storage.proto` to avoid introducing a dependency on gogo
for users. Instead, it uses a similar patching mechanism to api_v3 to
add the annotations when generating the *.pb.go files.
 
## 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`

---------

Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
…dependency_storage.proto` (jaegertracing#6819)

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

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

## Description of the changes
- This PR removes the gogoproto annotations from `trace_storage.proto`
and `dependency_storage.proto` to avoid introducing a dependency on gogo
for users. Instead, it uses a similar patching mechanism to api_v3 to
add the annotations when generating the *.pb.go files.

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

---------

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants