-
Notifications
You must be signed in to change notification settings - Fork 265
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
Missing lastSuccess/lastFailure in GET /v2/subscriptions in some cases #2974
Comments
In 1960_failure_stats_in_db_and_notifications/failure_stats_in_db_and_notifications_stop_start_accumulator.test it seems it happens only in the case of initial notification (which we know is special in the sense is synchronous to the subscription operation). In this test step 1 creates the entity, step 2 creates the subscription. If we reverse these steps, the problem doesn't happen. |
In one of the jenkins environment I'm testing this I have found that every time a test fails, the following appears in the logs:
That points out to the
Note that the notification flow is independent of the create subscription flow (in other words, notifications are asyncrhonous to the subscription creation) as they happen in separate threads. The creation flow is the one that inserts the subscription in the cache. But it may happen that the notifications flow executes faster than the creation flow, thus in that case the Note I say "it may happen". That would explain the "randomness" observed in this problem, happening in some environments but not in others. |
I will try to refactor so csub is inserted in the cache before spawn the notification thread. If the refactor gets to complex, I'll .DISABLE the affected .test in a quick PR in order not blocking CI. |
Fixed in PR #2975 |
We have tests that in some cases (e.g. 1960_failure_stats_in_db_and_notifications/failure_stats_in_db_and_notifications_stop_start_accumulator.test) the lastSucess/lastFailure field is missing in the GET /v2/subscription operation, although lastNotification and timesSent seem to be ok.
The problem is a bit annoying as it doesn't happend in all systems (e.g. we have a jenkins running regression that is showing the problem... while another jenkins with the same setup is not showing it!). It could be related with cache (in some systems we have observed the problem arises when cache is enabled and doesn't happen with noCache enabled).
Research in progress...
The text was updated successfully, but these errors were encountered: