Skip to content

Conversation

@jdconrad
Copy link
Contributor

Note this changes TransportVersion.onOrAfter to throw an UnsupportedOperationException.

ES-12334

@jdconrad jdconrad requested review from a team as code owners October 17, 2025 17:43
@jdconrad jdconrad added :Core/Infra/Transport API Transport client API >refactoring Team:Core/Infra Meta label for core/infra team v9.3.0 labels Oct 17, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple suggestions for followups


@Override
public boolean before(TransportVersion version) {
return version.id() > id();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we throw UOE here as well, suggesting .supports(...) == false? Or is that intended for a followup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will 100% be a follow up. I just prefer to do one method at at time given how large this change is.

}

@Override
public boolean between(TransportVersion lowerInclusive, TransportVersion upperExclusive) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the above, can this be blocked in a followup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

* <li>{@code 8_801_0_00.isPatchFrom(8_800_0_04)}: {@code false}</li>
* </ul>
*/
public boolean isPatchFrom(TransportVersion version) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are only a handful of remaining uses, perhaps these versions could be manually migrated (building a chained TransportVersion in memory) so that they can use supports and this could be made private?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. I will look into that.

@jdconrad
Copy link
Contributor Author

I'm closing this in favor of other refactoring work first.

@jdconrad jdconrad closed this Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Transport API Transport client API >refactoring Team:Core/Infra Meta label for core/infra team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants