-
Notifications
You must be signed in to change notification settings - Fork 998
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
tonic-reflection: re-expose v1alpha reflection server builder #1787
Conversation
I don't think we can semver-compatibly reverse this change as this PR does (nor do I necessarily think that would be the right approach). I'd suggest adding back the v1alpha stuff under a separate name, and adding a changelog entry in the breaking changes section that calls out this change. |
That is a fair concern. I've gone through and done the appropriate cleanup to make sure the interface has not changed. The I do not believe there should be any breaking change here anymore (the relevant switch from |
The current set of changes makes it too hard for me to review this carefully for semver compatibility. I suggest you make a smaller commit that only moves code around while keeping the public API as is, and a separate commit reintroducing the v1alpha API. |
Sure - I've added #1802 to refactor the module layout. When that has been approved and merged we can revisit latter part of the |
84dbabb
to
c8b571c
Compare
I've now updated this PR to contain the appropriate changes. The diff for the new
|
tonic-reflection/src/server/v1.rs
Outdated
/// A builder used to construct a gRPC Reflection Service. | ||
#[derive(Debug)] | ||
/// A builder used to construct a gRPC Reflection Service (`v1` protocol variant). | ||
#[derive(Default, Debug)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes still seem unrelated to the idea of adding v1alpha
support. I also think they're wrong -- in this case Builder::default()
yields a different value than Builder::configure()
, which seems potentially surprising.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you're right! Didn't think of the consequence of adding the derivation - that change was just to reduce some boilerplate with the initialization in the constructor. I've reverted that part of the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, but there's still a whole bunch of changes with factoring out the parser stuff out of the v1 builder (plus seemingly arbitrary reordering of fields). Again, I'd like to see those in a separate commit or PR. The idea here is to create atomic commits which make it much easier to review the changes (and understand why the changes were made). This is especially when you're both adding a bunch of code (the v1alpha stuff) and moving code around (code that is shared between v1 and v1alpha).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I've reverted the parser and will be repackaging that into a separate PR so that we can keep the changes self-contained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow response -- I think I'd prefer to take the extraction of the parser first in a separate PR (or a separate commit within this PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries! I'll take care of that. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parser has been re-introduced in #1822.
To enable wider support for reflection in tools like *Postman* and *Kreya*, this change reintroduces support for the v1alpha protocol. Changes: * Add v1alpha module with associated Builder * Add tests to verify responses from both versions
c94eb1c
to
b6feac6
Compare
Cleaned up history and rebased towards the lastest master commit. |
Hi, is there some timeline when this might be merged? |
I'm on vacation, will be back next week. |
I took a deeper look at this and wanted to do a somewhat different approach, resulting in #1888. Please give feedback in that PR! |
#1888 has been merged, this can be closed. |
While testing the new tonic 0.12 release, we discovered that #1701 upgraded the reflection protocol to
v1
fromv1alpha
.This breaks compatibility with popular gRPC debugging tools like
Postman
andKreya
, who only use thev1alpha
protocol.Motivation
Upgrading to 0.12 would potentially introduce a degradation in triaging flows since tools supporting the
v1
protocol are limited.Solution
Following the #1802 PR, this reintroduces the
v1alpha
protocol in a separate module.