Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions server/src/main/java/org/elasticsearch/TransportVersions.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,9 @@ static TransportVersion def(int id) {
public static final TransportVersion TIMEOUT_GET_PARAM_FOR_RESOLVE_CLUSTER = def(8_838_0_00);
public static final TransportVersion INFERENCE_REQUEST_ADAPTIVE_RATE_LIMITING = def(8_839_0_00);
public static final TransportVersion ML_INFERENCE_IBM_WATSONX_RERANK_ADDED = def(8_840_0_00);
public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED_BACKPORT_8_X = def(8_840_0_01);
public static final TransportVersion REMOVE_ALL_APPLICABLE_SELECTOR_BACKPORT_8_X = def(8_840_0_02);
public static final TransportVersion ELASTICSEARCH_8_19 = def(8_841_0_00);
public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED_BACKPORT_8_X = def(8_841_0_01);
Copy link
Member

Choose a reason for hiding this comment

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

Separately (it can be in a followup) we should rename these constants. Using _X suffix isn't descriptive enough, ever, because whatever branch it is backported to will become a release branch. So this should always be the exact minor version that is backported to.

public static final TransportVersion REMOVE_ALL_APPLICABLE_SELECTOR_BACKPORT_8_X = def(8_841_0_02);

/*
* STOP! READ THIS FIRST! No, really,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
public class TransportVersionTests extends ESTestCase {

/**
* This test is specific for 8.19, to ensure that transport versions are backported correctly. Do not forward or backport it.
* This test is specific for 8.19, to ensure that transport versions are backported correctly. Do not forward or backport it,
* and do not adjust the TransportVersion to check (ELASTICSEARCH_8_19).
* If the test fails, there is something wrong with your backport PR.
*/
public void testMaximumAllowedTransportVersion() {
assertThat(TransportVersions.LATEST_DEFINED.isPatchFrom(TransportVersions.ML_INFERENCE_IBM_WATSONX_RERANK_ADDED), is(true));
assertThat(TransportVersions.LATEST_DEFINED.isPatchFrom(TransportVersions.ELASTICSEARCH_8_19), is(true));
}

public void testVersionComparison() {
Expand Down