From 22ecb369fae699e1ffe460a1d1261e3707f68a99 Mon Sep 17 00:00:00 2001 From: Stephan Dollberg Date: Thu, 28 Nov 2024 09:38:08 +0000 Subject: [PATCH] feature_table: Add v25.1 version Prepares the feature table for the next release of v25.1 --- src/v/features/feature_table.cc | 3 ++- src/v/features/feature_table.h | 4 +++- src/v/features/tests/feature_table_test.cc | 7 +++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/v/features/feature_table.cc b/src/v/features/feature_table.cc index 0b56bddf679ce..3b47fa2990565 100644 --- a/src/v/features/feature_table.cc +++ b/src/v/features/feature_table.cc @@ -141,7 +141,7 @@ constexpr cluster_version latest_version = to_cluster_version( // a freshly initialized node will start at. All features up to this cluster // version will automatically be enabled when Redpanda starts. constexpr cluster_version earliest_version = to_cluster_version( - release_version::v23_3_1); + release_version::v24_1_1); static_assert( latest_version - earliest_version == 3L, @@ -175,6 +175,7 @@ bool is_major_version_release(cluster::cluster_version version) { case release_version::v24_1_1: case release_version::v24_2_1: case release_version::v24_3_1: + case release_version::v25_1_1: return true; } __builtin_unreachable(); diff --git a/src/v/features/feature_table.h b/src/v/features/feature_table.h index 71d55b02ca599..b9e08df0fe9c2 100644 --- a/src/v/features/feature_table.h +++ b/src/v/features/feature_table.h @@ -134,7 +134,8 @@ enum class release_version : int64_t { v24_1_1 = 12, v24_2_1 = 13, v24_3_1 = 14, - MAX = v24_3_1, // affects the latest_version + v25_1_1 = 15, + MAX = v25_1_1, // affects the latest_version }; constexpr cluster::cluster_version to_cluster_version(release_version rv) { @@ -151,6 +152,7 @@ constexpr cluster::cluster_version to_cluster_version(release_version rv) { case release_version::v24_1_1: case release_version::v24_2_1: case release_version::v24_3_1: + case release_version::v25_1_1: return cluster::cluster_version{static_cast(rv)}; } vassert(false, "Invalid release_version"); diff --git a/src/v/features/tests/feature_table_test.cc b/src/v/features/tests/feature_table_test.cc index 0b11eea631c30..77174d346a691 100644 --- a/src/v/features/tests/feature_table_test.cc +++ b/src/v/features/tests/feature_table_test.cc @@ -418,6 +418,9 @@ SEASTAR_THREAD_TEST_CASE(is_major_version_upgrade_test) { cluster::cluster_version{-1}, to_cluster_version(release_version::v22_3_1))); BOOST_CHECK(is_major_version_upgrade( - to_cluster_version(release_version::v24_3_1), - cluster::cluster_version{15})); + to_cluster_version(release_version::MAX), + cluster::cluster_version{ + static_cast>( + release_version::MAX) + + 1})); }