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

Broken grpc.WithBalancerName #239

Closed
metalmatze opened this issue May 3, 2022 · 5 comments · Fixed by #254
Closed

Broken grpc.WithBalancerName #239

metalmatze opened this issue May 3, 2022 · 5 comments · Fixed by #254

Comments

@metalmatze
Copy link

metalmatze commented May 3, 2022

After updating to google.golang.org/grpc v1.46.0 I cannot compile anymore with the following error:

../../../../pkg/mod/github.com/weaveworks/common@v0.0.0-20210913144402-035033b78a78/httpgrpc/server/server.go:137:8: undefined: grpc.WithBalancerName

It seems that the WithBalancerName was actually removed in grpc after it was deprecated for some time grpc/grpc-go#5232

The code in this repository that needs updating can be found here:

grpc.WithBalancerName(roundrobin.Name),

@bboreham
Copy link
Collaborator

bboreham commented May 3, 2022

Thanks for spotting this. Upgrades to gRPC are always a bit fraught.

That said, I think httpgrpc server.NewClient can be deleted. It isn't used in Cortex or Mimir, or in the Grafana Labs closed-source relating to those projects, and I also well remember removing its usage from Weaveworks' closed source.

It might be a bit more polite to replace with:

const grpcServiceConfig = `{"loadBalancingPolicy":"round_robin"}`
grpc.WithDefaultServiceConfig(grpcServiceConfig),

MarcoPolo added a commit to libp2p/go-libp2p that referenced this issue Jul 5, 2022
MarcoPolo added a commit to MarcoPolo/lotus that referenced this issue Jul 5, 2022
MarcoPolo added a commit to libp2p/go-libp2p that referenced this issue Jul 7, 2022
* Update core dep

* Downgrade grpc issue due to: weaveworks/common#239

* Use released versions for resource-manager and go-libp2p-core

* Use released version of go-libp2p-testing
@ryepup
Copy link

ryepup commented Aug 2, 2022

I was able to workaround this by using another version of grpc: go get -d google.golang.org/grpc@v1.45.0. The packages I wanted to use with weaveworks/common were able to work that that version of grpc.

@lukasmalkmus
Copy link

I was able to workaround this by using another version of grpc: go get -d google.golang.org/grpc@v1.45.0. The packages I wanted to use with weaveworks/common were able to work that that version of grpc.

Lucky guy. I'm stuck on OpenTelemetry Go v1.6.3 as later versions require gRPC > v1.45.0 and another dependency relies on weaveworks/common :/

Unfortunately only workaround seems to be to add a replace to a fork that contains a fix.

@bboreham
Copy link
Collaborator

bboreham commented Aug 9, 2022

Is your problem fixed by #240 ? Please comment there if you have tested it for forwards/backwards compatibility.

@lukasmalkmus
Copy link

Yes, it is fixed by #240! I replaced it in my go.mod with that branch. Unfortunately I have not tested it for forwards/backwards compatability as I only depend on this package because it is imported by grafana/loki. I directly depend on a newer version of google.golang.org/grpc.

jpkrohling added a commit to jpkrohling/common that referenced this issue Aug 26, 2022
Fixes weaveworks#239, based on weaveworks#240.

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
jpkrohling added a commit to jpkrohling/common that referenced this issue Aug 29, 2022
This is a simplified version of weaveworks#240, without touching the gRPC versions.

Fixes weaveworks#239

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
hanyuting8 added a commit to hanyuting8/thanos that referenced this issue Jan 19, 2024
1、In the replace of go.mod, due to weaveworks/common#239, The grpc version is 1.45.0, but there are vulnerabilities in this version. In order to fix CVE-2023-44478, the grpc version needs to be upgraded to 1.57.2
2、In order to upgrade GRPC, the version of weaveworks/common also needs to be upgraded, otherwise the build will fail

Signed-off-by: hanyuting8 <hytxidian@163.com>
yeya24 pushed a commit to thanos-io/thanos that referenced this issue Jan 21, 2024
1、In the replace of go.mod, due to weaveworks/common#239, The grpc version is 1.45.0, but there are vulnerabilities in this version. In order to fix CVE-2023-44478, the grpc version needs to be upgraded to 1.57.2
2、In order to upgrade GRPC, the version of weaveworks/common also needs to be upgraded, otherwise the build will fail

Signed-off-by: hanyuting8 <hytxidian@163.com>
MichaHoffmann pushed a commit to MichaHoffmann/thanos that referenced this issue Feb 11, 2024
1、In the replace of go.mod, due to weaveworks/common#239, The grpc version is 1.45.0, but there are vulnerabilities in this version. In order to fix CVE-2023-44478, the grpc version needs to be upgraded to 1.57.2
2、In order to upgrade GRPC, the version of weaveworks/common also needs to be upgraded, otherwise the build will fail

Signed-off-by: hanyuting8 <hytxidian@163.com>
MichaHoffmann pushed a commit to MichaHoffmann/thanos that referenced this issue Feb 11, 2024
1、In the replace of go.mod, due to weaveworks/common#239, The grpc version is 1.45.0, but there are vulnerabilities in this version. In order to fix CVE-2023-44478, the grpc version needs to be upgraded to 1.57.2
2、In order to upgrade GRPC, the version of weaveworks/common also needs to be upgraded, otherwise the build will fail

Signed-off-by: hanyuting8 <hytxidian@163.com>
Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
jnyi pushed a commit to jnyi/thanos that referenced this issue Apr 4, 2024
1、In the replace of go.mod, due to weaveworks/common#239, The grpc version is 1.45.0, but there are vulnerabilities in this version. In order to fix CVE-2023-44478, the grpc version needs to be upgraded to 1.57.2
2、In order to upgrade GRPC, the version of weaveworks/common also needs to be upgraded, otherwise the build will fail

Signed-off-by: hanyuting8 <hytxidian@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants