-
Couldn't load subscription status.
- Fork 10
Description
This may be fixed by the following issue, so should be tested again once it's merged: https://github.com/RaspberryPiFoundation/digital-editor-issues/issues/363
This is an issue in staging that @MFarringtonRPF observed, which led to a second remix being erroneously created for a user, and one of them not displaying user details on the Student Work page. There is a chance that old data might have a part in it.
The ids of Mel's projects where the issue was observed:
student_id (with dupe HTML projs): 5f3e56b7-9dc6-482a-a791-489ae4aa7f7d
school_id: d5f53eca-0b12-475a-9ef9-b4f5b4ddb250
This query shows possible further scenarios where this has been seen in prod:
SELECT
school_id,
user_id,
remixed_from_id,
project_type,
COUNT(*) AS remix_count,
MIN(created_at) AS earliest_created_at,
MAX(created_at) AS latest_created_at
FROM projects
WHERE school_id IS NOT NULL AND lesson_id IS NULL
GROUP BY school_id, user_id, remixed_from_id, project_type
HAVING COUNT(*) > 1;
Example problem records:
id, user_id, name, identifier, project_type, created_at, updated_at, remixed_from_id, locale, remix_origin, school_id, lesson_id, finished
96acbc0a-481e-4c6b-919e-c40db9c3a59a 9367a560-c3cb-470c-8c57-aac428e1c5a3 U1AQ5 recap-slept-enter python 2024-10-17 08:15:58.430802 2024-10-17 08:15:58.430802 bf667646-5817-4fe4-a0d2-981b5d6a706f https://editor.raspberrypi.org 9d2e4cc3-698a-46f5-a852-ad0fc257bd2c
7ca2ad7c-2857-4636-8c5d-5b99501ff876 9367a560-c3cb-470c-8c57-aac428e1c5a3 U1AQ5 perky-iron-half python 2024-10-17 08:24:01.284243 2024-10-17 08:24:01.284243 bf667646-5817-4fe4-a0d2-981b5d6a706f https://editor.raspberrypi.org 9d2e4cc3-698a-46f5-a852-ad0fc257bd2c
Logs:
First remix: https://logs.betterstack.com/team/54242/tail?s=314882&q=recap-slept-enter
Second remix: https://logs.betterstack.com/team/54242/tail?s=314882&q=perky-iron-half
Related:
https://github.com/RaspberryPiFoundation/digital-editor-issues/issues/363