-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
SmallRye GraphQL 1.2.8 and client configuration fixes #18478
Conversation
@jmartisk for my understanding, how does it fix the native issue? |
I'm just finding out I don't know that either. Hold on, might still need some adjustments |
This workflow status is outdated as a new workflow run has been triggered. 🚫 This workflow run has been cancelled. Failing Jobs - Building f35b85f
|
Ok so in the end the previous fix was good, but I've improved the integration tests to be sure. The first problem was caused by a bad regular expression that did not expect that a configured client name can contain dashes. Now it should accept dashes, numbers and underscores in addition to the English alphabet. The second problem (with native mode) is because we were depending on TCCL as a key for storing the client configuration map in a static map (this is to be able to support app servers with potentially multiple applications). But in native mode, this becomes a problem because at build-time, the class loader is different than the one at runtime. I changed that so that in Quarkus, we assume there is only one application, so no need to distinguish using the TCCL. The reason why native mode tests in quarkus core didn't catch this is that there was a fallback - if the configuration-storing bean is broken or inaccessible, we just ignored it. And that worked in the integration-tests module, because there was no client configuration in Generally I had to rework the integration tests quite a bit, because now that the client depends more heavily on CDI (in most cases it's necessary), we hit the problem that CDI does not work in native mode tests on the "client" side (from the I also fixed one minor problem where the client's |
f35b85f
to
7924966
Compare
7924966
to
2bdf1a0
Compare
This workflow status is outdated as a new workflow run has been triggered. 🚫 This workflow run has been cancelled. Failing Jobs - Building f35b85f
|
This workflow status is outdated as a new workflow run has been triggered. 🚫 This workflow run has been cancelled. Failing Jobs - Building 7924966
|
A pair of eyes to try the quickstart with this change would be welcome. I tested it, but, you know... |
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.
Hmmm, I don't know if it's normal but before if the URL was not configured, I had a nice (but misleading as reported) error message.
Now I get:
Caused by: java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:221)
at org.jboss.resteasy.reactive.client.impl.ClientImpl.target(ClientImpl.java:150)
at io.smallrye.graphql.client.typesafe.jaxrs.JaxRsTypesafeGraphQLClientBuilder.build(JaxRsTypesafeGraphQLClientBuilder.java:81)
at io.quarkus.smallrye.graphql.client.runtime.SmallRyeGraphQLClientRecorder.lambda$typesafeClientSupplier$0(SmallRyeGraphQLClientRecorder.java:20)
I don't think this is an improvement :).
To reproduce, just comment the first URL in the quickstart application.properties
.
Hey, in the first case you were referring to the dynamic client, this example is for a typesafe client. Yeah, they behave a bit differently, which is probably also bad. |
@jmartisk OK so I also commented the other one and I get:
and if I define:
as recommended by the message, I still get the error as I initially reported it. Did I miss something? |
Oh fuck me, I realize the error message is wrong. It should be |
@jmartisk and in an ideal world, it would be even cooler if we could recommend the Quarkus version of the property :). |
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.
OK, let's merge this, it fixes the native issue, which is good. I'll let @jmartisk iterate on the rest of the issues.
Fixes #18457