Merging protobuf compilation

70 views
Skip to first unread message

Clayton Coleman

unread,
Apr 18, 2016, 11:45:54 AM4/18/16
to kubernetes-dev
https://github.com/kubernetes/kubernetes/pull/24374 (in the merge
queue) turns on proto serialization compilation by default (but does
not use it).

All Go structs in our public API will now be passed through a proto
IDL generation step, and then Go code marshallers / unmarshallers for
those types will be generated. This is still an experimental feature
(i.e. not supported, will change without notice) but commits to master
will now require you also generate that code.

hack/verify-all.sh will require that you run
"hack/update-generated-protobuf.sh" in order to merge changes to the
API (just like generated conversions). To run this step, you'll
either need Docker installed (in which case the generate step will
start a container with protoc).

If you don't have/want Docker installed, you can install a
3.0.0-beta1+ version of protoc into your path and then run
"hack/after-build/update-generated-protobuf.sh".

Madhusudan C.S.

unread,
Apr 18, 2016, 2:48:46 PM4/18/16
to Clayton Coleman, kubernetes-dev
On Mon, Apr 18, 2016 at 8:45 AM, Clayton Coleman <ccol...@redhat.com> wrote:
https://github.com/kubernetes/kubernetes/pull/24374 (in the merge
queue) turns on proto serialization compilation by default (but does
not use it).

All Go structs in our public API will now be passed through a proto
IDL generation step, and then Go code marshallers / unmarshallers for
those types will be generated.  This is still an experimental feature
(i.e. not supported, will change without notice) but commits to master
will now require you also generate that code.

hack/verify-all.sh will require that you run
"hack/update-generated-protobuf.sh"

Is hack/update-generated-protobuf.sh in hack/update-all.sh now (I neither see it in master nor in PR #24374)? If it isn't, then why not?

in order to merge changes to the
API (just like generated conversions).  To run this step, you'll
either need Docker installed (in which case the generate step will
start a container with protoc).

If you don't have/want Docker installed, you can install a
3.0.0-beta1+ version of protoc into your path and then run
"hack/after-build/update-generated-protobuf.sh".

--
You received this message because you are subscribed to the Google Groups "kubernetes-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-de...@googlegroups.com.
To post to this group, send email to kuberne...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/CAH16ShKQN%2BV40RZvKxAv66C9GngT05XsJk-qRMq66TD6CY%3DNtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Clayton Coleman

unread,
Apr 18, 2016, 4:39:44 PM4/18/16
to Madhusudan C.S., kubernetes-dev


On Apr 18, 2016, at 2:48 PM, Madhusudan C.S. <madhus...@google.com> wrote:



On Mon, Apr 18, 2016 at 8:45 AM, Clayton Coleman <ccol...@redhat.com> wrote:
https://github.com/kubernetes/kubernetes/pull/24374 (in the merge
queue) turns on proto serialization compilation by default (but does
not use it).

All Go structs in our public API will now be passed through a proto
IDL generation step, and then Go code marshallers / unmarshallers for
those types will be generated.  This is still an experimental feature
(i.e. not supported, will change without notice) but commits to master
will now require you also generate that code.

hack/verify-all.sh will require that you run
"hack/update-generated-protobuf.sh"

Is hack/update-generated-protobuf.sh in hack/update-all.sh now (I neither see it in master nor in PR #24374)? If it isn't, then why not?

Accident, will add.

Madhusudan C.S.

unread,
Apr 18, 2016, 4:47:15 PM4/18/16
to Clayton Coleman, kubernetes-dev
On Mon, Apr 18, 2016 at 1:39 PM, Clayton Coleman <ccol...@redhat.com> wrote:


On Apr 18, 2016, at 2:48 PM, Madhusudan C.S. <madhus...@google.com> wrote:



On Mon, Apr 18, 2016 at 8:45 AM, Clayton Coleman <ccol...@redhat.com> wrote:
https://github.com/kubernetes/kubernetes/pull/24374 (in the merge
queue) turns on proto serialization compilation by default (but does
not use it).

All Go structs in our public API will now be passed through a proto
IDL generation step, and then Go code marshallers / unmarshallers for
those types will be generated.  This is still an experimental feature
(i.e. not supported, will change without notice) but commits to master
will now require you also generate that code.

hack/verify-all.sh will require that you run
"hack/update-generated-protobuf.sh"

Is hack/update-generated-protobuf.sh in hack/update-all.sh now (I neither see it in master nor in PR #24374)? If it isn't, then why not?

Accident, will add.

Thanks!

Maciej Szulik

unread,
Apr 19, 2016, 11:52:23 AM4/19/16
to Clayton Coleman, kubernetes-dev
Maybe a stupid question, but where can I find the info about protobuf
parameters you set in each types.go, I mean as an example:
protobuf:"varint,2,opt,name=completions" ?
It would be nice to have some info about it in docs/devel/api_changes.md.

Maciej

Clayton Coleman

unread,
Apr 19, 2016, 3:13:47 PM4/19/16
to Maciej Szulik, kubernetes-dev
Those should be machine set, not human set for now. They are
generated by gogo-protobuf automatically to ensure that ordering info
is preserved (if you add a field, we need to assign an order to it).
Consider them machine generated and opaque.

Clayton Coleman

unread,
Apr 19, 2016, 3:14:19 PM4/19/16
to Maciej Szulik, kubernetes-dev
I'll add more detail on protobuf to api-changes.

Maciej Szulik

unread,
Apr 19, 2016, 5:18:53 PM4/19/16
to Clayton Coleman, kubernetes-dev
On Tue, Apr 19, 2016 at 9:14 PM, Clayton Coleman <ccol...@redhat.com> wrote:
> I'll add more detail on protobuf to api-changes.

Thanks.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages