Skip to content

Ensure that openedx_content cannot create a corrupted data state #463

@kdmccormick

Description

@kdmccormick

There are ways in which you can call the authoring_api that leads the DB to be broken. For example, before we fixed it, you were able to:

  • Create a container like a Unit
  • Create a new ContainerVersion, but NOT a new UnitVersion
  • Now, app code will see the ContainerVersion and assume it has a .unit_version, causing a 500
  • There's no way out of this state without modifying MySQL yourself

AC: Fix the specific issue listed above, if it's not fixed already.

  • Note: Is there anything more general we want to do about the PE<->PEV relationships that would avoid these sort of inconsistencies? Is there any sort of metadata we'd want to add to capture things like "Y is a subtype of X, XV is a version of X, and YV is a version of Y... so if Y exists and XV exists then YV should exist".

AC: Scan through authoring_api and ensure that any "invalid" operation raises an exception rather than putting the DB in a bad state.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions