-
Notifications
You must be signed in to change notification settings - Fork 0
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 v1alpha1 generated protos #2
Conversation
247ca21
to
0532e14
Compare
|
|
||
.PHONY: deps | ||
deps: | ||
$(GO) get github.com/gogo/protobuf/protoc-gen-gogofaster |
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.
protoc-gen-gogofaster
eliminates XXX_unrecognized
fields, which I think we should keep for forwards compatibility.
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.
protoc-gen-gogofaster
eliminatesXXX_unrecognized
fields, which I think we should keep for forwards compatibility.
Yeah I considered this. It can cause unwanted side-effects in the future, for example when storing marshaled protos that may change future behavior and validation. I'm neutral, I don't see the benefit. Clients should be explicitly talking to a versioned API endpoint anyway.
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 was more thinking about supporting a chain of forwarders that have slightly different versions. If we add a response field to the API (assuming it doesn't change behavior) it would be nice if that field wouldn't be dropped by a forwarder that isn't updated yet.
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.
But that means that an intermediate forwarder receives messages from v1alpha2
and sends it as v1alpha1
; those are not compatible anyway, right? When mapping those types, the v1alpha2
specific fields get lost, but I'm not sure in which case we could retain that realistically? Copying XXX_unrecognized
?
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 think we can resolve this later
0532e14
to
fefdd6a
Compare
fefdd6a
to
0919ae9
Compare
0919ae9
to
f0bf058
Compare
Summary
Closes #1
Changes
v1alpha1
per packetbroker/api@b937aab (not merged, hence draft)Notes for Reviewers
Please have a look at the tooling and how things are being generated, like this one https://github.com/packetbroker/go-api/pull/2/files#diff-f6797f8393b8812416981fa126276a50
We don't have version dependencies for
protoc
andgogofaster
. The only way to do that right seems to be what we do in The Things Stack, but I consider that overkill for now.