quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.73k stars 2.67k forks source link

Elasticsearch Dev Services restarts container on every auto-compile #30384

Closed apatrida closed 1 year ago

apatrida commented 1 year ago

Describe the bug

In DevMode, when having ElasticSearch dev services enabled and you modify code, causing dev mode to recompile, it restarts the ElasticSearch container on build.

This is not supposed to happen if configuration does not change.

The issue is the comparison of configurations ElasticSearchDevServicesBuildTimeConfig has no implementations of .equals() nor hashCode() so the comparison ALWAYS fails causing a container restart.

Expected behavior

No restart if configuration did not change.

Actual behavior

Container restarts every time regardless of wht changed.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

quarkus-bot[bot] commented 1 year ago

/cc @geoand (devservices), @gsmet (elasticsearch), @loicmathieu (elasticsearch), @stuartwdouglas (devservices), @yrodiere (elasticsearch)

geoand commented 1 year ago

Thanks for the analysis @apatrida.

Would you be interested in contributing a fix?

apatrida commented 1 year ago

sure, I already fixed it in my opensearch version of the same: https://github.com/sort-dev/quarkus-opensearch

here: https://github.com/sort-dev/quarkus-opensearch/commit/1d9bfdc1d24a98470fb42f8dead99bcca85bea85

I can do the same change for Quarkus and do a PR.

apatrida commented 1 year ago

Will check the standard way other equals/hashcode are written in Quarkus and match to that style if it differs.