Repository navigation
Update mypy, sudorandom-connect-openapi, connect/python, grpc-gateway and grpc/java plugins #2165
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| * | ||
| !Dockerfile | ||
| !requirements.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # syntax=docker/dockerfile:1.19 | ||
| FROM python:3.11.14-bookworm AS build | ||
| WORKDIR /app | ||
| RUN python -mvenv /app | ||
| ADD /requirements.txt requirements.txt | ||
| RUN . ./bin/activate \ | ||
| && pip install --no-cache-dir -r requirements.txt \ | ||
| && pip uninstall --yes pip setuptools \ | ||
| && rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \ | ||
| && rm -f bin/protoc-gen-mypy \ | ||
| && ln -sf /usr/bin/python /app/bin/python | ||
|
|
||
| FROM gcr.io/distroless/python3-debian12:latest@sha256:8ce6bba3f793ba7d834467dfe18983c42f9b223604970273e9e3a22b1891fc27 AS base | ||
|
|
||
| FROM scratch | ||
| COPY --link --from=base / / | ||
| COPY --link --from=build /app /app | ||
| USER nobody | ||
| ENTRYPOINT [ "/app/bin/protoc-gen-mypy_grpc" ] |
26 changes: 26 additions & 0 deletions
26
plugins/community/nipunn1313-mypy-grpc/v4.0.0/buf.plugin.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| version: v1 | ||
| name: buf.build/community/nipunn1313-mypy-grpc | ||
| plugin_version: v4.0.0 | ||
| source_url: https://github.com/nipunn1313/mypy-protobuf | ||
| description: Generate mypy stub files for grpcio generated code. | ||
| spdx_license_id: Apache-2.0 | ||
| license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/LICENSE | ||
| output_languages: | ||
| - python | ||
| registry: | ||
| python: | ||
| package_type: "stub-only" | ||
| # https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/setup.cfg#L20 | ||
| requires_python: ">=3.8" | ||
| deps: | ||
| # https://github.com/nipunn1313/mypy-protobuf/tree/v4.0.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf | ||
| # > Earlier releases might work, but aren't tested. | ||
| - "types-protobuf >= 5.28" | ||
| - "protobuf >= 5.28.2" | ||
| # https://github.com/nipunn1313/mypy-protobuf/tree/v4.0.0#to-run-typecheckers-on-code-generated-with-grpc-plugin---youll-additionally-need | ||
| # > Earlier releases might work, but aren't tested | ||
| - "grpcio >= 1.66.2" | ||
| # https://pypi.org/project/grpcio-tools/ | ||
| - "grpcio-tools >= 1.66.2" | ||
| # https://pypi.org/project/grpc-stubs/ | ||
| - "grpc-stubs >= 1.53.0.5" | ||
|
stefanvanburen marked this conversation as resolved.
Outdated
|
||
3 changes: 3 additions & 0 deletions
3
plugins/community/nipunn1313-mypy-grpc/v4.0.0/requirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| mypy-protobuf==4.0.0 | ||
| protobuf==6.33.1 | ||
| types-protobuf==6.32.1.20251105 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| * | ||
| !Dockerfile | ||
| !requirements.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # syntax=docker/dockerfile:1.19 | ||
| FROM python:3.11.14-bookworm AS build | ||
| WORKDIR /app | ||
| RUN python -mvenv /app | ||
| ADD /requirements.txt requirements.txt | ||
| RUN . ./bin/activate \ | ||
| && pip install --no-cache-dir -r requirements.txt \ | ||
| && pip uninstall --yes pip setuptools \ | ||
| && rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \ | ||
| && rm -f bin/protoc-gen-mypy_grpc \ | ||
| && ln -sf /usr/bin/python /app/bin/python | ||
|
|
||
| FROM gcr.io/distroless/python3-debian12:latest@sha256:8ce6bba3f793ba7d834467dfe18983c42f9b223604970273e9e3a22b1891fc27 AS base | ||
|
|
||
| FROM scratch | ||
| COPY --link --from=base / / | ||
| COPY --link --from=build /app /app | ||
| USER nobody | ||
| ENTRYPOINT [ "/app/bin/protoc-gen-mypy" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| version: v1 | ||
| name: buf.build/community/nipunn1313-mypy | ||
| plugin_version: v4.0.0 | ||
| source_url: https://github.com/nipunn1313/mypy-protobuf | ||
| description: Generate mypy stub files from Protobuf definitions. | ||
| spdx_license_id: Apache-2.0 | ||
| license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/LICENSE | ||
| output_languages: | ||
| - python | ||
| registry: | ||
| python: | ||
| package_type: "stub-only" | ||
| # https://github.com/nipunn1313/mypy-protobuf/blob/v4.0.0/setup.cfg#L20 | ||
| requires_python: ">=3.8" | ||
| deps: | ||
| # https://github.com/nipunn1313/mypy-protobuf/tree/v4.0.0#requirements-to-run-typecheckers-on-stubs-generated-by-mypy-protobuf | ||
| # > Earlier releases might work, but aren't tested. | ||
| - "types-protobuf >= 5.28" | ||
| - "protobuf >= 5.28.2" | ||
|
stefanvanburen marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| mypy-protobuf==4.0.0 | ||
| protobuf==6.33.1 | ||
| types-protobuf==6.32.1.20251105 |
2 changes: 2 additions & 0 deletions
2
plugins/community/sudorandom-connect-openapi/v0.22.0/.dockerignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| * | ||
| !Dockerfile |
15 changes: 15 additions & 0 deletions
15
plugins/community/sudorandom-connect-openapi/v0.22.0/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # syntax=docker/dockerfile:1.19 | ||
| FROM --platform=$BUILDPLATFORM golang:1.25.5-bookworm AS build | ||
|
|
||
| ARG TARGETOS TARGETARCH | ||
| ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
|
|
||
| RUN --mount=type=cache,target=/go/pkg/mod \ | ||
| go install -ldflags "-s -w" -tags remote_plugin -trimpath github.com/sudorandom/protoc-gen-connect-openapi@v0.22.0 \ | ||
| && mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-connect-openapi /go/bin/protoc-gen-connect-openapi || true | ||
|
|
||
| FROM scratch | ||
| COPY --from=build --link /etc/passwd /etc/passwd | ||
| COPY --from=build --link --chown=root:root /go/bin/protoc-gen-connect-openapi . | ||
| USER nobody | ||
| ENTRYPOINT [ "/protoc-gen-connect-openapi" ] |
7 changes: 7 additions & 0 deletions
7
plugins/community/sudorandom-connect-openapi/v0.22.0/buf.plugin.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| version: v1 | ||
| name: buf.build/community/sudorandom-connect-openapi | ||
| plugin_version: v0.22.0 | ||
| source_url: https://github.com/sudorandom/protoc-gen-connect-openapi | ||
| description: Plugin for generating OpenAPIv3 from Protobufs matching the Connect RPC interface. | ||
| spdx_license_id: MIT | ||
| license_url: https://github.com/sudorandom/protoc-gen-connect-openapi/blob/v0.22.0/LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| * | ||
| !Dockerfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # syntax=docker/dockerfile:1.19 | ||
| FROM python:3.11.14-bookworm AS build | ||
| WORKDIR /app | ||
| RUN python -mvenv /app | ||
| RUN . ./bin/activate \ | ||
| && pip install --no-cache-dir protoc-gen-connect-python==0.7.0 \ | ||
| && pip uninstall --yes pip setuptools \ | ||
| && rm -f bin/activate.fish bin/activate.csh bin/Activate.ps1 | ||
|
|
||
| FROM gcr.io/distroless/python3-debian12:latest@sha256:8ce6bba3f793ba7d834467dfe18983c42f9b223604970273e9e3a22b1891fc27 AS base | ||
|
|
||
| FROM scratch | ||
| COPY --link --from=base / / | ||
| COPY --link --from=build --chmod=0755 /app /app | ||
| USER nobody | ||
| ENTRYPOINT [ "/app/bin/protoc-gen-connect-python" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| version: v1 | ||
| name: buf.build/connectrpc/python | ||
| plugin_version: v0.7.0 | ||
| source_url: https://github.com/connectrpc/connect-python | ||
| description: Generates client and server stubs for Connect Python. Compatible with the Connect RPC protocol. | ||
| spdx_license_id: Apache-2.0 | ||
| license_url: https://github.com/connectrpc/connect-python/blob/v0.7.0/LICENSE | ||
| deps: | ||
| - plugin: buf.build/protocolbuffers/python:v33.2 | ||
| output_languages: | ||
| - python | ||
| registry: | ||
| python: | ||
| package_type: "runtime" | ||
| # https://github.com/connectrpc/connect-python/blob/v0.7.0/protoc-gen-connect-python/pyproject.toml#L11 | ||
| requires_python: ">=3.10" | ||
| deps: | ||
| # https://pypi.org/project/connect-python/ | ||
| - "connect-python >= 0.7.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| * | ||
| !Dockerfile | ||
| !separate_pkg_additional_imports.patch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # syntax=docker/dockerfile:1.19 | ||
| FROM --platform=$BUILDPLATFORM golang:1.25.5-bookworm AS build | ||
|
|
||
| ARG TARGETOS TARGETARCH | ||
| ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
|
|
||
| WORKDIR /tmp | ||
| RUN git clone --depth 1 --branch v2.27.4 https://github.com/grpc-ecosystem/grpc-gateway.git | ||
| COPY --link separate_pkg_additional_imports.patch /tmp/separate_pkg_additional_imports.patch | ||
| WORKDIR /tmp/grpc-gateway | ||
| RUN git apply /tmp/separate_pkg_additional_imports.patch | ||
| WORKDIR /tmp/grpc-gateway/protoc-gen-grpc-gateway | ||
| RUN --mount=type=cache,target=/go/pkg/mod \ | ||
| go install -ldflags="-s -w" -trimpath \ | ||
| && mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-gateway /go/bin/protoc-gen-grpc-gateway || true | ||
|
|
||
| FROM scratch | ||
| COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd | ||
| COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-gateway / | ||
| USER nobody | ||
| ENTRYPOINT [ "/protoc-gen-grpc-gateway" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| version: v1 | ||
| name: buf.build/grpc-ecosystem/gateway | ||
| plugin_version: v2.27.4 | ||
| source_url: https://github.com/grpc-ecosystem/grpc-gateway | ||
| integration_guide_url: https://github.com/grpc-ecosystem/grpc-gateway#usage | ||
| description: gRPC to JSON proxy generator following the gRPC HTTP spec. | ||
| output_languages: | ||
| - go | ||
| registry: | ||
| go: | ||
| min_version: "1.24" | ||
| deps: | ||
| - module: github.com/grpc-ecosystem/grpc-gateway/v2 | ||
| version: v2.27.4 | ||
| opts: | ||
| - paths=source_relative | ||
| - standalone=true | ||
| - separate_package=true | ||
| deps: | ||
| - plugin: buf.build/protocolbuffers/go:v1.36.10 | ||
|
stefanvanburen marked this conversation as resolved.
Outdated
|
||
| - plugin: buf.build/grpc/go:v1.5.1 | ||
| spdx_license_id: BSD-3-Clause | ||
| license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.27.4/LICENSE | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.