-
Notifications
You must be signed in to change notification settings - Fork 712
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
Coach > View learners - Missing 'Device status' and 'Last synced' values #10588
Comments
Hii @pcenov Sir is it a backend issue or front end issue it looks like the Btw nicely identifying the bug 🫡 I will also reproduce this issue :) |
HI @Pursottam6003. This is most likely a front-end issue, but first replicating the issue should clear this. Also, is this an issue you would like to take up? |
Hii @akolson I would be happy to take this issue I tried to replicate this issue on my device but here what I did is created the users from the same device but here i am able to get the But I think I need to create a virtual machine to clearly understood the issue |
Hey @pcenov I have been trying to replicate this bug but I am unable to. Are you able to dig into this further? Let me know. |
Hi @AllanOXDi could you please let me know on which build are you testing and perhaps share a video of what you are observing. I can confirm that I am able to replicate the issue in Kolibri 0.16.0a13. |
I tested with 0.16.0a13 built. |
@AllanOXDi here's a screenshot of what I am observing at the moment, just to make sure we are talking about the same thing: Let me know if you need further clarification. |
As I found this hard to reproduce and work on . I suspect looking into |
Hi @pcenov I was able to get it to show the As a next step to help resolve the bug, when you find some time, could you please post the response from |
Hi @akolson, I had a chance to take a closer look at this today. Looks like it's not just the device status and last sync that are not displayed, I am also not seeing anything in the 'Device activity' panel. Here's a short video of what I am doing and observing (I've skipped some parts to make it shorter): sync.mp4Here's the api response: Logs and databases for both devices: Let me know if you need additional info. |
@akolson I believe this code should be setting it on the server-side https://github.com/learningequality/kolibri/blob/develop/kolibri/core/device/kolibri_plugin.py |
I think it might be setting it for the LOD too. Perhaps something is clearing it? |
Yes,, based on the db, it is being set on the LOD. The comment here suggests that it is being cleared |
Hmm, but where's the actual code that deletes it? That might be a red herring, just an idea. The alternate possibility is that the hooks are broken |
Yeah, still looking around |
Hi @pcenov! So we dug out the pr that introduced these changes, thanks to @marcellamaki 🙂 . Just wondering if you could test test against the artifacts of this pr when you find some time. (PS: The pr is about a 13 months old so its possible a lot has changed and it may not work.) |
They've probably expired - I think the default retention period for artifacts is 3 months. |
@rtibbles is there a way to rerun the build? |
We reproduced this again in the bug hunt. @akolson I can help figure out what's going wrong. |
|
that is until the sync session is garbage collected. |
Looking at the map_status function, the reason we are doing the
I think this is where the null values are likely coming from - if the sync has been garbage collected, then the sync session associated with the sync status is null, and so the last_synced value is null. As a result we fail to catch any of the conditionals in |
This helps a little to actually show a status when there is no sync session, but is not the root of the problem. The root appears to be that morango never actually starts the initializing stage, as far as I can tell. I think this is because the LocalSessionContext defaults to the See https://github.com/learningequality/morango/blob/release-v0.7.x/morango/sync/context.py#L234 and https://github.com/learningequality/morango/blob/release-v0.7.x/morango/sync/controller.py#L250 I am guessing the salient difference when the sync is being run on the LODs, because they are running the management command is to do with these lines of code, which appear to be causing the initializing started signals to be fired: https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/core/auth/management/utils.py#L560 |
Seems like the solution here may be to add equivalent code into the TransferSessionViewset create method in morango, in order to ensure that the initializing started signals are always fired. |
This issue will only be completely solved once learningequality/morango#201 is merged, and a new version of morango is released and kolibri updated with it. |
The firing of the My mistake here was forgetting to preserve the attachment to the |
Observed behavior
The 'Device status' and 'Last synced' values are no longer displayed in Coach reports.
Expected behavior
The 'Device status' and 'Last synced' values should be displayed correctly.
Steps to reproduce the issue
Video
2023-04-28_16-55-26.mp4
Usage Details
Kolibri 0.16alfa13
Windows 10, Ubuntu - Chrome
The text was updated successfully, but these errors were encountered: