Skip to content

feat: add SupportEnterpriseEnrollmentDataInjector pipeline step - #2690

Merged
brobro10000 merged 1 commit into
openedx:masterfrom
brobro10000:brobro10000/ENT-11574-enrollment
Sep 11, 2026
Merged

brobro10000 merged 1 commit into
openedx:masterfrom
brobro10000:brobro10000/ENT-11574-enrollment

Conversation

@brobro10000

@brobro10000 brobro10000 commented Sep 8, 2026

Copy link
Copy Markdown
Member

ENT-11574

Companion PR to the already-open support-contact-tag PR set (openedx-filters#390,
edx-enterprise#2688, openedx-platform#39076, edx-platform#455) — this one covers the
other half of ENT-11574's acceptance criteria: enterprise enrollment data for the support
enrollment view.

Adds SupportEnterpriseEnrollmentDataInjector, registered in ENTERPRISE_FILTERS_CONFIG
(enterprise/settings/common.py) against the new SupportEnrollmentDataRequested
openedx-filter. Builds a course_id-keyed dict of enterprise course enrollments with
data-sharing-consent records attached — identical logic to the original direct-import
implementation in enrollments.py, just moved behind a filter.

Follows the pattern established by the other edx-enterprise filter pipeline steps
(discounts.py, courseware.py, enrollment.py): top-level imports guarded by
try/except ImportError, no broad exception swallowing, fail_silently: False (matching
every current ENTERPRISE_FILTERS_CONFIG entry), and tests built on real Django model
factories rather than module-mocking.

This PR is independent of (not stacked on) the contact-tag PR set — both create/touch
enterprise/filters/support.py and ENTERPRISE_FILTERS_CONFIG from the same base commit,
so whichever of the two merges second will need a small rebase. Expected, not a blocker.

Related PRs

Testing

New: tests/filters/test_support.py — 5 tests for SupportEnterpriseEnrollmentDataInjector,
using real UserFactory/EnterpriseCustomerFactory/EnterpriseCustomerUserFactory/
EnterpriseCourseEnrollmentFactory/DataSharingConsentFactory instances. The existing
generic TestEnterpriseFiltersConfig smoke test in tests/test_enterprise/test_settings.py
also covers our new ENTERPRISE_FILTERS_CONFIG entry automatically (no changes needed there).

Locally verified: pytest tests/filters/ tests/test_enterprise/test_settings.py — 81 passed.
isort --check-only clean.

Changelog / version

Bumped __version__ to 8.11.0 (8.10.0 already claimed by the sibling contact-tag PR) and
added a CHANGELOG.rst entry, matching current practice.

Devstack testing (all 3 relevant branches checked out together) is required before merging,
per the enterprise plugin ticket runbook.

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.04%. Comparing base (b2b1fbd) to head (be44beb).

Files with missing lines Patch % Lines
enterprise/filters/support.py 95.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2690   +/-   ##
=======================================
  Coverage   87.03%   87.04%           
=======================================
  Files         264      264           
  Lines       17248    17268   +20     
  Branches     1705     1706    +1     
=======================================
+ Hits        15012    15031   +19     
- Misses       1897     1898    +1     
  Partials      339      339           
Flag Coverage Δ
unittests 87.04% <95.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brobro10000
brobro10000 force-pushed the brobro10000/ENT-11574-enrollment branch from b77d009 to 5321927 Compare September 9, 2026 16:36
Comment thread enterprise/filters/support.py Outdated
@brobro10000
brobro10000 force-pushed the brobro10000/ENT-11574-enrollment branch from 5321927 to 7977be8 Compare September 10, 2026 16:25
@brobro10000
brobro10000 marked this pull request as ready for review September 10, 2026 16:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-10T16:32:04.834501Z 7977be8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread enterprise/filters/support.py Outdated
Comment thread enterprise/filters/support.py Outdated
@brobro10000
brobro10000 force-pushed the brobro10000/ENT-11574-enrollment branch 2 times, most recently from 6d56ea7 to 4125f86 Compare September 10, 2026 18:08
@brobro10000

Copy link
Copy Markdown
Member Author

@pwnage101 addressed the remaining feedback in the latest commit — dropped the enriched = dict(enrollment_data) half-copy; the step now mutates enrollment_data directly and returns it. (The defensive is None early-return was already removed in the previous round, matching the sibling contact step.) CI is green.

@pwnage101

Copy link
Copy Markdown
Contributor

code LGTM, the commit message is mostly AI fluff and irrelevant implementation history, please simplify then merge.

Registers a pipeline step for the SupportEnrollmentDataRequested
openedx-filter that injects enterprise course enrollment data into the
support enrollment lookup view, following the same conventions as the
other edx-enterprise filter pipeline steps.

ENT-11574
@brobro10000
brobro10000 force-pushed the brobro10000/ENT-11574-enrollment branch from 4125f86 to be44beb Compare September 11, 2026 15:54
@brobro10000
brobro10000 merged commit 7d44c97 into openedx:master Sep 11, 2026
11 checks passed
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.

2 participants