-
Notifications
You must be signed in to change notification settings - Fork 3k
Upgrade to gRPC v4 #47157
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
Upgrade to gRPC v4 #47157
Conversation
/cc @brunobat (opentelemetry), @radcortez (opentelemetry) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🎊 PR Preview 745f5cf has been successfully built and deployed to https://quarkus-pr-main-47157-preview.surge.sh/version/main/guides/
|
This comment has been minimized.
This comment has been minimized.
Hmmm, nothing looks related to gRPC4 ootb ... |
This comment has been minimized.
This comment has been minimized.
1033edf
to
897080e
Compare
Will prepare a PR to upgrade OTel and the OTLP protocol. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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 changes look good, but the pulsar failures looked related.
e2163da
to
a09251e
Compare
This comment has been minimized.
This comment has been minimized.
@alesj I've updated otel in the branch |
This comment has been minimized.
This comment has been minimized.
Did you add this commit / change to this branch?
So that I don’t remove it with some force-push … as I already did a few
times :)
…On Sat, 16 Aug 2025 at 15:45, George Gastaldi ***@***.***> wrote:
*gastaldi* left a comment (quarkusio/quarkus#47157)
<#47157 (comment)>
@alesj <https://github.com/alesj> in #49557
<#49557> I have solved the
native compilation issue by moving the google dep to be the first one.
Also, would bumping Pulsar to 4.0.6 help?
—
Reply to this email directly, view it on GitHub
<#47157 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACRA6HC5QC2ZAYW24M2D4L3N4YWJAVCNFSM6AAAAAB2MUYZO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOJTGY3TQNJQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
How to know what all is missing?
Apart from this RuntimeVersion class …
Can you explain a bit more about this double generation?
…On Sun, 17 Aug 2025 at 17:01, Clement Escoffier ***@***.***> wrote:
*cescoffier* left a comment (quarkusio/quarkus#47157)
<#47157 (comment)>
I doubt that bumping Pulsar helps. We will have to be smart, and detect if
there is ptoto3 on the classpath and include what needs to be included in
this case (and maybe we will have to run the generation twice).
—
Reply to this email directly, view it on GitHub
<#47157 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACRA6E6GD4OGGTGVCBZXPD3OCKMXAVCNFSM6AAAAAB2MUYZO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOJUGQ2DCNZZGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It's in the PR, but I closed it as the upgrade was reverted in #49560 |
Double generation means generating for both proto 3 and proto 4. |
Bumping Pulsar doesn't make a difference. It still uses proto3. But I think grpc 4 is somewhat compatible with protobuf3, what is why jvm tests and native with incomplete classpath passes. |
Exactly ... but since |
The problem is that the version in the proto file doesn't mean much, what matters most is what is on the classpath. |
Which makes sense. Either we maintain two versions of this extension for v3 and v4, or we have guidelines for applications to continue using the grpc v3 correctly. |
What's correctly in this case? :-) We need v4 for the OpenTelemetry upgrade -- otherwise we're stuck on some old version forever. |
The major issue with the incomplete classpath option is that it's for everything. Basically, you are breaking the Quarkus close-world assumption. So we need to see what can be done, but an incomplete classpath should not be the preferred solution. |
I just doubt it's worth spending so much time for this Pulsar gRPC v3 native issue. For the tests purpose to work, we could just add that class ourselves ... |
That would be quite a regression and this is just one example - there are other dependencies out there that will have the same issue. |
Exactly. |
@alesj @cescoffier @ozangunalp We really need to use gRPC v4. PS: Please note this PR was later reverted. |
Until we have ITs showing that we can have dependencies including gRPC v3 and gRPC v4 stubs side by side, we cannot really move forward. |
I mean ITs with:
|
Uh, we might still be screw... (I thought this worked for me ... but was probably some weird config that made it work when I tested it "by hand"). This comes from my
And why the failure (afais)? The Pulsar ReflectData code does this
since old
hence it was a plain class (aka Class), but "new" GeneratedMessageV3 (from proto4) looks like
so it's a parameterized class (not a Class, but TypeVariableImpl). @cescoffier @ozangunalp any other idea ... ? |
Hmmm, let me try substituting this ReflectData::createSchema with something that would understand both GeneratedMessageV3 versions ... |
@alesj I will look at this asap. |
@alesj Is it Pulsar code (hand written) or in the code generated by protoc embedding in the Pulsar jar? |
The problem is actually in Avro code (doh!) -- see ReflectData class, better ReflectData::createSchema. This part of code assumes that the Map's type arguments are plain classes, not parameterized ... which is a bold assumption, so wondering how this ever worked ...
I'm now playing with ASM to try and fix this ... |
Do you mean Pulsar is using Avro classes that do not support gRPC 4? (what is problematic is not supporting gRPC 3 and 4 together, but implementation details outside of that are out of scope) |
Hmm, it's actually not the new GeneratedMessageV3 fault, but something inside it:
|
For some reason this
... it goes recursively in, but at some point this becomes just a |
Well, w/o the type this will never work ... so the question is why does that
From:
|
@alesj, I at last had some time to take a look at this. Take a look: main...ozangunalp:quarkus:grpc4_v2 First issue I've found is, for Pulsar channels the schema wasn't detected correctly. Because the sub-module did not include jandex indexes, the pulsar extension did not find the class in the index and do the schema detection, hence fallback to JSONSchema. Here, there is something that caught me off guard: With the beans.xml files available in sub-modules, the combined index during normal build included classes coming from those modules. BUT the native build augmentation did not include those classes, unless I add the Second was a native compilation issue. I had to put the grpc4 class JavaFeaturesProto as runtime init. Third, there was an issue with the GreeterTestIT grpc test. I also reverted the class visitor you've added. @cescoffier, we may need more tests, but this does not look too bad. Meaning classes generated with proto3 and proto4 can actually co-exist. |
Awesome @ozangunalp |
Lets see how far we get with CI -- hence this is not a draft ...
... and @brunobat needs this asap ...
Tests pass locally ...
@gsmet apology in advance for using your resources :-)