Skip to content

feat: replace enterprise support contact-tag import with filter call - #39076

Open
brobro10000 wants to merge 1 commit into
openedx:masterfrom
brobro10000:brobro10000/ENT-11574
Open

feat: replace enterprise support contact-tag import with filter call#39076
brobro10000 wants to merge 1 commit into
openedx:masterfrom
brobro10000:brobro10000/ENT-11574

Conversation

@brobro10000

@brobro10000 brobro10000 commented Sep 3, 2026

Copy link
Copy Markdown
Member

ENT-11574

Swaps the direct openedx.features.enterprise_support import in the support contact-us view
for a call to the SupportContactContextRequested openedx-filter. No settings changes in
this PR: OPEN_EDX_FILTERS_CONFIG registration for the pipeline step lives entirely in
edx-enterprise's own plugin_settings() (enterprise/settings/common.py), per the ENT-11830
ownership handoff — already merged in this repo (#38634) well before this branch existed.
(An earlier version of this PR incorrectly re-added OPEN_EDX_FILTERS_CONFIG to
lms/envs/common.py/production.py; that's been reverted.)

lms/djangoapps/support/views/enrollments.py is untouched — this PR is scoped to the
contact-tag filter only.

Update: filter shape corrected per review feedback

Per pwnage101's review feedback
on the sibling edx-platform PR, the filter's original shape was wrong — it claimed to request
the whole page "context" but only ever passed/returned a bare tags list.
SupportContactContextRequested.run_filter now accepts/returns the entire context dict (the
call is made after context['tags'] = tags), and the unused user argument was dropped
entirely (pipeline steps fetch it via crum internally, matching the convention used elsewhere).

Since the original shape (#390 / #2688 below) had already merged and released, this required new
PRs in openedx-filters and edx-enterprise rather than amendments — both are now merged and
released (3.11.0 / 8.11.0), and this PR's call site and requirements pins are updated to match,
verified locally against the real released packages.

Related PRs

Merge order (per the enterprise plugin ticket runbook)

This PR merges LAST, only after:

  1. openedx-filters and edx-enterprise are merged and released.
  2. The edx/edx-platform sibling PR is merged, deployed to stage, tested, deployed to prod, and
    confirmed working.
  3. This PR is rebased and any stage/prod fixes are cherry-picked in.

Do not merge before that sequence completes.

CI note

Previously CI here was expected to be red until openedx-filters/edx-enterprise released — that
dependency chain has since resolved. Both packages are now released (openedx-filters 3.11.0,
edx-enterprise 8.11.0, carrying the shape-fix above) and this PR's requirements pins are bumped
to match. CI is green.

Testing

New: ContactUsViewTests in lms/djangoapps/support/tests/test_views.py mocks
SupportContactContextRequested.run_filter at the call site — the pipeline-step behavior
itself is covered by edx-enterprise's own test suite.

Local devstack integration testing (with the openedx-filters, edx-enterprise, and edx-platform
branches checked out together) is required before any of these PRs merge — see the handoff
prompt below for exact steps.

@brobro10000
brobro10000 force-pushed the brobro10000/ENT-11574 branch from 415814a to 66e2c12 Compare September 8, 2026 12:37
@brobro10000 brobro10000 changed the title feat: replace enterprise support view imports with filter calls feat: replace enterprise support contact-tag import with filter call Sep 8, 2026
@brobro10000
brobro10000 force-pushed the brobro10000/ENT-11574 branch 6 times, most recently from bd3abe7 to 2b95d3a Compare September 9, 2026 19:29
@brobro10000
brobro10000 marked this pull request as ready for review September 9, 2026 19:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 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-09T19:37:30.598348Z 2b95d3a 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.

Swaps the direct openedx.features.enterprise_support import in the support
contact-us view for a call to the SupportContactContextRequested
openedx-filter. Per pwnage101's review feedback, the filter call is made
after context['tags'] = tags and operates on the whole page context dict
rather than a bare tags list, since it's the context (not just the tags)
that's conceptually being requested; the unused user argument is dropped
entirely since pipeline steps that need it fetch it via crum internally.
No settings changes here: OPEN_EDX_FILTERS_CONFIG registration for the
pipeline step lives in edx-enterprise's own plugin_settings()
(enterprise/settings/common.py), per the ENT-11830 ownership handoff. The
test now mocks the filter call at the view layer; the enterprise-specific
pipeline step behavior is covered by edx-enterprise's own test suite.

Also bumps openedx-filters (3.10.0 -> 3.11.0, carrying the context-shape
change above) and edx-enterprise (8.10.0 -> 8.11.0, carrying the matching
SupportContactEnterpriseTagStep update) in pyproject.toml's uv_constraints
and uv.lock / the compiled requirements files, now that both releases are
published on PyPI. Verified locally against the real released packages
(not just the mocked unit test) that SupportContactContextRequested.run_filter
accepts and returns a bare context dict as expected.

ENT-11574

@pwnage101 pwnage101 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, but I'll defer approval until we merge/deploy edx#455 and confirm in prod that everything is working.

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