-
Notifications
You must be signed in to change notification settings - Fork 253
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
Protobuf 3 support #615
Protobuf 3 support #615
Conversation
Hello, just checking in to see if there's interest in pushing this :) thanks |
Thanks for your contributions! Sorry for the delay, I will take a look in following 3 days. |
No rush at all on my side! Knowing that it might move forward at a later point is good for me. thanks |
From what I can see from this PR, there are three type of changes:
|
Hi BusyJay, sorry for the long wait. Thanks for the suggestions, they have been implemented. The upgrade is gated behind a new feature No changes have been made to the defaults. To build/test with protobuf v3: As discussed a lot of changes come from the generated files for v3, which can be ignored. This commit regroups the changes to the various
thanks for your time! |
(Force-push for signoff, sorry) Thanks a lot @mgeisler for the review! |
If the code is too verbose, one option is to refactor some of the protobuf2- and protobuf3-specific getters and setters using macros. I could investigate this if there's interest |
Hello, I apologize for the ping... It's been a month, I'm just wondering what to do with my proposed changes ? Thank you |
Sorry to insist @BusyJay, is there any way forward for this ? Someone else I could bother? |
interop/src/server.rs
Outdated
} | ||
// A workaround for timeout_on_sleeping_server test. | ||
// The request only has 27182 bytes of zeros in payload. | ||
// | ||
// Client timeout 1ms is too short for grpcio. The server | ||
// can response in 1ms. To make the test stable, the server | ||
// sleeps 1s explicitly. | ||
|
||
#[cfg(feature = "protobuf-codec")] | ||
if req.get_payload().get_body().len() == 27182 |
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.
You can move this condition to last so that don't need to repeat all other conditions.
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.
Is this what you have in mind ?
Done. Since the previous presubmit failed due to linting errors, I took the opportunity to clean this up too. Please let me know if this doesn't belong in this PR |
The last CI error doesn't seem related to my changes, and seems fixed on main. Maybe it has been fixed since ? |
Yes, please solve conflicts. |
Done, ty |
OK, CI-wise we should be good (although some tests seem flaky): https://github.com/lb034582341/grpc-rs/actions/runs/5600803677 |
Don't worry, they will be squashed when it's merged. |
@lb034582341 Hi, we may release a new version soon. It would be better if this PR is included to next release. Do you think it can catch the release date (before next week)? |
Yes, that'd be great. |
NB: The CI failed due to flakiness, it passed here: https://github.com/lb034582341/grpc-rs/commits/master |
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Sorry about messing the history, one commit wasn't signed off and DGO was blocking the CI. Simple things first, I addressed your 3 comments in 8be9ef5, 22e7c0e and 610032f I added support for v3 in compiler 40c10a8. I removed the previous code that was wrong (was never compiled due to a feature error). Now this simply calls the rust_protobuf crate. Finally, maybe we want to discard this commit, and keep The comment about xtask required more changes:
Finally, I simplified |
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
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.
Rest LGTM
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
Signed-off-by: Ludovic Barman <ludovicb@google.com>
I've included your changes, thanks for the review. CI passed here https://github.com/lb034582341/grpc-rs/actions/runs/5796423100 |
Thank you! |
Hi @BusyJay, is there anything I can do to help with the release ? |
It was already released in crates.io. I just forgot to update github release page. And the page was just updated. |
Ah, right. Thanks a lot! |
Hello, first time contributor here. Following #584, here's a first draft of the migration to protobuf 3.2. It's a work-in-progress and we'll surely need to iterate to find a good solution.
I haven't gated the changes behind a feature yet (as requested here). I'm not exactly sure how to do this yet.
Also, it seems that for protobuf 3, the functionality of the
compiler/
folder has been factored out in the protobuf-codegen crate. Do we want to keep the folder and call the crate, or update the documentation to directly use the crate ?It's been temporarily removed because it doesn't compile with protobuf 3.2.
The diff is large but only Protobuf 3.2: syntax changes contains meaningful changes (and most of them are trivial).
I have ran tests + clippy successfully.
Feedback is welcome, thanks !