Skip to content

SE-3222 Extend EDXAPP_SITE_CONFIGURATION with default values

Boros Gábor requested to merge s0b0lev/SE-3223 into master

Created by: s0b0lev

This PR introduce new merge function for EDXAPP_SITE_CONFIGURATION settings.

Testing instructions This instruction is meant to be run locally:

  1. Create a new OpenEDXInstance
  2. Open OCIM django shell make shell
  3. Get created instance:
>>> instance = OpenEdXInstance.objects.last()
  1. Create new appserver (without spawning actual deployment, we are care only about app server final configuration)
>>> instance._create_owned_appserver()
  1. Open UI, check that Combined ansible vars -> EDXAPP_SITE_CONFIGURATION looks like this:
EDXAPP_SITE_CONFIGURATION:
- values:
    CONTACT_US_CUSTOM_LINK: /contact
  1. Open instance settings (django admin page http://localhost:5000/admin/instance/openedxinstance/)
  2. Update Configuration extra settings:
DEMO_CREATE_STAFF_USER: false
SANDBOX_ENABLE_CERTIFICATES: false
demo_test_users: []
EDXAPP_SITE_CONFIGURATION:
- values:
    CONTACT_US_CUSTOM_LINK: /override-contact-us-link
    TEST_VAR: /test
  1. Repeat step 4
  2. Open UI, check that Combined ansible vars -> EDXAPP_SITE_CONFIGURATION looks like this:
EDXAPP_SITE_CONFIGURATION:
- values:
    CONTACT_US_CUSTOM_LINK: /override-contact-us-link
    TEST_VAR: /test

Possible edge scenarios to verify:

  • Appserver provisioned with default EDXAPP_SITE_CONFIGURATION
  • Appserver provisioned with additional Configuration extra settings
  • Appserver prodivioned with overridden default for EDXAPP_SITE_CONFIGURATION (for example: CONTACT_US_CUSTOM_LINK)

Author notes @nizarmah I am sorry for such large instruction, but this is the only way to verify it works. Feel free to ask any questions or clarify anything you need for this review.

Thanks!

Merge request reports