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

Grpc plugin archive storage support #2317

Merged
merged 28 commits into from
Sep 26, 2020

Conversation

m8rge
Copy link
Contributor

@m8rge m8rge commented Jun 29, 2020

Signed-off-by: Andrew Putilov [email protected]

Which problem is this PR solving?

Resolves #2299

Short description of the changes

  • Added ArchiveSpanReader and ArchiveSpanWriter to shared.StoragePlugin interface.
  • Added to proto/storage.proto ArchiveSpanWriterPlugin and ArchiveSpanReaderPlugin services to serve archive storage methods.
  • New rpc ArchiveSupported() bool to return is archive storage supported or not.
  • Made compatible with old plugins without ArchiveSpanReaderPlugin service implemented. Will act same as archive storage not supported by plugin.

@m8rge m8rge force-pushed the grpc-archive-storage branch 5 times, most recently from ecd9b5c to dd374cf Compare June 29, 2020 11:42
@codecov
Copy link

codecov bot commented Jun 29, 2020

Codecov Report

Attention: Patch coverage is 83.83838% with 16 lines in your changes missing coverage. Please review.

Project coverage is 95.36%. Comparing base (87799ea) to head (5d81ec4).

Files with missing lines Patch % Lines
plugin/storage/grpc/shared/plugin.go 0.00% 12 Missing ⚠️
plugin/storage/grpc/grpc.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2317      +/-   ##
==========================================
+ Coverage   95.21%   95.36%   +0.14%     
==========================================
  Files         208      208              
  Lines        9158     9217      +59     
==========================================
+ Hits         8720     8790      +70     
+ Misses        363      351      -12     
- Partials       75       76       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@m8rge m8rge marked this pull request as ready for review June 29, 2020 19:16
@m8rge m8rge requested a review from a team as a code owner June 29, 2020 19:16
@m8rge m8rge requested a review from pavolloffay June 29, 2020 19:16
@m8rge m8rge marked this pull request as draft June 29, 2020 19:17
@m8rge m8rge marked this pull request as ready for review June 29, 2020 19:59
@m8rge
Copy link
Contributor Author

m8rge commented Jun 29, 2020

codecov/patch fails due /cmd/query/app/static_handler.go file coverage. I didn't modify it.

@yurishkuro
Copy link
Member

@m8rge ack-ing that I saw the PR, will review over the weekend, unless @pavolloffay gets to it first.

plugin/storage/grpc/README.md Outdated Show resolved Hide resolved
plugin/storage/grpc/proto/storage.proto Outdated Show resolved Hide resolved
plugin/storage/grpc/config/config.go Outdated Show resolved Hide resolved
plugin/storage/grpc/factory.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/grpc_client.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/interface.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/extra/capabilities.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/grpc_server.go Outdated Show resolved Hide resolved
@m8rge
Copy link
Contributor Author

m8rge commented Jul 21, 2020

I'll change README.md last.

@m8rge m8rge requested a review from yurishkuro July 28, 2020 15:38
@m8rge
Copy link
Contributor Author

m8rge commented Aug 4, 2020

@yurishkuro, Could you fill your comments?

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.

Sorry for delay, many other things came up.

My main concern with this approach is the introduction of shared.ArchiveReader/ArchiveWriter interfaces that are pretty redundant. In the main storage we did not have that - we had archive factory, but it was returning normal reader/writer interfaces, and the fact that they are for "archive" was apparent from the context.

I am not convinced by https://github.com/jaegertracing/jaeger/pull/2317/files#r457931354 that these interfaces are necessary. The GRPC methods are already different anyway, and there is no strong need to have a single type implement both main and archive storage.

plugin/storage/grpc/README.md Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/grpc_client.go Outdated Show resolved Hide resolved
examples/memstore-plugin/main.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/grpc_client_test.go Outdated Show resolved Hide resolved
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.

Sorry for the delay. Overall looks good to me.

@joe-elliott @albertteoh you might want to review this, it's a good deep dive into storage APIs

plugin/storage/grpc/shared/archive.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/archive.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/archive.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/archive.go Outdated Show resolved Hide resolved
Copy link
Contributor

@albertteoh albertteoh left a comment

Choose a reason for hiding this comment

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

lgtm, just some minor comments.

plugin/storage/grpc/config/config.go Outdated Show resolved Hide resolved
plugin/storage/grpc/config/config.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/archive.go Outdated Show resolved Hide resolved
Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

Some minor comments/thoughts. After this is merged I'm going to look into improving tests per this discussion #2455 (comment)

plugin/storage/grpc/config/config.go Outdated Show resolved Hide resolved
examples/memstore-plugin/main.go Outdated Show resolved Hide resolved
@jpkrohling
Copy link
Contributor

Other than the conflict, what's the status of this PR?

m8rge and others added 21 commits September 23, 2020 10:08
Signed-off-by: Andrew Putilov <[email protected]>
Signed-off-by: Andrew Putilov <[email protected]>
Signed-off-by: Andrew Putilov <[email protected]>
Signed-off-by: Andrew Putilov <[email protected]>
Signed-off-by: Andrew Putilov <[email protected]>
…ces on plugin client side

Signed-off-by: Andrew Putilov <[email protected]>
Signed-off-by: Andrew Putilov <[email protected]>
Signed-off-by: Andrew Putilov <[email protected]>
- make internal types private
- add interface validations
- wrap errors with %w

Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Andrew Putilov <[email protected]>
@m8rge
Copy link
Contributor Author

m8rge commented Sep 24, 2020

@yurishkuro how can I trigger codecov? It stuck in "Waiting for status to be reported" status

Signed-off-by: Andrew Putilov <[email protected]>
@m8rge
Copy link
Contributor Author

m8rge commented Sep 25, 2020

@yurishkuro Codecov now points to plugin/storage/grpc/config/config.go without tests at all. I didn't know how properly test this lines https://github.com/jaegertracing/jaeger/pull/2317/files#annotation_459564037 because it deep into HashiCorp plugin system. Can we just merge this PR?

@yurishkuro yurishkuro merged commit ecc5091 into jaegertracing:master Sep 26, 2020
@yurishkuro
Copy link
Member

🎉 🎉 🎉

Thanks for your patience, @m8rge. Do you mind creating another PR to explain these changes in plugin/storage/grpc/README.md?

@m8rge m8rge deleted the grpc-archive-storage branch September 30, 2020 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gRPC plugin archive storage support
6 participants