fix: enable the enterprise feature BEFORE plugins are loaded#220
Merged
Conversation
This fixes a devstack-specific bug resulting in enterprise and consent plugin settings not being loaded because the entire enterprise feature was disabled (ENABLE_ENTERPRISE_INTEGRATION = False) when the plugins were loaded. Settings in devstack.py are loaded AFTER plugins are loaded, which makes it a bad place to flip on ENABLE_ENTERPRISE_INTEGRATION because it would be too late.
Contributor
There was a problem hiding this comment.
Pull request overview
Moves the ENABLE_ENTERPRISE_INTEGRATION = true setting from py_configuration_files/lms.py (devstack.py-style overrides loaded after plugins) to configuration_files/lms.yml (YAML configuration loaded before plugins), so the enterprise and consent plugin settings are properly loaded in devstack.
Changes:
- Remove
ENABLE_ENTERPRISE_INTEGRATION = Trueand its comments frompy_configuration_files/lms.py. - Add
ENABLE_ENTERPRISE_INTEGRATION: truewith equivalent comments toconfiguration_files/lms.yml. - Strip a trailing whitespace from the
ENABLE_MKTG_SITE: trueline.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| py_configuration_files/lms.py | Removes the late-loaded enterprise toggle so it can be set earlier via YAML. |
| configuration_files/lms.yml | Adds ENABLE_ENTERPRISE_INTEGRATION: true (with explanatory comments) before plugin loading; cleans trailing whitespace on a nearby line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kiram15
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a devstack-specific bug resulting in enterprise and consent plugin settings not being loaded because the entire enterprise feature was disabled (ENABLE_ENTERPRISE_INTEGRATION = False) when the plugins were loaded. Settings in devstack.py are loaded AFTER plugins are loaded, which makes it a bad place to flip on
ENABLE_ENTERPRISE_INTEGRATION because it would be too late.
Here's the order of operations:
lms/envs/common.pyis loaded.a. ENABLE_ENTERPRISE_INTEGRATION set to False.
b. add_plugins() is called.
b.
enterprise/settings/common.pyis loaded.plugin_settings()exits early.lms/envs/production.pyis loaded.a. Loads the file
/edx/etc/lms.ymlseeded byconfiguration_files/lms.yml.b. ENABLE_ENTERPRISE_INTEGRATION stays False (
b.
enterprise/settings/production.pyis loaded, which re-loads common.py.plugin_settings()exits early again because ENABLE_ENTERPRISE_INTEGRATION is still False.lms/envs/devstack.py(seeded bypy_configuration_files/lms.py) is loaded.a. FINALLY the enterprise feature is enabled, but it's too late because enterprise plugin has no devstack.py file, nor should it.
Alternatives Considered