Skip to content
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

Update buf.gen.yaml to v2 #185

Closed
wants to merge 4 commits into from
Closed

Update buf.gen.yaml to v2 #185

wants to merge 4 commits into from

Conversation

tstirrat15
Copy link
Contributor

Description

This was something I ran across when trying to get the python client build stood up on my local. The old buf.gen.yaml required you to have various protoc plugin binaries installed in places that buf expected, and I couldn't figure out which versions from which packages provided the correct binaries.

Since we originally set up buf.gen.yaml, they've released a v2 of buf and its configuration, and one of the things that this allows for is using remote versions of the plugins, where buf takes care of the work of providing the protoc plugin binary and this is abstracted away from the user.

It's definitely a nicer DX. My only concern is about integrating it into our build processes, and whether we consider this to be more concerning from a supply-chain perspective than manually downloading and setting up the protoc plugins.

I also am not entirely sure that the new plugins line up with the old; the new version of the config file uses a pyi plugin instead of the pair of mypy plugins. We can talk about whether that's desired.

Changes

  • Use new v2 of buf.gen.yaml
  • Use remote versions of protoc packages
  • Add a TODO

Testing

Review.

@tstirrat15 tstirrat15 requested a review from a team August 19, 2024 14:08
@tstirrat15
Copy link
Contributor Author

I talked to Jimmy about this and he said that using the remote plugins has been problematic in the past, because buf will change their primary compiler (i.e. not the language-specific plugins but the compiler that coordinates them) in such a way that breaks reproducible builds. For that reason we want to use the local plugins.

We probably want to include documentation of how to install the plugins (to the degree that it's possible). I'm going to rework this to use v2 but with local plugins in the meantime.

@tstirrat15
Copy link
Contributor Author

Gonna close this and recreate it.

@tstirrat15 tstirrat15 closed this Aug 21, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant