Onto-Med / top-backend

Spring Boot based backend of the TOP Framework
MIT License
0 stars 1 forks source link

Elasticsearch health check failed #207

Closed fmatthies closed 4 months ago

fmatthies commented 4 months ago

There is no (overt) elasticsearch spring dependency anymore in the backend, but it still runs the healthcheck.

fmatthies commented 4 months ago

[fmatthies] Okay, but this means that the spring-boot-starter-parent still has the elasticsearch-rest-client as a dependency. It shouldn't be in there anymore, as all the ES logic is in the top-document-query. [ChristophB] spring-boot-starter-parent only enforces the version of elasticsearch-rest-client, in case the dependency is used at all. [fmatthies] Hm, could this also be why the health check is still run (https://github.com/Onto-Med/top-backend/issues/207) even if the top-backend only has elasticsearch as a transitive dependency? [ChristophB] Yes this could be the reason, because the Spring framework detects the transitive dependency and decides to perform the check - at least that is my guess.

ChristophB commented 4 months ago

This could be of help: https://www.baeldung.com/spring-boot-health-indicators#2-disabling-the-indicator

fmatthies commented 4 months ago

Seems to work... I was sure I tried something like that once.