From d5f87ba1a556ac1bea7ade1b37a5b6333d15a0d2 Mon Sep 17 00:00:00 2001 From: Schahin Rouhanizadeh Date: Wed, 11 Sep 2024 20:17:42 +0200 Subject: [PATCH] [Change] BEP Redis key format ":" is the preferred way since Redis Insight from Redis itself shows your keys inside directories with ":". --- nativelink-service/src/bep_server.rs | 4 ++-- nativelink-service/tests/bep_server_test.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nativelink-service/src/bep_server.rs b/nativelink-service/src/bep_server.rs index 8ecda694e..7cfa9172f 100644 --- a/nativelink-service/src/bep_server.rs +++ b/nativelink-service/src/bep_server.rs @@ -75,7 +75,7 @@ impl BepServer { self.store .update_oneshot( StoreKey::Str(Cow::Owned(format!( - "LifecycleEvent-{}-{}-{}", + "LifecycleEvent:{}:{}:{}", &stream_id.build_id, &stream_id.invocation_id, sequence_number, ))), buf.freeze(), @@ -114,7 +114,7 @@ impl BepServer { store .update_oneshot( StoreKey::Str(Cow::Owned(format!( - "BuildToolEventStream-{}-{}-{}", + "BuildToolEventStream:{}:{}:{}", &stream_id.build_id, &stream_id.invocation_id, sequence_number, ))), buf.freeze(), diff --git a/nativelink-service/tests/bep_server_test.rs b/nativelink-service/tests/bep_server_test.rs index 2770e7e86..4beefaa71 100644 --- a/nativelink-service/tests/bep_server_test.rs +++ b/nativelink-service/tests/bep_server_test.rs @@ -117,7 +117,7 @@ async fn publish_lifecycle_event_test() -> Result<(), Box let sequence_number = request.clone().build_event.unwrap().sequence_number; let store_key = StoreKey::Str(Cow::Owned(format!( - "LifecycleEvent-{}-{}-{}", + "LifecycleEvent:{}:{}:{}", stream_id.clone().build_id, stream_id.clone().invocation_id, sequence_number @@ -280,7 +280,7 @@ async fn publish_build_tool_event_stream_test() -> Result<(), Box