-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Tracking Issue for MetadataUtils being Experimental. #1789
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
Comments
Should this apply to the other public methods in |
The two interceptors are stable. This only applies to the stub-modifying convenience methods (which explicitly reference this issue in their |
Would it be possible to stabilize these now? |
I think I'm most tempted to delete them. The interceptors can be used from stubs as well, the interceptors fit better into the fluent configuration of stubs, and I don't think we really want people creating similar stub-accepting APIs as they will either only have the stub API or have to duplicate the API for interceptor as well. The main benefit of these stub APIs is they have short method names. But nothing prevents us from having shorter names for the interceptor-based methods. |
(It is true they have existed for a long time and current users aren't really hurt by them. We should look into how often they are used and factor that in.) |
Deleting them is fine as far as I'm concerned. This just came up because I was telling someone on a review to use non-experimental |
Okay, sounds good. I've added this to the "API review" meeting next Thursday to get input from more maintainers. These methods are very cheap to maintain, so I think it is a discussion about "what should 'normal' APIs for this sort of stuff look like." To be clear: when I say "delete them", we'd do that slowly. We'd mark them |
API review:
So I'll be marking this deprecated soon. And then it'll sit there for a year or more before deleting, because it has been there a long time and doesn't hurt much, especially if marked deprecated so people wouldn't copy the approach. |
One interesting detail I just noticed: this class is in stub but with the removal wouldn't actually depend on the stubs at all. Looked it up: MetadataUtils actually predates ClientInterceptor itself, since we were using it to test Metadata and Metadata predated the ClientInterceptor convenience. We had the interceptor concept but it was "manually pass Channel into your interceptor's constructor and then delegate". ClientInterceptor came about 1.5 months later. |
We don't want other APIs to copy the stub-based API to attach the interceptor. The API has a shorter name, but isn't actually all that easier to use and isn't fluent like using the interceptor API. These are _very_ old methods, so we won't be quick to delete them. Seems we should have them deprecated at least a year or two; they are easy to maintain in the mean time. See API Review notes in grpc#1789
We don't want other APIs to copy the stub-based API to attach the interceptor. The API has a shorter name, but isn't actually all that easier to use and isn't fluent like using the interceptor API. These are _very_ old methods, so we won't be quick to delete them. Seems we should have them deprecated at least a year or two; they are easy to maintain in the mean time. See API Review notes in grpc#1789
We don't want other APIs to copy the stub-based API to attach the interceptor. The API has a shorter name, but isn't actually all that easier to use and isn't fluent like using the interceptor API. These are _very_ old methods, so we won't be quick to delete them. Seems we should have them deprecated at least a year or two; they are easy to maintain in the mean time. See API Review notes in #1789
Specific usages:
MetadataUtils.attachHeaders
MetadataUtils.captureMetadata
The text was updated successfully, but these errors were encountered: