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

test(server/grpc): avoid using deprecated protoreflect function #15221

Merged
merged 3 commits into from
Mar 1, 2023

Conversation

mark-rushakoff
Copy link
Member

@mark-rushakoff mark-rushakoff commented Mar 1, 2023

Description

NewClient was deprecated in favor of NewClientAuto, in jhump/protoreflect v1.14.0. Dependabot recently updated us from v1.12 to v1.15, and the linter has been complaining about the use of the deprecated function.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code

NewClient was deprecated in favor of NewClientAuto, in
jhump/protoreflect v1.14.0. Dependabot recently updated us from v1.12 to
v1.15, and the linter has been complaining about the use of the
deprecated function.
@mark-rushakoff mark-rushakoff requested a review from a team as a code owner March 1, 2023 14:32
Copy link
Member

@facundomedica facundomedica left a comment

Choose a reason for hiding this comment

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

ty, I've seen it but wasn't sure which was the right option

@julienrbrt
Copy link
Member

ty, I've seen it but wasn't sure which was the right option

Same, there are a few new features in v1.15.
Probably Amaury should still have a look (ref #15173 (comment))

// NOTE(fdymylja): we use grpcreflect because it solves imports too
// so that we can always assert that given a reflection server it is
// possible to fully query all the methods, without having any context
// on the proto registry
rc := grpcreflect.NewClient(ctx, stub)
rc := grpcreflect.NewClientAuto(ctx, s.conn)
Copy link
Member

Choose a reason for hiding this comment

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

Why not NewClientV1Alpha to keep the same behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

The deprecation note says:

Use NewClientV1Alpha if you are intentionally pinning the v1alpha version of the reflection service.

I don't imagine we are intentionally pinning v1alpha here, are we?

@julienrbrt julienrbrt added the A:automerge Automatically merge PR once all prerequisites pass. label Mar 1, 2023
@julienrbrt julienrbrt enabled auto-merge (squash) March 1, 2023 16:35
@julienrbrt julienrbrt merged commit 9150a9d into main Mar 1, 2023
@julienrbrt julienrbrt deleted the mr/protoreflect-avoid-deprecated branch March 1, 2023 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants