There was an error fetching the commit references. Please try again later.
[ARCHBOM-1645] Modifying anonymous_id_for_user() to handly SECRET_KEY rotation (#26162)
These changes were initially made to make it easier to do SECRET_KEY rotations. Along the way, we found it made sense to refractor the code as well. Changes made: - changed get_to_create to create because now the code should only get to this block when a write is necessary - added a lookup for anonymous_user_id. This is to return an existing anonymous_user_id rather than calculating. This will mitigate the results of SECRET_KEY rotation. - Added monitoring to help us make better decisions: should we not sue SECRET_KEY, performance considerations... - put old function behind toggle in case something goes wrong in production with new code - refractoring function structure for better understanding
Showing
- common/djangoapps/student/models.py 81 additions, 1 deletioncommon/djangoapps/student/models.py
- common/djangoapps/student/tests/tests.py 32 additions, 3 deletionscommon/djangoapps/student/tests/tests.py
- common/lib/xmodule/xmodule/graders.py 1 addition, 1 deletioncommon/lib/xmodule/xmodule/graders.py
- lms/djangoapps/certificates/apis/v0/tests/test_views.py 1 addition, 1 deletionlms/djangoapps/certificates/apis/v0/tests/test_views.py
- lms/djangoapps/courseware/tests/test_views.py 3 additions, 3 deletionslms/djangoapps/courseware/tests/test_views.py
- lms/djangoapps/grades/tests/test_course_grade_factory.py 1 addition, 1 deletionlms/djangoapps/grades/tests/test_course_grade_factory.py
- openedx/core/djangoapps/credit/tests/test_api.py 1 addition, 1 deletionopenedx/core/djangoapps/credit/tests/test_api.py
- openedx/core/djangoapps/schedules/tests/test_resolvers.py 1 addition, 1 deletionopenedx/core/djangoapps/schedules/tests/test_resolvers.py
- openedx/core/djangoapps/xblock/runtime/shims.py 1 addition, 0 deletionsopenedx/core/djangoapps/xblock/runtime/shims.py
- openedx/features/course_experience/tests/views/test_course_updates.py 1 addition, 1 deletion...ures/course_experience/tests/views/test_course_updates.py
Loading
Please register or sign in to comment