-
Notifications
You must be signed in to change notification settings - Fork 706
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
Generate protobuf content during build #3908
Comments
My experience from other projects is that generated source code is never added to Git. This is, removed from repo and added to gitignore. |
Yeah, that's the normal approach with generated source code and it is something we can do in Kubeapps as above. GRPC-generated code in go is sometimes (but not always) treated differently because the normal tooling is to |
I do agree. It's important to ensure we are using the same version in every environment. For the record, currently, when running
During the generation process, we depend on 1) the So, if we plan to untrack the autogenerated code, I foresee two potential issues:
In short, I'd go with autogenerating the code in CI build time (to catch that kind of bugs) but I wouldn't remove the tracked code yet. |
Description:
While we were developing the kubeapps-apis service, we didn't update the bulid process to generate the protobuf content, but should do so now that we're using and depending on this service.
I had the issue yesterday that running
buf generate
on master leads to code that won't pass our ts-compile checks. I've documented that separately upstream at stephenh/ts-proto#432 , but had we been generating during our build, we would not have updated thets-proto
module without noticing.We could now do something like git ignoring the generated content in our local checkouts and generating it in the build, or instead failing the build if the output is different. Either way, we'll want to ensure we use the same version of buf locally as in CI etc. Anyway, needs more discussion, just highlighting for inclusion soon.
The text was updated successfully, but these errors were encountered: