openedx / openedx/edx-val

storage location not respected on course import

Open
#636 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11
Forks
38
PR merge metrics
No merged PRs in 30d

Description

When a course with video transcripts is imported, the path location is not respected; it goes in the root of the storage. Everything else (eg. reading transcripts) appears to correctly respect the location.

For example, if I have the following config (tutor default + tutor-contrib-s3):

MEDIA_ROOT = "/openedx/media/"
VIDEO_TRANSCRIPTS_SETTINGS["STORAGE_KWARGS"]["location"] = MEDIA_ROOT
STORAGES['default']['BACKEND'] = "storages.backends.s3boto3.S3Boto3Storage"
VIDEO_TRANSCRIPTS_SETTINGS["STORAGE_KWARGS"]["location"] = VIDEO_TRANSCRIPTS_SETTINGS["STORAGE_KWARGS"]["location"].lstrip("/")

And I import a course with transcripts, the transcripts will be saved to video-transcripts/ in s3, but it will try reading the transcripts from openedx/media/video-transcripts.

I believe I've been able to reproduce similar behaviour with the new STORAGES based setting, although I think maybe the transcript file didn't get uploaded at all. Perhaps more testing is required there:

STORAGES["video_transcripts"] = {
      "BACKEND": "storages.backends.s3boto3.S3Boto3Storage",
      "OPTIONS": {
          "bucket_name": "{{ S3_STORAGE_BUCKET }}",
          "location": "",
      },
}

This is on Verawood.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the course import path that handles video transcripts and trace how VIDEO_TRANSCRIPTS_SETTINGS and the video_transcripts STORAGES configuration determine upload and read locations. Reproduce the issue with the provided S3 configurations; done means imported transcripts are uploaded under the configured location and can be read from that same location.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.