feat: add EnterpriseEnrollmentPostProcessor pipeline step and register it for CourseEnrollmentStarted#2624
Draft
Copilot wants to merge 2 commits into
Draft
feat: add EnterpriseEnrollmentPostProcessor pipeline step and register it for CourseEnrollmentStarted#2624Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…and tests Agent-Logs-Url: https://github.com/openedx/edx-enterprise/sessions/70704ca5-cce1-410a-8309-ea24fed67771 Co-authored-by: kiram15 <31229189+kiram15@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate registration for EnterpriseEnrollmentPostProcessor
feat: add EnterpriseEnrollmentPostProcessor pipeline step and register it for CourseEnrollmentStarted
May 22, 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.
PR #2553 introduced
EnterpriseEnrollmentPostProcessorbut omitted two things: registration inENTERPRISE_FILTERS_CONFIG(so the step was never injected intoOPEN_EDX_FILTERS_CONFIGat LMS startup), and used the wrong filter event key in tests (enrollment.created.v1does not exist upstream).Changes
enterprise/filters/enrollment.py— newEnterpriseEnrollmentPostProcessorPipelineStep: looks up the enrolling user'sEnterpriseCustomerUser, then callsEnterpriseApiServiceClientandConsentApiServiceClient; each API call is exception-guarded and logged independently so one failure doesn't block the other. Graceful no-op whenopenedx.features.enterprise_support.apiis not importable.enterprise/settings/common.py— adds the missingENTERPRISE_FILTERS_CONFIGentry for the correct upstream filter key:No changes to
lms/envs/common.pyare needed — the existingplugin_settings()already mergesENTERPRISE_FILTERS_CONFIGintoOPEN_EDX_FILTERS_CONFIG.tests/filters/test_enrollment.py— unit tests for the pipeline step: non-enterprise user passthrough, enterprise happy path (both clients called with correct args),ImportErrorfallback, and independent exception handling for each API call. Uses correct filter keyorg.openedx.learning.course.enrollment.started.v1(fixing the.created.v1bug present in PR feat: add EnterpriseEnrollmentViewProcessor pipeline step for CourseEnrollmentStarted filter #2553).tests/test_enterprise/test_settings.py— addsTestEnterpriseFiltersConfigRegistration: verifies the enrollment filter is declared inENTERPRISE_FILTERS_CONFIG, thatplugin_settings()injects it intoOPEN_EDX_FILTERS_CONFIG, and that it is suppressed whenENABLE_ENTERPRISE_INTEGRATION=False.Original prompt
This pull request was created from Copilot chat.