fix(run): migrate grpc server and remove deprecated calls#5575
Conversation
There was a problem hiding this comment.
Code Review
This pull request performs a comprehensive update of Go dependencies across several modules, including custom-metrics, grpc-ping, grpc-server-streaming, and service-health. Key changes include migrating from the deprecated ptypes package to google.golang.org/protobuf, updating gRPC connection methods from grpc.Dial to grpc.NewClient, and refactoring the streaming server to use time.Ticker for better resource management. Review feedback identifies high-severity issues where insufficient error handling after connection attempts could lead to nil pointer panics during deferred cleanup. Additionally, it is recommended to use generated protobuf getters to safely access nested fields and avoid potential panics.
0c9299d to
28db49a
Compare
28db49a to
e9af80b
Compare
Description
This PR modernizes our gRPC client implementation and proto-timestamp handling. It removes several heavily deprecated APIs (such as
grpc.Dial,grpc.WithInsecure(), and the legacyptypespackage) and aligns our codebase with the standards required by gRPC v1.80.0 and flagged as vulnerability alerts:Additionally, it resolves a potential memory leak in our streaming endpoint by switching from loop-bound
time.Afterchannels to a reusabletime.Ticker.Fixes Internal: b/513615351
Checklist
go test -v ./..(see Testing)gofmt(see Formatting)go vet(see Formatting)