Skip to content

Conversation

mangalaman93
Copy link
Member

No description provided.

@mangalaman93 mangalaman93 marked this pull request as ready for review March 13, 2025 04:08
@Copilot Copilot AI review requested due to automatic review settings March 13, 2025 04:08
@mangalaman93 mangalaman93 requested a review from a team as a code owner March 13, 2025 04:08
@github-actions github-actions bot added area/testing Testing related issues area/enterprise Related to proprietary features area/graphql Issues related to GraphQL support on Dgraph. area/bulk-loader Issues related to bulk loading. area/backup Related to binary backups area/core internal mechanisms go Pull requests that update Go code labels Mar 13, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes deprecated gRPC connection methods by replacing calls to grpc.Dial and grpc.DialContext with grpc.NewClient and updating related connection options.

  • Replace grpc.WithBackoffMaxDelay with grpc.WithConnectParams using the new backoff configuration
  • Update connection establishment calls in production and test files to use grpc.NewClient
  • Ensure consistency across components that rely on gRPC connections

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
conn/pool.go Updated connection creation and backoff configuration
dgraph/cmd/zero/zero_test.go Replaced DialContext with NewClient in tests
graphql/e2e/common/common.go Updated client creation in GraphQL bootstrap
ee/backup/run.go Updated backup restore client connection creation
testutil/zero.go Replaced grpc.Dial with grpc.NewClient in test utilities
dgraph/cmd/bulk/loader.go Updated client creation for bulk loader backup operations
testutil/client.go Updated client creation in test utilities
systest/backup/filesystem/backup_test.go Replaced Dial with NewClient for filesystem backup tests
systest/export/export_test.go Updated export test gRPC connection creation
systest/online-restore/online_restore_test.go Updated multiple client connections for online restore tests
graphql/e2e/common/schema.go Updated schema test client connection creation
dgraphtest/local_cluster.go Replaced Dial with NewClient for local cluster client connections
systest/backup/minio/backup_test.go Updated minio backup test gRPC connection creation
graphql/e2e/common/admin.go Updated admin test client connection creation
dgraph/cmd/alpha/mutations_mode/mutations_mode_test.go Updated mutations mode tests with NewClient instead of Dial
systest/backup/nfs-backup/backup_test.go Updated NFS backup test client connection creation
graphql/e2e/common/query.go Updated client creation for query tests
graphql/e2e/common/mutation.go Updated mutation test client connection creation
graphql/e2e/common/error.go Updated error test client connection creation
systest/backup/minio-large/backup_test.go Updated minio-large backup test gRPC connection creation
Comments suppressed due to low confidence (3)

conn/pool.go:179

  • Verify that grpc.NewClient correctly handles connection timeouts and context cancellation, as its behavior may differ from grpc.DialContext.
conn, err := grpc.NewClient(addr, conOpts...)

dgraph/cmd/zero/zero_test.go:52

  • Confirm that removing the grpc.WithBlock option does not cause race conditions in tests, as connection establishment might behave asynchronously with grpc.NewClient.
con, err := grpc.NewClient(testutil.SockAddrZero, dialOpts...)

dgraphtest/local_cluster.go:777

  • Check that using grpc.NewClient in this health check context maintains the expected retry behavior and service configuration provided by grpc.WithDefaultServiceConfig.
conn, err := grpc.NewClient(url, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultServiceConfig(retryPolicy))

Copy link

trunk-io bot commented Mar 13, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@mangalaman93 mangalaman93 enabled auto-merge (squash) March 13, 2025 05:52
@mangalaman93 mangalaman93 merged commit e4b7425 into main Mar 13, 2025
14 checks passed
@mangalaman93 mangalaman93 deleted the aman/grpc branch March 13, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backup Related to binary backups area/bulk-loader Issues related to bulk loading. area/core internal mechanisms area/enterprise Related to proprietary features area/graphql Issues related to GraphQL support on Dgraph. area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

2 participants