-
Notifications
You must be signed in to change notification settings - Fork 78
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 Go code generated for api_v2 #116
Add Go code generated for api_v2 #116
Conversation
Signed-off-by: adityachopra29 <adityachopra2912@gmail.com>
@yurishkuro Please have a look now. Similiarly, since |
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.
I would recommend skipping /model/ for now, because it has a much higher knock-off effect on Jaeger repo, while the other types are easier to swap, and do not require much of organization. The original ticket was not asking to migrate /model/.
Please ensure that all generated files are organized into a consistent folder hierarchy, rooted at proto-gen
I would recommend starting with a single .proto, e.g. api_v2. There is more housekeeping work that needs to be done first, such as setting up CI to lint & compile, defining a release process, etc. Let's do one module e2e before migrating everything.
@@ -0,0 +1,3357 @@ | |||
// Code generated by protoc-gen-gogo. DO NOT EDIT. |
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.
it won't be usable if it's in the internal package.
@@ -0,0 +1,27 @@ | |||
// Copyright (c) 2019 The Jaeger Authors |
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.
this is not useful here, we can leave it in Jaeger
model/prototest/model_test.pb.go
Outdated
@@ -0,0 +1,230 @@ | |||
// Copyright (c) 2018 Uber Technologies, Inc. |
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.
not needed in this repo
Signed-off-by: adityachopra29 <adityachopra2912@gmail.com>
Okay. I was trying to understand how to setup CI, etc. Can you please explain what all is left in setting up of the CI? @yurishkuro
|
what we want in the CI:
|
Signed-off-by: adityachopra29 <adityachopra2912@gmail.com>
Signed-off-by: adityachopra29 <adityachopra2912@gmail.com>
endef | ||
|
||
.PHONY: new-proto | ||
new-proto: new-proto-api-v2 |
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.
Why "new"?
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.
@yurishkuro
There is already a command make proto
in the main Makefile. I didn't want to remove that right now before confirming, so I made the make new-proto
command in the meantime.
If we can remove the old make proto command, we can rename it.
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.
why do we need two different paths at all? The difference between the two commands is that the old one generates for all languages (and is used mostly as a linter step), while the new one only generates Go types. I would prefer to avoid duplication and be able to support both Go and All languages with a single set of commands.
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.
you know, let's hold off on this topic - we can refactor this as as separate issue, I would like to get api_v2 types into this repo first.
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.
why do we need two different paths at all?
Yes, I agree. I had planned on replacing that test in the end. Just wanted to show you the changes before making them; hence, I made a new file.
Okay, I will create another pr to make these changes
I am seeing CI failures
why is the original workflow affected, what changed? Does your new makefile override something (like variables) in the old one? |
Signed-off-by: adityachopra29 <adityachopra2912@gmail.com>
@yurishkuro My bad, I had redefined the PROTO_INCLUDES variable, because of which the error was coming. Have pushed the changes Along the way, I also saw some command variables that were hardcoded in the Makefile (such as docker, sed). We can also change them in another pr. |
DOCKER_PROTOBUF_VERSION=0.5.0 | ||
DOCKER_PROTOBUF=jaegertracing/protobuf:$(DOCKER_PROTOBUF_VERSION) |
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.
there are already vars defined in the main Makefile for the same concept, should be using them.
As discussed, I am going to merge this so that we can start using these types in the jaeger repo. A clean-up / deduplication can be done separately. |
@adityachopra29 we will also need go.mod somewhere to make this usable as a go library. And it would be good to have some minimal test to ensure the generated code compiles. |
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test