Skip to content

Add support for a custom transport version check predicate in ElasticsearchException (#126272) #126520

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

Conversation

ldematte
Copy link
Contributor

@ldematte ldematte commented Apr 9, 2025

Backport of #126272

…searchException (elastic#126272)

Today when we are adding a ElasticsearchException, we specify a versionAdded TransportVersion (the transport version from which we support it); this version is checked by the isRegistered method:

return version.onOrAfter(elasticsearchExceptionHandle.versionAdded);

This does not play well with backports; when we add a patch version for a backport, normally the procedure would be to change the code above take also the patch into account, like:

version.orOnAfter(versionAdded) || version.isPatchFrom(versionPatched)

This PR updates ElasticsearchException to have more than just "version added", so that we can do patches as described above.
@ldematte ldematte added :Core/Infra/Core Core issues without another label backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v9.0.1 labels Apr 9, 2025
@elasticsearchmachine elasticsearchmachine merged commit 8167a8f into elastic:9.0 Apr 9, 2025
16 checks passed
@ldematte ldematte deleted the backport/9.0/elasticsearch-exception-custom-version-check branch April 9, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Core/Infra/Core Core issues without another label v9.0.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants