Skip to content

Conversation

@Akanshu-2u
Copy link
Contributor

@Akanshu-2u Akanshu-2u commented Sep 15, 2025

Description

Breaking change:
Operators who maintain custom settings modules that write to FEATURES must add the following snippet at the top of their settings file(s) to ensure backwards compatibility:

try:
    from openedx.core.lib.features_setting_proxy import FeaturesProxy
    FEATURES = FeaturesProxy(globals())
except ImportError:
    pass 

This allows existing references to FEATURES[...] to continue functioning while Open edX transitions off of it.

Reference:

2U Private Jira Link :

Copilot AI review requested due to automatic review settings September 15, 2025 12:44
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

This PR implements FeaturesProxy integration for feature flag management in both CMS and LMS configuration files. The changes introduce a backwards-compatible mechanism for transitioning away from direct FEATURES dictionary usage while maintaining existing functionality.

Key changes:

  • Adds FeaturesProxy import and initialization in both CMS and LMS configuration files
  • Implements try-catch blocks to handle ImportError gracefully for backwards compatibility
  • Follows the exact pattern described in the breaking change documentation

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 Adds FeaturesProxy integration with error handling for LMS configuration
py_configuration_files/cms.py Adds FeaturesProxy integration with error handling for CMS configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jcapphelix
Copy link
Contributor

@Akanshu-2u do we use "!" in commits when breaking changes are made internally ?

Can you also add 2U private jira link ?

Copy link
Contributor

@jcapphelix jcapphelix left a comment

Choose a reason for hiding this comment

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

Can we add a comment that these changes are temporary and are supposed to be removed ?

@jcapphelix
Copy link
Contributor

Can we add a comment that these changes are temporary and are supposed to be removed ?

Upon looking into the files these comments may not be needed as these are anyways internal implementation of devstack.py file so its okay to not have it there.

@Akanshu-2u Akanshu-2u merged commit 06d0bee into master Sep 16, 2025
19 checks passed
@Akanshu-2u Akanshu-2u deleted the BOMS-200-handle-features-setting-dict-depr branch September 16, 2025 07:29
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.

3 participants