feat: add filters to support logistration integration - #337
Conversation
0fa2f77 to
8651fc4
Compare
5ebe0d6 to
c0c46d4
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the openedx_filters.learning public filter surface to support “logistration” (combined login/registration) and related auth flows, aligning the filters library with new integration points in edx-platform/enterprise.
Changes:
- Added six new learning filters for logistration context/response customization, MFE redirect control, post-login redirect override, and TPA form overrides.
- Added two structural
Protocoltypes (FormDescriptionProtocol,ProviderConfigProtocol) to document the minimal interface passed to pipeline steps. - Added/updated test coverage for the new filters, and bumped package version + changelog entry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| openedx_filters/learning/filters.py | Adds new logistration/auth-related filters and protocol structural types. |
| openedx_filters/learning/tests/test_filters.py | Adds unit tests validating new filters’ filter_type values and passthrough/exception behavior. |
| openedx_filters/init.py | Bumps package version to 3.9.0. |
| CHANGELOG.rst | Adds a 3.9.0 changelog entry describing the new filters and protocols. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0c4ee36 to
2f95918
Compare
| """ | ||
|
|
||
| def test_filter_type(self): | ||
| self.assertEqual( |
There was a problem hiding this comment.
We should be using python asserts instead of unittest ones
* Added new ``LogistrationContextRequested`` filter * Added new ``PostLoginRedirectURLRequested`` filter * Added new ``LoginFormTPAOverridesRequested`` filter * Added new ``RegistrationFormTPAOverridesRequested`` filter * Added new ``LogistrationResponseRendered`` filter * Added ``FormDescriptionProtocol`` and ``ProviderConfigProtocol`` structural types declaring the minimal surface the TPA-override filters pass to pipeline steps ENT-11568
57a747a to
6d579f6
Compare
iloveagent57
left a comment
There was a problem hiding this comment.
Looks good, one small suggestion to DRY things up a tiny bit.
| data = super().run_pipeline( | ||
| form_desc=form_desc, | ||
| running_pipeline=running_pipeline, | ||
| current_provider=current_provider, | ||
| ) | ||
| return data["form_desc"], data["running_pipeline"], data["current_provider"] |
There was a problem hiding this comment.
is this identical to the LoginFormTPAOverridesRequested.run_filter() definition?
LogistrationContextRequestedfilterPostLoginRedirectURLRequestedfilterLoginFormTPAOverridesRequestedfilterRegistrationFormTPAOverridesRequestedfilterLogistrationResponseRenderedfilterFormDescriptionProtocolandProviderConfigProtocolstructural types declaring the minimal surface the TPA-override filters pass to pipeline stepsENT-11568
Integration Testing
See openedx/edx-enterprise#2551 (comment)
Related: