plugins icon indicating copy to clipboard operation
plugins copied to clipboard

Make grpc gateway v2.21.0

Open oliversun9 opened this issue 1 year ago • 2 comments

Ran go run ./internal/cmd/fetcher plugins/grpc-ecosystem and updated the patch for the version.

upstream release changelog

Patch diff:

diff plugins/grpc-ecosystem/gateway/v2.21.0/separate_pkg_additional_imports.patch plugins/grpc-ecosystem/gateway/v2.20.0/separate_pkg_additional_imports.patch
71c71
< index 684fc5b6..c1b69363 100644
---
> index 421c0089..26bed31a 100644
88c88
< @@ -255,6 +262,9 @@ func (r *Registry) loadFile(filePath string, file *protogen.File) {
---
> @@ -252,6 +259,9 @@ func (r *Registry) loadFile(filePath string, file *protogen.File) {
577c577
< index 9975e424..13332ef7 100644
---
> index ffe4d413..fdd9bc5b 100644
649c649
< @@ -606,6 +624,9 @@ func local_request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ct
---
> @@ -606,12 +624,18 @@ func local_request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ct
659c659
< @@ -613,6 +634,9 @@ func local_request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ct
---
>  // UnaryRPC     :call {{$svc.GetName}}Server directly.
662d661
<  // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
669c668
< @@ -664,6 +688,7 @@ func Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Server(ctx context.Context,
---
> @@ -663,6 +687,7 @@ func Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Server(ctx context.Context,
677c676
< @@ -671,6 +696,9 @@ func Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Server(ctx context.Context,
---
> @@ -670,6 +695,9 @@ func Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Server(ctx context.Context,
687c686
< @@ -693,18 +721,26 @@ func Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}FromEndpoint(ctx context.Co
---
> @@ -692,18 +720,26 @@ func Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}FromEndpoint(ctx context.Co
707c706
<  // "{{$svc.InstanceName}}Client" to call the correct interceptors. This client ignores the HTTP middlewares.
---
>  // "{{$svc.InstanceName}}Client" to call the correct interceptors.
714c713
< @@ -785,5 +821,9 @@ var (
---
> @@ -784,5 +820,9 @@ var (
726c725
< index 086a4624..5f65b894 100644
---
> index 5a1e6977..7e89ad1c 100644
737c736
< @@ -36,6 +37,7 @@ var (
---
> @@ -35,6 +36,7 @@ var (
745c744
< @@ -73,15 +75,22 @@ func main() {
---
> @@ -58,15 +60,22 @@ func main() {
772c771
< @@ -135,6 +144,7 @@ func applyFlags(reg *descriptor.Registry) error {
---
> @@ -120,6 +129,7 @@ func applyFlags(reg *descriptor.Registry) error {

oliversun9 avatar Jul 29 '24 13:07 oliversun9

You'll also need to run the following command to generate the checksum file:

make test PLUGINS="grpc-ecosystem/gateway:v2.21.0" 

mfridman avatar Jul 29 '24 13:07 mfridman

Okay @oliversun9, you fixed the tests and the fetcher is back to working. https://github.com/bufbuild/plugins/pull/1387

Can you look at go-grpc first, get that fixed up and then we'll pick this patch up last.

Please also enable these, effectively undoing https://github.com/bufbuild/plugins/pull/1384

mfridman avatar Jul 29 '24 14:07 mfridman

Can you remind me, was it primarily a few Go comments that changed between the previous diff and the current diff that lead to a merge conflict?

mfridman avatar Jul 31 '24 15:07 mfridman

Can you remind me, was it primarily a few Go comments that changed between the previous diff and the current diff that lead to a merge conflict?

Yes, the plugin generates two extra lines of comments. Also just updated PR description to show that.

oliversun9 avatar Jul 31 '24 15:07 oliversun9