Skip to content

Commit

Permalink
[Change] BEP Redis key format (#1345)
Browse files Browse the repository at this point in the history
":" is the preferred way since Redis Insight from Redis itself shows your keys inside directories with ":".
  • Loading branch information
SchahinRohani authored Sep 12, 2024
1 parent a6c3a6f commit ba5b315
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nativelink-service/src/bep_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions nativelink-service/tests/bep_server_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async fn publish_lifecycle_event_test() -> Result<(), Box<dyn std::error::Error>
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
Expand Down Expand Up @@ -280,7 +280,7 @@ async fn publish_build_tool_event_stream_test() -> Result<(), Box<dyn std::error
.iter()
.map(|request| {
StoreKey::Str(Cow::Owned(format!(
"BuildToolEventStream-{}-{}-{}",
"BuildToolEventStream:{}:{}:{}",
stream_id.build_id,
stream_id.invocation_id,
request
Expand Down

0 comments on commit ba5b315

Please sign in to comment.