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

Ensure session and summary log outputs are consistent between channel and displayed node #12804

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

rtibbles
Copy link
Member

@rtibbles rtibbles commented Nov 6, 2024

Summary

  • Ensures the specific node in a channel is returned, not just any with the matching content_id.
  • Uses node_id from the session log context in extra_fields when available.

References

Fixes #12791

Reviewer guidance

Engage with resources that are in multiple channels (e.g. some KA exercises for different languages, and those that have been copied into the Kolibri QA channel).

Export the session and summary logs.

Make sure that the topic tree hierarchy and the channel name match up to each other in the logs.


Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@github-actions github-actions bot added the DEV: backend Python, databases, networking, filesystem... label Nov 6, 2024
@pcenov
Copy link
Member

pcenov commented Nov 18, 2024

Hi @rtibbles - I noticed the following issues while manually testing:

  1. In both logs there's always an empty 'Topic level N' column before the 'Content id' column:

empty level

  1. In the summary logs I can see the following issue, where the entries from topic level 4 to 9 are incorrect for a resource imported from KA Chinese:

summary logs

Test channel token which you can use to replicate the issue: milas-tarol
Logs and DB in google drive: https://drive.google.com/drive/u/0/folders/17KajXswJjetgPzTTv0bdHrWNGPyg-5N5

…content_id.

Use node_id when available.
Query for most recent session log to give parallel results for summary logs.
@rtibbles
Copy link
Member Author

Thanks @pcenov - I have fixed the first issue - I had originally left the second as intended behaviour because of the subtly different way we track data for summary logs vs session logs, but I am inspecting the session logs to get the data we need to ensure consistent behaviour between the two now.

@pcenov pcenov self-requested a review December 13, 2024 13:53
Copy link
Member

@pcenov pcenov left a comment

Choose a reason for hiding this comment

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

Thanks @rtibbles - I confirm that the above mentioned issues are fixed now!

Copy link
Member

@ozer550 ozer550 left a comment

Choose a reason for hiding this comment

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

Code changes make sense! I have tested the PR locally and logs are consistent!

@rtibbles rtibbles merged commit 25e3650 into learningequality:develop Dec 19, 2024
36 of 37 checks passed
@rtibbles rtibbles deleted the captains_log branch December 19, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: backend Python, databases, networking, filesystem...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Session and Summary export logs do not prioritize the content node with the selected channel id
3 participants