From efc59de0560d9ba584afcad166ba7ca6254de1f7 Mon Sep 17 00:00:00 2001 From: michaelroytman Date: Fri, 22 Jul 2022 12:41:23 -0400 Subject: [PATCH] test: add debugging log statements for user_id LtiError This commit updates the version of the lti-consumer-xblock from 4.3.1 to 4.3.2. This installs the newest version of the lti-consumer-xblock library. This version includes the following changes. This commit adds supplemental logging to diagnose the bug reported in MST-1540: https://2u-internal.atlassian.net/browse/MST-1540. The bug is that learners are encountering the LtiError when trying to do an LTI launch. The learners appear to be authenticated, so this error should not occur. The bug is not easily reproducible in production or development, so this supplemental logging is added to help understand the user's state when the error is raised. The current hypothesis is that user is temporarily represented by the AnonymousUser in the request that is made when doing the LTI launch, despite the user otherwise being authenticated. Logging in Splunk suggests that this is the case, because logs are of the following form, "2022-07-22 15:10:14,214 ERROR 5067 [django.request] [user None] [ip ] log.py:224 - Internal Server Error: /courses//xblock//handler/lti_launch_handler", where the "user" is "None". This logging should prove or disprove this hypothesis and provide direction about where else to look. This logging should be removed once MST-1540 is resolved. --- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/testing.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index adbc3470a1..b4a1e979da 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -658,7 +658,7 @@ libsass==0.10.0 # ora2 loremipsum==1.0.5 # via ora2 -lti-consumer-xblock==4.3.1 +lti-consumer-xblock==4.3.2 # via -r requirements/edx/base.in lxml==4.9.1 # via diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 615a5b3de4..66889c6cbf 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -862,7 +862,7 @@ loremipsum==1.0.5 # via # -r requirements/edx/testing.txt # ora2 -lti-consumer-xblock==4.3.1 +lti-consumer-xblock==4.3.2 # via -r requirements/edx/testing.txt lxml==4.9.1 # via diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index e4345c40da..765d071b55 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -820,7 +820,7 @@ loremipsum==1.0.5 # via # -r requirements/edx/base.txt # ora2 -lti-consumer-xblock==4.3.1 +lti-consumer-xblock==4.3.2 # via -r requirements/edx/base.txt lxml==4.9.1 # via