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

[Notifications] Fix missed notifications in notifications pusher #3607

Merged

Conversation

yaelgen
Copy link
Collaborator

@yaelgen yaelgen commented May 21, 2023

Adding a fix to _push_terminal_run_notifications.
_last_notification_push_time was calculated after querying and pushing all runs, therefore a run could have been missed. Taking the time now before running the query.

This change lead to some scheduler tests taking longer and fail.
We computed a margin of 0.5 seconds for these tests, which was already quite insufficient (0.4 is not enough), and increased it to 0.8 in this PR.
It looks like adding even one CPU-consuming code line along the flow will cause a delay in the run time.

This margin will only work temporarily, and we don't want this actions to influence the run time. In the future, we should consider separating this server code, but for now, we should discuss a better solution (maybe make scheduler tests not run the periodic run monitor + add a test for the real flow expected time).

@Tankilevitch
Copy link
Contributor

seems like we are experiencing the import loops again

Comment on lines +60 to +62
# TODO: The margin will need to rise for each additional CPU-consuming operation added along the flow,
# we need to consider how to decouple in the future
schedule_end_time_margin = 0.7
Copy link
Member

Choose a reason for hiding this comment

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

I think what needs to be done here is to run notifications monitoring under a feature flag
and when running scheduler tests, simply disable it

Comment on lines 570 to 571
# Import here to avoid circular import
import mlrun.api.api.utils
Copy link
Member

Choose a reason for hiding this comment

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

welp, that didnt work

revert change or tackle in other PR

@Tankilevitch Tankilevitch marked this pull request as ready for review May 24, 2023 07:07
@Tankilevitch Tankilevitch merged commit 9771d06 into mlrun:development May 24, 2023
14 checks passed
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.

None yet

3 participants