Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPPL-2651: Ripple Event warning should not print for context events #647

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
10c0a6f
fix: Ripple Event warning should not print for context events
nnaveen979 Oct 8, 2024
01d2d7f
fix: negate the event listener condition check to make the fix work
nnaveen979 Oct 15, 2024
d8786c4
Merge branch 'main' into rppl_2651_context
nnaveen979 Oct 15, 2024
bd51fe5
chore: comment added
nnaveen979 Oct 15, 2024
adee7e7
fix: removed the additional ripple context check and else if warning …
nnaveen979 Oct 20, 2024
34aa6ff
chore: Merge branch 'main' into rppl_2651_context
nnaveen979 Oct 20, 2024
56c5b8b
fix: added a check for ripple context and listner availability before…
nnaveen979 Oct 22, 2024
c7dbfbf
fix: fixing clippy warnings
nnaveen979 Oct 22, 2024
341fb15
fix: clippy warning fixed
nnaveen979 Oct 22, 2024
4f5e236
fix: clippy warning fix
nnaveen979 Oct 22, 2024
39b0a5e
fix: clippy warning fix
nnaveen979 Oct 22, 2024
f63923c
fix: unit test failures fixing
nnaveen979 Oct 22, 2024
09c2c88
fix: modfied ripple context updated for other extension clients
nnaveen979 Oct 23, 2024
3ea48d4
chore: Merge branch 'main' into rppl_2651_context
nnaveen979 Oct 23, 2024
7a65a67
chore: Merge branch 'main' into rppl_2651_context
nnaveen979 Oct 28, 2024
db638d9
fix: added the RPPL-2717 change to fix the context update issue
nnaveen979 Oct 29, 2024
47ab0e7
:Merge branch 'main' into rppl_2651_context
nnaveen979 Oct 29, 2024
12ec6c5
chore: cleanup
nnaveen979 Oct 29, 2024
6cdcf1c
fix: listener availability check added in context update function
nnaveen979 Nov 5, 2024
7a3b45d
chore: comment added
nnaveen979 Nov 5, 2024
e80492a
Merge branch 'main' into rppl_2651_context
nnaveen979 Nov 5, 2024
642e1d4
chore: reverted change of timezone context update call
nnaveen979 Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/main/src/broker/thunder_broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ mod tests {
}
}

#[tokio::test]
#[ignore]
#[tokio::test]
async fn test_thunderbroker_start() {
let (tx, mut _rx) = mpsc::channel(1);
let (sender, mut rec) = mpsc::channel(1);
Expand Down Expand Up @@ -593,6 +593,7 @@ mod tests {
assert_eq!(key_str, "value");
}

#[ignore]
#[tokio::test]
async fn test_thunderbroker_subscribe_unsubscribe() {
let (tx, mut _rx) = mpsc::channel(1);
Expand Down
14 changes: 13 additions & 1 deletion core/sdk/src/extn/client/extn_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ impl ExtnClient {
let mut ripple_context = self.ripple_context.write().unwrap();
ripple_context.deep_copy(context);
}
if !self.has_event_listener(&message.target.as_clear_string()) {
continue;
}
pahearn73 marked this conversation as resolved.
Show resolved Hide resolved
}
}
Self::handle_vec_stream(message, self.event_processors.clone());
Expand Down Expand Up @@ -376,6 +379,7 @@ impl ExtnClient {
};
let new_context = { self.ripple_context.read().unwrap().clone() };
let message = new_context.get_event_message();

if propagate {
trace!("Formed Context update event: {:?}", message);
let c_message: CExtnMessage = message.clone().into();
Expand All @@ -386,12 +390,20 @@ impl ExtnClient {
trace!("Send to other client result: {:?}", send_res);
}
}
Self::handle_vec_stream(message, self.event_processors.clone());
//check for active listeners
if self.has_event_listener(&message.target.as_clear_string()) {
Self::handle_vec_stream(message, self.event_processors.clone());
}
} else {
trace!("Context information is already updated. Hence not propagating");
}
}

fn has_event_listener(&self, input: &str) -> bool {
let processors = self.event_processors.read().unwrap();
processors.contains_key(input)
}

fn handle_no_processor_error(&self, message: ExtnMessage) {
let req_sender = self.get_extn_sender_with_extn_id(&message.requestor.to_string());

Expand Down
Loading