After discussing some of our decisions about external course key validation with Mike Terry, we determined that we need an ADR in course-discovery that captures the motivation for introducing the CourseRun.external_course_key field.
Add an ADR to https://github.com/edx/course-discovery/tree/master/docs/decisions that captures:
why we introduced the `external_course_key` field
Some example use case
the collision detection we’re doing on pre-save, helps capture collisions from both publisher interface and Django Admin.n
why we put the field in course_metadata instead of registrar (talk about constraints of old publisher, and that in the future, we could move this mapping entirely to registrar)
consequences of this:
implementing collision detection as a pre-save hook introduces some complexity on save (but is short-circuited).