-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Elasticsearch Java Client #22622
Elasticsearch Java Client #22622
Conversation
@stuartwdouglas rumors said you may have an idea to workaround the issue of Javax vs Jakarta EE, if so, when you'll back from PTO, can you share some throughts ? |
03765a5
to
4133596
Compare
@loicmathieu what zulip conversation are you referring to? Any updates on this since the last comment? |
@m-stramel I open a new discussion on Zulip https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Jakarta.20JSON and well, don't expect it to be soon as the Jakarta migration will take some time. |
4133596
to
cb668b2
Compare
cb668b2
to
32ae1db
Compare
5d4ed03
to
7ecb472
Compare
This comment has been minimized.
This comment has been minimized.
7ecb472
to
3dc1572
Compare
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.
I think there are a few things you should remove, see below.
Otherwise, this makes sense. I just checked and the client really is opensource: https://github.com/elastic/elasticsearch-java
This client probably won't work with OpenSearch, but then we can always add another extension for OpenSearch.
However, the problem remains that these clients are forward-compatible, not backward-compatible:
The Elasticsearch Java client is forward compatible; meaning that the client supports communicating with greater or equal minor versions of Elasticsearch. Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.
This means that upgrading the version of the client in Quarkus will force users to upgrade their cluster...
I don't know how acceptable this is, but we will need to discuss this before this extensions leaves preview.
extensions/elasticsearch-java-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml
Show resolved
Hide resolved
integration-tests/elasticsearch-java-client/src/main/resources/META-INF/resources/fruits.html
Outdated
Show resolved
Hide resolved
integration-tests/elasticsearch-java-client/src/main/resources/META-INF/resources/index.html
Outdated
Show resolved
Hide resolved
...s/elasticsearch-java-client/src/test/java/io/quarkus/it/elasticsearch/FruitResourceTest.java
Show resolved
Hide resolved
This is on my todo list ;)
I think the same applied to the High Level Client but was not as clearly stated as now. The Java client uses the low level rest client under the cover, as the High Level Client does. So for me it's the same caveat at the existing High Level Client. |
Oh certainly, that's not new. But that was one of the reasons why the High Level client never left preview. We can't reasonably guarantee backwards compatibility or timely updates in case of CVEs if that's all the client can offer us... I don't really have a solution, just saying this is a problem and we'll need to agree on a solution. |
This is a limitation of this client and we don't have a solution. We can warn the user but again, as we don't have a solution and it's a decision we didn't take it's difficult to answer questions about it that will arise if we add some sentence warning about it in our guide. To be honest, I used the high level rest client in multiple projects and we didn't had the issue as long as major versions are the same. I expect the same for the Java client (it is automatically build from the REST API so as long as the REST API didn't have breaking change the client will not have any). Competitors framework already include this client and people will start asking for it, especially now that the high level client is stuck at 7.10. I know it's not a reason to offer a new extension but it's something to take into consideration. And it will allow us to remove the high level client extension after a few release cycle :). So even if it's not a great solution, I think it's the better we can offer. |
Native build is failing, I'll have a look in the next few days. |
This comment has been minimized.
This comment has been minimized.
9943fce
to
5912d08
Compare
@zakkak the native build of this PR failed with the following error :
However, the method |
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.
LGTM, though I added a suggestion regarding the preview status and I think a (very basic) documentation page would be necessary for the extension to get some visibility :)
And of course we'll have to wait for Guillaume to lift the Jakarta embargo :)
extensions/elasticsearch-java-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml
Show resolved
Hide resolved
@@ -0,0 +1,14 @@ | |||
--- | |||
artifact: ${project.groupId}:${project.artifactId}:${project.version} | |||
name: "Elasticsearch Java Client" |
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.
I didn't notice this before, but I think documentation is missing, do you think you could add a page?
It doesn't need to be extensive, even just stating what the extension is, what the entry point is (the client class), and including the configuration reference would be a start.
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.
I planned to add a documentation and a quickstart later on but as this PR will be on ice for some time I'll do it in the same PR.
The documentation will be on the already existing Elasticsearch guide and I'll update the section about the high level client to explain that the java one is prefered.
144e248
to
acf9b2b
Compare
This comment has been minimized.
This comment has been minimized.
acf9b2b
to
5f34090
Compare
This comment has been minimized.
This comment has been minimized.
5f34090
to
d7f217b
Compare
I rebased on top of the Jakarta transformation. |
Failing Jobs - Building d7f217b
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 11 Windows #- Failing: extensions/resteasy-reactive/rest-client-reactive/deployment
! Skipped: extensions/keycloak-admin-client-reactive/deployment extensions/oidc-client-reactive-filter/deployment extensions/oidc-token-propagation-reactive/deployment and 19 more 📦 extensions/resteasy-reactive/rest-client-reactive/deployment✖
|
@loicmathieu I'm going to merge this one. Could you prepare some basic documentation before we release 3.0? Thanks! |
@gsmet thanks for the rebase. Sure I will prepare some documentation and quickstarts for this one. |
Hey @loicmathieu, did you find the time to work on documentation? I couldn't find it. |
@yrodiere no, I plan to work on it this week. Don't hesitate to ping me if you didn't see the PR for it this week ;) |
Prototype of an Elasticsearch Java Client.
As discussed on Zulip, it cannot work untill we move to jakarta EE or we find a workaround for the
Caused by: java.lang.NoClassDefFoundError: jakarta/json/spi/JsonProvider