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

TransportVersionUtils#randomVersionBetween does not work with version extensions #106119

Closed
ywangd opened this issue Mar 8, 2024 · 1 comment · Fixed by #116198
Closed

TransportVersionUtils#randomVersionBetween does not work with version extensions #106119

ywangd opened this issue Mar 8, 2024 · 1 comment · Fixed by #116198
Assignees
Labels
:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests

Comments

@ywangd
Copy link
Member

ywangd commented Mar 8, 2024

When a version constant is provided by a version extension, TransportVersionUtils#randomVersionBetween will fail with a message similar to the following

java.lang.IllegalArgumentException: maxVersion [8599010] does not exist.

Such a version constant can be automatically returned by calling TransportVersion.current() if a version extension happens to define the highest version.

@ywangd ywangd added >test Issues or PRs that are addressing/adding tests :Core/Infra/Core Core issues without another label labels Mar 8, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Mar 8, 2024
@alexey-ivanov-es alexey-ivanov-es self-assigned this Oct 28, 2024
alexey-ivanov-es added a commit to alexey-ivanov-es/elasticsearch that referenced this issue Nov 4, 2024
alexey-ivanov-es added a commit that referenced this issue Dec 10, 2024
… extensions (106119) (#116198)

Introduces a new extension method to VersionExtension enabling extensions to provide additional versions and creates method TransportVersion.getAllVersions returning all transport versions defined by Elasticsearch and the extension. This ensures that TransportVersion.current() always returns the correct current (latest) transport version even if it is defined by an extension.

Fixes #106119
alexey-ivanov-es added a commit to alexey-ivanov-es/elasticsearch that referenced this issue Dec 10, 2024
… extensions (106119) (elastic#116198)

Introduces a new extension method to VersionExtension enabling extensions to provide additional versions and creates method TransportVersion.getAllVersions returning all transport versions defined by Elasticsearch and the extension. This ensures that TransportVersion.current() always returns the correct current (latest) transport version even if it is defined by an extension.

Fixes elastic#106119
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests
Projects
None yet
3 participants