Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Check Stevedore extensions on import (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmedx authored Oct 20, 2020
1 parent 60215ae commit a58bd93
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions edx/analytics/tasks/util/opaque_key_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
# from common/djangoapps/util/request.py:
COURSE_REGEX = re.compile(r'^.*?/courses/{}'.format(COURSE_ID_PATTERN))

# Make sure that Opaque Keys' Stevedore extensions are loaded, this can sometimes fail to happen in EMR
# and it is vitally important that they be there, or jobs will succeed but produce incorrect data. See
# https://openedx.atlassian.net/wiki/spaces/DE/pages/1934263829/RCA+Insights+data+issues+2020-10-14+-+2020-10-15
# This will raise an error early on in import if the plugins don't exist.
CourseKey.get_namespace_plugin('course-v1')


def normalize_course_id(course_id):
"""Make a best effort to rescue malformed course_ids"""
Expand Down

0 comments on commit a58bd93

Please sign in to comment.