Skip to content

feat: remove enterprise and consent from OPTIONAL_APPS#38209

Merged
pwnage101 merged 1 commit intomasterfrom
pwnage101/ENT-11663
Mar 26, 2026
Merged

feat: remove enterprise and consent from OPTIONAL_APPS#38209
pwnage101 merged 1 commit intomasterfrom
pwnage101/ENT-11663

Conversation

@pwnage101
Copy link
Contributor

@pwnage101 pwnage101 commented Mar 25, 2026

  • Remove enterprise and consent from platform INSTALLED_APPS. They'll automatically load as openedx plugins via the plugin framework in edx-enterprise 6.8.0. Keeping them in OPTIONAL_APPS would cause duplicate app label errors.
  • Update enterprise_enabled() to correctly check if the enterprise app is installed. The new plugin entry_point-based registration uses 'enterprise.apps.EnterpriseConfig' (not 'enterprise') in INSTALLED_APPS, so the raw string check no longer works.

IMPORTANT: bumping edx-enterprise to 6.8.0 AND removing apps from INSTALLED_APPS must happen in the same commit so that they don't end up in different deployments which would either break django startup or accidentally disable enterprise (depending on the merge order).

ENT-11663


Tickets/PRs blocked by this one:


Related:

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates edx-platform’s enterprise integration to rely on edx-enterprise’s plugin-based app registration (edx-enterprise 6.8.0), preventing duplicate Django app registrations and keeping enterprise feature-detection working with the new AppConfig-based install style.

Changes:

  • Bump edx-enterprise from 6.7.0 to 6.8.0 across constraints and compiled requirement sets.
  • Remove enterprise and consent from OPTIONAL_APPS so they aren’t double-registered when plugins auto-load them.
  • Update enterprise_enabled() to detect installation via Django’s app registry rather than a raw settings.INSTALLED_APPS string check.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
requirements/edx/base.txt Updates pinned edx-enterprise to 6.8.0 in base compiled requirements.
requirements/edx/development.txt Updates pinned edx-enterprise to 6.8.0 in development compiled requirements.
requirements/edx/doc.txt Updates pinned edx-enterprise to 6.8.0 in docs compiled requirements.
requirements/edx/testing.txt Updates pinned edx-enterprise to 6.8.0 in testing compiled requirements.
requirements/constraints.txt Pins edx-enterprise to 6.8.0 to control deployment of the enterprise package version.
openedx/features/enterprise_support/api.py Switches enterprise install detection to django.apps.apps.is_installed(...).
openedx/envs/common.py Removes enterprise and consent from OPTIONAL_APPS to avoid duplicate app-label registration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pwnage101
Copy link
Contributor Author

Merged and deployed edx-enterprise 6.8.0, but CI is failing due to missing installing enterprise and consent in the CMS. edx-enterprise 6.8.1 will hopefull fix that: openedx/edx-enterprise#2579

@pwnage101 pwnage101 force-pushed the pwnage101/ENT-11663 branch from de550d0 to 0889524 Compare March 26, 2026 16:53
- Remove ('enterprise', None) and ('consent', None) from OPTIONAL_APPS in
  openedx/envs/common.py. Now that edx-enterprise registers enterprise and
  consent as openedx LMS plugins via entry_points, get_plugin_apps() adds
  them to INSTALLED_APPS automatically. Keeping them in OPTIONAL_APPS would
  cause duplicate app label errors.
- Update enterprise_enabled() in enterprise_support/api.py to use
  django_apps.is_installed('enterprise') instead of the raw string check
  'enterprise' in settings.INSTALLED_APPS. The new plugin entry_point-based
  registration uses 'enterprise.apps.EnterpriseConfig' (not 'enterprise') in
  INSTALLED_APPS, so the raw string check no longer works.

ENT-11663

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pwnage101 pwnage101 force-pushed the pwnage101/ENT-11663 branch from 0889524 to d890c7a Compare March 26, 2026 16:54
@pwnage101 pwnage101 merged commit 7c86626 into master Mar 26, 2026
52 checks passed
@pwnage101 pwnage101 deleted the pwnage101/ENT-11663 branch March 26, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants