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

Conversation

nnaveen979
Copy link
Contributor

What

add check for event listener's for context events.

Why

if there are no event listeners available then no need to warn

How

added check for event listeners availability based on that print the warn!

Test

if context event listeners available then warn! msg prints if not then warn! msg wont print.

Checklist

  • [+] I have self-reviewed this PR
  • I have added tests that prove the feature works or the fix is effective

@nnaveen979 nnaveen979 requested review from satlead and a team October 8, 2024 10:05
let is_ripple_context =
RippleContext::is_ripple_context(&message.payload).is_none();

if self.has_event_listener(&message.target.as_clear_string()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a negation here it should not proceed to send the ripple context if there are any listeners

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the change please have a look

@@ -1116,16 +1116,6 @@ impl ThunderDeviceInfoRequestProcessor {

// If timezone or offset is None or empty
if let Some(tz) = Self::get_timezone_and_offset(&state).await {
let cloned_state = state.clone();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get the Timezone and set it in Ripple context here. This sets up the initial context until the point the user changes the timezone. Are we removing this because it is adding that log?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SDK, I removed it because i understood like, that cause's the warning log. I'll revert this change.

Copy link

github-actions bot commented Nov 5, 2024

Code Coverage

Package Line Rate Health
core.sdk.src.api.manifest 91%
core.main.src.bootstrap.manifest 0%
core.main.src.bootstrap.extn 0%
core.main.src.state.cap 43%
device.thunder_ripple_sdk.src.events 4%
device.thunder_ripple_sdk.src.client 74%
core.sdk.src.api.device 77%
core.main.src.service.apps 47%
core.sdk.src.framework 75%
core.main.src.firebolt 3%
core.sdk.src.api.firebolt 77%
core.main.src.state 24%
core.sdk.src.utils 53%
core.sdk.src.api.observability 61%
core.main.src.broker.thunder 22%
core.main.src.utils 26%
core.launcher.src.manager 7%
core.sdk.src.api.distributor 84%
core.launcher.src 0%
device.thunder_ripple_sdk.src.processors.events 0%
core.main.src.service 31%
core.main.src 0%
core.tdk.src.utils 0%
device.thunder_ripple_sdk.src.bootstrap 0%
core.tdk.src.gateway 100%
device.thunder_ripple_sdk.src 15%
core.main.src.bootstrap 0%
core.main.src.firebolt.handlers 9%
device.mock_device.src 52%
device.thunder_ripple_sdk.src.processors 9%
openrpc_validator.src 75%
core.sdk.src.api.gateway 81%
core.sdk.src.extn.client 91%
core.sdk.src.extn 83%
core.sdk.src.api 78%
core.sdk.src.extn.ffi 80%
core.main.src.processor.storage 0%
core.main.src.processor 0%
core.main.src.service.extn 40%
device.thunder.src.bootstrap 0%
device.thunder.src 0%
core.main.src.broker 43%
distributor.general.src 2%
Summary 43% (18218 / 42667)

Minimum allowed line rate is 42%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants