chore: enable notification feature by default#38073
Merged
AhtishamShahid merged 4 commits intomasterfrom Mar 24, 2026
Merged
Conversation
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 pull request refactors the feature flag logic for notifications and email notifications throughout the codebase. The main change is switching from "enable" waffle flags (e.g.,
ENABLE_NOTIFICATIONS,ENABLE_EMAIL_NOTIFICATIONS) to "disable" waffle flags (e.g.,DISABLE_NOTIFICATIONS,DISABLE_EMAIL_NOTIFICATIONS). This means that the features are now enabled by default unless explicitly disabled by the corresponding flag. The update includes changes in both application logic and test cases to use the new flags and invert the logic where necessary.Key changes include:
Feature flag implementation and usage updates:
Replaced
ENABLE_NOTIFICATIONSandENABLE_EMAIL_NOTIFICATIONSwithDISABLE_NOTIFICATIONSandDISABLE_EMAIL_NOTIFICATIONSinopenedx/core/djangoapps/notifications/config/waffle.py, including updating flag names, documentation, and logic. The new flags now disable the respective features when enabled, instead of enabling them.Updated all application logic in notification and discussion-related tasks to check for the "disable" flags (
DISABLE_NOTIFICATIONS,DISABLE_EMAIL_NOTIFICATIONS) and invert the logic accordingly, so features are active unless the flag is enabled.Test updates:
Refactored all test cases to use the new "disable" flags, removing or inverting any
@override_waffle_flag(ENABLE_NOTIFICATIONS, ...)and@override_waffle_flag(ENABLE_EMAIL_NOTIFICATIONS, ...)decorators and logic. Updated assertions to match the new default-enabled behavior.These changes simplify feature management by making notifications and email notifications enabled by default, and only disabled when the respective "disable" flag is set. This also makes the codebase more consistent and easier to reason about.