Skip to content

fix(run): migrate grpc server and remove deprecated calls#5575

Merged
iennae merged 1 commit into
GoogleCloudPlatform:mainfrom
amcolin:migrate-grpc-version
May 19, 2026
Merged

fix(run): migrate grpc server and remove deprecated calls#5575
iennae merged 1 commit into
GoogleCloudPlatform:mainfrom
amcolin:migrate-grpc-version

Conversation

@amcolin
Copy link
Copy Markdown
Contributor

@amcolin amcolin commented May 18, 2026

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 legacy ptypes package) 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.After channels to a reusable time.Ticker.

Fixes Internal: b/513615351

Checklist

  • I have followed Contributing Guidelines from CONTRIBUTING.MD
  • Tests pass: go test -v ./.. (see Testing)
  • Code formatted: gofmt (see Formatting)
  • Vetting pass: go vet (see Formatting)
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@product-auto-label product-auto-label Bot added api: run Issues related to the Cloud Run API. samples Issues that are directly related to samples. labels May 18, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread run/grpc-ping/client/client.go
Comment thread run/grpc-server-streaming/client/client.go
Comment thread run/grpc-ping/client/client.go Outdated
@amcolin amcolin force-pushed the migrate-grpc-version branch from 0c9299d to 28db49a Compare May 18, 2026 20:20
@amcolin amcolin marked this pull request as ready for review May 18, 2026 20:48
@amcolin amcolin requested review from a team as code owners May 18, 2026 20:48
@amcolin amcolin force-pushed the migrate-grpc-version branch from 28db49a to e9af80b Compare May 19, 2026 21:31
@iennae iennae merged commit e18ed41 into GoogleCloudPlatform:main May 19, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: run Issues related to the Cloud Run API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants