Symptom: Quarkus fails at build time with Multiple extensions request different versions of Elasticsearch for Dev Services #50872
-
|
I am developing a quarkus project as a part of a team, and we are using hibernatesearch to manage entities and to search the elasticsearch data. For a few features we need elasticsearch-java-client. But when I added the client dependency I started getting the exception from the title when I start the application in dev mode, or when running tests. It doesn't happen every time, but it occurs often enough that it fails our CI/CD pipeline when trying to run tests. I found other discussions related to this issue, but none have helped to fix my problem. I have tried every combination of properties to disable hibernatesearch devservices, and leave elasticsearch, and vice versa. But whatever I try the exception happens. This is in my pom.xml: ` ` ` quarkus.elasticsearch.hosts=localhost:9200 quarkus-elasticsearch-rest-client_quarkus-elasticsearch-connection-timeout=10s #hibernate-search %prod.hibernate-search-orm.elasticsearch.hosts=localhost:9200 `
During my investigation, I set a breakpoint in the DevServicesElasticsearchProcessor inside the
and when it compares them the exception is thrown. I have tried upgrading the project to version 3.9.5, and to 3.11.x. but the issue persists. And at the moment a version upgrade is the last option for our project, so I would like to find another avenue to fix this issue. Can you help me with this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
/cc @geoand (devservices), @gsmet (elasticsearch), @holly-cummins (devservices), @loicmathieu (elasticsearch), @marko-bekhta (elasticsearch), @ozangunalp (devservices) |
Beta Was this translation helpful? Give feedback.
-
|
Hi @elvedins-monri 👋🏻 🙂 It is a current limitation reagarding the Elasticsearch devservices: there can only be one, and if multiple extensions request different versions, then there's the exception that you've encountered.
yeah 😔 looking at the way the checks are done in the Thanks for bringing this up! I'll send a patch for this later today. |
Beta Was this translation helpful? Give feedback.
Hi @elvedins-monri 👋🏻 🙂
It is a current limitation reagarding the Elasticsearch devservices: there can only be one, and if multiple extensions request different versions, then there's the exception that you've encountered.
We are working on removing that limitation and allowing to have multiple Elasticseach services running (with any versions that the particular extensions request).
So with that in mind, changing to the newer version of Quarkus won't help for now.
yeah 😔 looking at the way the checks are done in the
DevservicesElasticsearchBuildItemsConfigurationthe order…