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

[mock_uss] Add user notifications for missing fields in injected flights #911

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

the-glu
Copy link
Contributor

@the-glu the-glu commented Jan 29, 2025

Follow #910

Tested, I added a filter + a new raw_telemetry field for internal purpose, because everything was crashing with bad telemetry data ^^'

@the-glu the-glu force-pushed the user-notifications-missing-fields branch 2 times, most recently from f5677c5 to b6f033c Compare January 30, 2025 08:52
@the-glu the-glu marked this pull request as ready for review January 30, 2025 08:53
Copy link
Contributor

@Shastick Shastick left a comment

Choose a reason for hiding this comment

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

Sounds like a wise thing to do :)

monitoring/mock_uss/ridsp/routes_injection.py Outdated Show resolved Hide resolved
@@ -29,3 +31,20 @@ def record_notification(
self.user_notifications.append(
UserNotification(observed_at=observed_at_time, message=message)
)

def create_notifications_if_nedded(self, record: "database.TestRecord"):
Copy link
Contributor

Choose a reason for hiding this comment

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

This is going to trigger a notification for every single missing field in any telemetry point. That's not realistic since we'd want that only if there are missing fields for a while, but that could be acceptable behavior for the mock USS.
However what it is not covering is the lack of any telemetry point for a while. Which we will need for NET0400. Could you add that? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which we will need for NET0400. Could you add that? Thanks!

We planned with @Shastick to implement that one in a different PR, this is only for NET0030 on purpose :)

This is going to trigger a notification for every single missing field in any telemetry point. That's not realistic since we'd want that only if there are missing fields for a while, but that could be acceptable behavior for the mock USS.

For the mock uss we probably want that for testing: It's reporting all missing fields with location on purpose if debugging is needed (and that shouldn't add much overhead, when testing we do only set one missing field in one telemetry). Also I'm not sure, but complaining immediately is not an issue based on the standard no?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, I don't see a reason to limit ourselves to a single notification, and the current approach makes the logic very simple.

The intention for the scenario is to assume that we have at least one notification sent (ie, the notification count over the period is non-zero, and/or the total number of notifications at the end of the scenario is higher than when it started.

@the-glu the-glu force-pushed the user-notifications-missing-fields branch from eecc6f4 to d3966b8 Compare January 30, 2025 14:32
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