Skip to content

Commit

Permalink
feature_table: Add v25.1 version
Browse files Browse the repository at this point in the history
Prepares the feature table for the next release of v25.1
  • Loading branch information
StephanDollberg committed Dec 2, 2024
1 parent 4273a7c commit 22ecb36
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/v/features/feature_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion src/v/features/feature_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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<int64_t>(rv)};
}
vassert(false, "Invalid release_version");
Expand Down
7 changes: 5 additions & 2 deletions src/v/features/tests/feature_table_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::underlying_type_t<release_version>>(
release_version::MAX)
+ 1}));
}

0 comments on commit 22ecb36

Please sign in to comment.