Skip to content

Commit b688158

Browse files
the-mikedavisdumbbell
authored andcommitted
Bump Khepri to v0.13.0
Khepri v0.13.0 contains a fix for how projections are handled during registration and recovery. The error returned from `khepri:register_projection/1,2,3` has also been updated to use the `?khepri_error(..)` helper macro. Co-authored-by: Jean-Sébastien Pédron <[email protected]> (cherry picked from commit b83efd4)
1 parent a6653f2 commit b688158

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ erlang_package.hex_package(
296296
erlang_package.hex_package(
297297
name = "khepri",
298298
build_file = "@rabbitmq-server//bazel:BUILD.khepri",
299-
sha256 = "0b6ff09fabf27cb1e8df0f976149305ad936abd17233263b36ccc7becbf31cb3",
300-
version = "0.12.1",
299+
sha256 = "1157d963eb5c002e040bbc86348669818d1da86d259a3705008655fefbd7f1c2",
300+
version = "0.13.0",
301301
)
302302

303303
erlang_package.hex_package(

deps/rabbit/src/rabbit_khepri.erl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,17 @@ register_projections() ->
10151015
fun register_rabbit_index_route_projection/0,
10161016
fun register_rabbit_topic_graph_projection/0],
10171017
[case RegisterFun() of
1018-
ok -> ok;
1019-
{error, exists} -> ok;
1020-
{error, Error} -> throw(Error)
1018+
ok ->
1019+
ok;
1020+
%% Before Khepri v0.13.0, `khepri:register_projection/1,2,3` would
1021+
%% return `{error, exists}` for projections which already exist.
1022+
{error, exists} ->
1023+
ok;
1024+
%% In v0.13.0+, Khepri returns a `?khepri_error(..)` instead.
1025+
{error, {khepri, projection_already_exists, _Info}} ->
1026+
ok;
1027+
{error, Error} ->
1028+
throw(Error)
10211029
end || RegisterFun <- RegisterFuns],
10221030
ok.
10231031

rabbitmq-components.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ dep_accept = hex 0.3.5
116116
dep_cowboy = hex 2.12.0
117117
dep_cowlib = hex 2.13.0
118118
dep_credentials_obfuscation = hex 3.4.0
119-
dep_khepri = hex 0.12.1
119+
dep_khepri = hex 0.13.0
120120
dep_khepri_mnesia_migration = hex 0.4.0
121121
dep_looking_glass = git https://github.com/rabbitmq/looking_glass.git main
122122
dep_prometheus = hex 4.11.0

0 commit comments

Comments
 (0)