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

Plugin request for Buf Schema Registry - python-betterproto #95

Closed
mfridman opened this issue Sep 20, 2022 · 11 comments · Fixed by #588
Closed

Plugin request for Buf Schema Registry - python-betterproto #95

mfridman opened this issue Sep 20, 2022 · 11 comments · Fixed by #588
Labels
Feature New feature or request

Comments

@mfridman
Copy link
Member

https://github.com/danielgtaylor/python-betterproto

@mfridman mfridman added the Feature New feature or request label Sep 20, 2022
@mfridman
Copy link
Member Author

mfridman commented Jan 3, 2023

Closing for now. If this plugin becomes more popular we can re-open the issue.

@mfridman mfridman closed this as completed Jan 3, 2023
@Darkheir
Copy link

Darkheir commented Feb 9, 2023

We would love to have this plugin :-)
We are currently using the plugin we created https://buf.build/darkheir/plugins/python-betterproto but soon it's going to be an issue for us.

@ryaminal
Copy link

ryaminal commented Apr 13, 2023

@mfridman how is "popularity" measured here so this can be reopened? i'd be willing to help get this in the community plugins as betterproto has a much cleaner interface when working with protobuf.

One thing that might delay this is that the most recent version on pypi for this is almost 3 years old and it looks like a 2.0(major release) is "close" to being finalized.

@DonDebonair
Copy link

Can we reopen this? betterproto is miles ahead of the standard protoc Python plugin. Not having this plugin keeps my company from using Buf

@ryaminal
Copy link

this is excellent, thanks everyone.

@simon-connektica
Copy link

Is there any chance you could publish v2.0.0-beta5? v1.2.5 dates back to 2020, the latest changes are available in v2.0.0-beta5 (and that is still almost 1 year old)

@pkwarren
Copy link
Member

Is there any chance you could publish v2.0.0-beta5? v1.2.5 dates back to 2020, the latest changes are available in v2.0.0-beta5 (and that is still almost 1 year old)

At this time, we only support stable releases of BSR plugins. Once the maintainer releases a v2.0.0, we will pick it up automatically and release it to the BSR.

@Darkheir
Copy link

The issue is that the latest stable version is more than 3 years old and a lot of projects use the beta versions that are quite stable.

@simon-connektica
Copy link

simon-connektica commented Jul 11, 2023

I'm using this hack in the meantime...

FROM python:3.11-bookworm AS builder

RUN pip install "betterproto[compiler]==2.0.0b5" grpcio-tools

CMD python -m grpc_tools.protoc -I /app/proto --python_betterproto_out=/app/gen $(find /app/proto -iname '*.proto' | sort | xargs)
# Hack because betterproto 2.0.0b5 is not supported by buf yet
mkdir -p gen/python # required for correct ownership
docker build -f scripts/betterproto/Dockerfile -t proto-python-builder .
docker run --rm --user "$(id -u):$(id -g)" -v "$(pwd)/proto:/app/proto" -v "$(pwd)/gen/python:/app/gen" proto-python-builder

@redbmk
Copy link

redbmk commented Aug 3, 2023

Is there any chance you could publish v2.0.0-beta5? v1.2.5 dates back to 2020, the latest changes are available in v2.0.0-beta5 (and that is still almost 1 year old)

At this time, we only support stable releases of BSR plugins. Once the maintainer releases a v2.0.0, we will pick it up automatically and release it to the BSR.

How will it be picked up automatically? I see the current version uses a requirements.txt file that pins versions of some dependencies but that likely won't work for v2 so there would need to be some manual intervention.

Does the buf team just get notified that a new version is out and get prompted to manually add a new version?

@mfridman
Copy link
Member Author

mfridman commented Aug 3, 2023

It's pretty automated, there's a job that runs daily searching for updated plugin versions. Think of this repository as a "dependabot" for Protobuf plugins with an automated pipeline to https://buf.build/plugins.

Once a stable semver is released, it'll get picked up automatically. The only condition is that it must be a valid semver without a pre-release component

Currently, v1.2.5 is the latest stable version from https://github.com/danielgtaylor/python-betterproto/tags

Which is why it's the latest available one: https://buf.build/community/danielgtaylor-betterproto

I'm afraid until a stable v2.0.0 is released, we can't do much. Hope this helps, if you have any other questions we're more than happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants