Skip to content
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

Deprecate Elasticsearch RestHighLevelClient #28598

Closed
bclozel opened this issue Nov 10, 2021 · 8 comments
Closed

Deprecate Elasticsearch RestHighLevelClient #28598

bclozel opened this issue Nov 10, 2021 · 8 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Nov 10, 2021

As discussed in #28496, we're going to refactor our current support of Elasticsearch clients.

The new ElasticsearchClient will be supported in #28597, so this issue is about deprecating the support for RestHighLevelClient. All related auto-configurations and configuration keys should be marked as deprecated as a result.

@mp911de
Copy link
Member

mp911de commented Jan 10, 2022

Until the new ElasticsearchClient has stabilized and has proven reliable we suggest staying with the RestHighLevelClient. It makes sense to provide infrastructure to pick up ElasticsearchClient if it is on the classpath. RestHighLevelClient has proven to work reliably and should be preferred if both are on the classpath.

The integration and full support of ElasticsearchClient in Spring Data Elasticsearch will take some additional time.

Deprecating support for RestHighLevelClient leaves users without a viable option so deprecation in Boot should happen at a later stage.

@bclozel bclozel modified the milestones: 2.7.x, 2.x Jan 10, 2022
@bclozel
Copy link
Member Author

bclozel commented Jan 10, 2022

Sounds good @mp911de , thanks for your advice! I've rescheduled for 2.x and we'll reconsider when to tackle this.

@bclozel
Copy link
Member Author

bclozel commented Jan 10, 2022

Spring Boot 2.7 upgrades to Elasticsearch 7.16 (see #29292); in that generation, RestHighLevelClient is already deprecated by the Elasticsearch team itself.

Spring Boot support should be naturally deprecated as well; I'll reschedule this issue to its original milestone.

@bclozel bclozel modified the milestones: 2.x, 2.7.x Jan 10, 2022
@wilkinsona
Copy link
Member

This is a tricky situation as the replacement requires Jakarta EE 9 so it is only suitable for inclusion in Spring Boot 3. I'm not sure if we should still deprecate our support for the old client as we can't offer a replacement until 3.0. On the other hand, it's deprecated in Elasticsearch so it feels odd to have undeprecated support for something that's deprecated.

@wilkinsona wilkinsona added the for: team-meeting An issue we'd like to discuss as a team to make progress label Jan 19, 2022
@philwebb philwebb removed the for: team-meeting An issue we'd like to discuss as a team to make progress label Jan 26, 2022
@philwebb
Copy link
Member

We've decided to deprecate our auto-configuration but not yet introduce any support for the new client as it doesn't have feature parity and depends on Jakarta EE 9 APIs.

@viktorardelean
Copy link
Contributor

@bclozel @philwebb I can work on this.

Here is what I would mark as deprecated after looking at the code: RestHighLevelClientConfiguration, RestClientSnifferConfiguration, ElasticSearchRestHealthContributorAutoConfiguration, ElasticsearchRestHealthIndicator, RestClientConfiguration, ElasticsearchRestClientAutoConfiguration.

Let me, please know if I missed something.

@wilkinsona
Copy link
Member

Thanks for the offer, @viktorardelean. If you're looking for an issue that's more suited to someone needing some guidance, please keep an eye out for issues labeled as ideal for contribution and, if you haven't contributed before, first-timers only.

@viktorardelean
Copy link
Contributor

@wilkinsona Thank you for your guidance!

@wilkinsona wilkinsona self-assigned this Apr 12, 2022
@wilkinsona wilkinsona modified the milestones: 2.7.x, 2.7.0-RC1 Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants