-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add gRPC plugin proto changes #1323
Merged
Merged
Changes from 28 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
b658be0
Add gRPC plugin proto changes
chvck 3cdbb0d
Change FindTraces signature to return a stream.
chvck 61e63bf
Satisfy gofmt tool
chvck 3a87811
Change proto package and service names
chvck 464b68a
Delete commented out spanstorage
chvck 786776e
Change FindTraces response to be a stream of spans
chvck d570a0e
Change from EmptyMessage to google.protobuf.Empty
chvck fbc8594
Move from using StoragePluginError to google.rpc.Status
chvck cd71076
Remove commented code and clean up proto formatting
chvck 8d237e2
Remove protobuf responses and only return successes, rely on Status
chvck 870c54e
Update Gopkg lockfile
chvck 4f72738
Update Span type to come from model.proto
chvck 6b998b5
Update storage proto file
chvck 75eee97
Add generated storage plugin file to lint ignores
chvck 5fb2135
Lint ignore grpc plugin generated code by name not path
chvck b503969
Rename FindTracesResponseChunk to SpansResponseChunk
chvck db7790a
Add marshal/unmarshal tests for DependencyLink
chvck d05d800
Add tests for storage protos with custom types
chvck 8a301d9
Run fmt and ignore storage_test for linting
chvck 54df218
Remove DependencyLinkSource and use string
chvck d46c32d
Update headers
chvck 7dbde43
Add SpansChunkResponse test
chvck f99d320
Update makefile protoc calls
chvck 18e47f2
Merge branch 'master' into proto-master
chvck 3f8ea75
Update proto generated files and update license script
chvck 273eaee
Merge branch 'master' into proto-master
chvck 07a8b07
Update generated storage file to new proto layout
chvck 94cfbae
Add storage generated files to import order cleanup ignores
chvck b23cde6
Move storage generated file to proto-gen dir
chvck 7aafb1b
Remove generated plugin storage file from script ignores
chvck 700e4e4
Fix copyright headers
chvck 398c5d2
Update storage_test generated file
chvck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ ALL_SRC := $(shell find . -name '*.go' \ | |
-not -name '*_test.go' \ | ||
-not -name 'model.pb.go' \ | ||
-not -name 'model_test.pb.go' \ | ||
-not -name 'storage.pb.go' \ | ||
-not -name 'storage_test.pb.go' \ | ||
-not -path './examples/*' \ | ||
-not -path './vendor/*' \ | ||
-not -path '*/mocks/*' \ | ||
|
@@ -337,19 +339,22 @@ PROTO_INCLUDES := \ | |
-I model/proto \ | ||
-I vendor/github.com/grpc-ecosystem/grpc-gateway \ | ||
-I vendor/github.com/gogo/googleapis \ | ||
-I vendor/github.com/gogo/protobuf/protobuf \ | ||
-I vendor/github.com/gogo/protobuf | ||
# Remapping of std types to gogo types (must not contain spaces) | ||
PROTO_GOGO_MAPPINGS := $(shell echo \ | ||
Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/types, \ | ||
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types, \ | ||
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types, \ | ||
Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types, \ | ||
Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api, \ | ||
Mmodel.proto=github.com/jaegertracing/jaeger/model \ | ||
| sed 's/ //g') | ||
|
||
|
||
.PHONY: proto | ||
proto: | ||
# Generate gogo, gRPC-Gateway, swagger, go-validators output. | ||
# Generate gogo, gRPC-Gateway, swagger, go-validators, gRPC-storage-plugin output. | ||
# | ||
# -I declares import folders, in order of importance | ||
# This is how proto resolves the protofile imports. | ||
|
@@ -385,11 +390,23 @@ proto: | |
--swagger_out=allow_merge=true:$(PWD)/proto-gen/openapi/ \ | ||
model/proto/api_v2/*.proto | ||
|
||
$(PROTOC) \ | ||
$(PROTO_INCLUDES) \ | ||
-I plugin/storage/grpc/proto \ | ||
--gogo_out=plugins=grpc,$(PROTO_GOGO_MAPPINGS):$(PWD)/plugin/storage/grpc/proto/storage_v1 \ | ||
plugin/storage/grpc/proto/storage.proto | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please fix indentation in these two lines to align with L395 |
||
|
||
$(PROTOC) \ | ||
-I model/proto \ | ||
--go_out=$(PWD)/model/prototest/ \ | ||
model/proto/model_test.proto | ||
|
||
$(PROTOC) \ | ||
-I plugin/storage/grpc/proto \ | ||
--go_out=$(PWD)/plugin/storage/grpc/proto/storageprototest/ \ | ||
plugin/storage/grpc/proto/storage_test.proto | ||
|
||
|
||
.PHONY: proto-install | ||
proto-install: | ||
go get -u github.com/golang/glog | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in order to avoid code coverage drop, we should place the generated files under
proto-gen/storage_v1/