Skip to content

BB-4230 Fix usage of yaml.safe_load in migration

João Cabrita requested to merge joaocabrita/fix_yaml_typo into master

This fixes the migration introduced in #806

I think the bug was missed in tests because EDXAPP_FEATURES is never used, so the code path in question is never exercised...

Testing

  1. Apply all previous migrations ./manage.py migrate instance 0140;
  2. Create an OpenEdXInstance with configuration_extra_settings = 'EDXAPP_FEATURES: { TEST_FLAG: true }'; Alternatively, use any environment that contains instances where configuration_extra_settings contains EDXAPP_FEATURES;
  3. Apply migration: ./manage.py migrate instance;
  4. Verify that:
    • before the fix it fails with AttributeError: module 'yaml' has no attribute 'yaml'
    • after the fix it succeeds

Related tickets:

Merge request reports