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

Consent videos not always marked as consent footage #598

Closed
kimberscott opened this issue Dec 14, 2020 · 0 comments · Fixed by #601 or lookit/ember-lookit-frameplayer#204
Closed
Assignees
Labels
Bug [Work Type] An issue with the program
Projects

Comments

@kimberscott
Copy link
Contributor

kimberscott commented Dec 14, 2020

Description
Occasionally the Video object for a consent video is not marked as is_consent_footage, and so doesn't show up in the consent manager, even both the video and data about the consent frame are available.

How to reproduce
Create a study with a consent frame. Complete the consent video and wait ~1 min. THEN proceed to next frame. Look for the video in the consent manager - a record of the session is there, but no video. (Or view Videos from admin interface.)

Compare to completing the consent video and proceeding quickly to the next frame, which creates a video marked correctly as consent footage.

Expected behavior
All videos completed during consent frames should be marked as consent footage.

Environment (OS, browser, branch, etc.):
staging, prod

Additional context
What's happening is that the webhook that processes the videos upon upload to S3 relies on fetching data from the database about the frame to determine if it's a consent frame. So if the frame hasn't been completed by the time the S3 upload completes, we don't know it's a consent frame and the video record is created but not marked as consent footage.

Two options:

  1. Add info about this being consent footage to the Pipe payload string, and have the webhook check for that flag
  2. Save consent videos early (upon frame load) so that info is available in the database by the time we go fetch it. Set up the post-save hook to check for a flag that the frame is not actually complete.

(2) is a slightly more convoluted from the frameplayer standpoint, and still technically leaves us with a race condition - it would be more straightforward to bundle this info with the video so it can't get lost.

Both solutions will involve making changes to lookit-api (how to process webhook (1) or post-save hook (2)), then allowing update to ember-lookit-frameplayer.

@kimberscott kimberscott added the Bug [Work Type] An issue with the program label Dec 14, 2020
@kimberscott kimberscott self-assigned this Dec 14, 2020
@kimberscott kimberscott added this to Backlog in Lookit via automation Dec 14, 2020
kimberscott pushed a commit to lookit/ember-lookit-frameplayer that referenced this issue Dec 14, 2020
…n of consent video footage without needing data in db for the frame yet. Don't use before deploying lookit-api-side changes to address lookit/lookit-api#598
Lookit automation moved this from Backlog to Done Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug [Work Type] An issue with the program
Projects
No open projects
Lookit
  
Done
1 participant