chore: remove xpro-enrollment-welcome-email feature flag - #4091
Merged
Merged
Conversation
arslanashraf7
force-pushed
the
arslan/remove-welcome-email-flag
branch
from
September 11, 2026 13:10
7dcd380 to
062959e
Compare
arslanashraf7
marked this pull request as ready for review
September 14, 2026 11:40
The flag has been at 100% rollout with no filters since 2025-10-10 and PostHog now marks it stale. Removes the constant, the is_enabled guard in send_course_run_enrollment_welcome_email, and the disabled-path test case, so the welcome email always sends. Ref: mitodl/hq#12661 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
arslanashraf7
force-pushed
the
arslan/remove-welcome-email-flag
branch
from
September 14, 2026 11:41
062959e to
bc23892
Compare
Anas12091101
approved these changes
Sep 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.
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/12661
Description (What does it do?)
ENROLLMENT_WELCOME_EMAILPostHog feature flag (xpro-enrollment-welcome-email), which has been at 100% rollout with no property filters since 2025-10-10 and is now marked stale in PostHog.mitxpro/features.py.is_enabled(...)guard inecommerce/mail_api.py:send_course_run_enrollment_welcome_email, so the welcome email always sends (matching current production behavior).ecommerce/mail_api_test.py.Implementation details
mitxprowas the only consumer of this flag. The only guard was the early return at the top ofsend_course_run_enrollment_welcome_email; callers (courses/api.py,courses/management/utils.py) only invoke that wrapper and never reference the flag directly, so no changes were needed there. Also removed the now-unusedis_enabledandfeaturesimports fromecommerce/mail_api.py, and the now-unusedENROLLMENT_WELCOME_EMAILimport from the test file. The parametrized test (enabled=True/False) was collapsed to a single unparametrized test covering the always-enabled path.Per the issue, the PostHog flag itself will be archived (not deleted) after this deploys to production and past the revert window — that step is manual and out of scope for this PR.
How can this be tested?
xpro-enrollment-welcome-emailin PostHog such that the flag value doesn't have any impact on the welcome emails.