Repository navigation
fix(deps): pin xblocks-contrib to 1.0.7 for mitxonline - #421
Conversation
There was a problem hiding this comment.
Summary
Pins xblocks-contrib for mitxonline's MathJax 2 build.
Summary of 642dab5 · React 👍 or 👎 on my comments to tune what I raise · Commands · Review config
There was a problem hiding this comment.
🟡 Changes recommended
The dependency override applies to mitxonline’s default master branch, which already requires xblocks-core, causing normal builds and checks to install incompatible block distributions together.
1 open issue
What changed in this PR
This PR aims to restore mitxonline formula previews by matching its XBlock dependency to the MathJax 2 API used by its pinned edx-platform revision.
Changes:
- Pins
xblocks-contribto1.0.7in the mitxonline master cell’s overrides. - Disables Renovate updates for that dependency in the manifest.
- Documents when the pin must be removed as edx-platform advances.
| File | Description |
|---|---|
renovate.json |
Prevents automatic updates to the compatibility pin. |
deployments/mit-ol/build_manifest.yaml |
Adds the mitxonline dependency override and documents its compatibility limits. |
Review effort: Balanced
| # The settings and plugin checks build master HEAD, not d2dbc6a, so they | ||
| # don't exercise this pin | ||
| # (https://github.mit.edu/mitxonline/mitxonline-issues/issues/1652). | ||
| - xblocks-contrib==1.0.7 |
| }, | ||
| { | ||
| "matchFileNames": ["deployments/mit-ol/build_manifest.yaml"], | ||
| "matchDepNames": ["xblocks-contrib"], |
There was a problem hiding this comment.
This rule uses matchDepNames, but Renovate's matcher is matchPackageNames (as used by the react-router and setuptools rules in this same file); an unrecognized field is dropped, leaving a rule that disables every update in deployments/mit-ol/build_manifest.yaml — or, if partially honored, lets Renovate bump xblocks-contrib back to 1.0.8 and re-break mitxonline. Change it to matchPackageNames.
[Bug]
openedx/edx-platform d1ff09d83e1 (fix: check SAML metadata redirects and resolved hostnames) rewrote the SAML_METADATA_URL_ALLOW_PRIVATE_IPS toggle description, so settings-verify reports drift against master (it failed on #421). The regenerated models differ only in that description. Claude-Session: https://claude.ai/code/session_01FGZebDvGwVSXfw1tvwmscW
…#422) openedx/edx-platform d1ff09d83e1 (fix: check SAML metadata redirects and resolved hostnames) rewrote the SAML_METADATA_URL_ALLOW_PRIVATE_IPS toggle description, so settings-verify reports drift against master (it failed on #421). The regenerated models differ only in that description. Claude-Session: https://claude.ai/code/session_01FGZebDvGwVSXfw1tvwmscW
mitxonline is held at edx-platform d2dbc6a5930, the commit before the MathJax 4 upgrade (openedx/openedx-platform#33555), so it loads MathJax 2.7.5. That commit already pins xblocks-contrib 1.0.8, whose problem and discussion blocks only call the MathJax 4 API, so formula previews break on rc ([FormulaEquationInput] Oops no mathjax). 1.0.7 is the last release using the MathJax 2 API, and its dependencies are the same as 1.0.8's. The pin has to come out once mitxonline builds 78b892c6e2d or later: from there the platform loads MathJax 4, which 1.0.7 breaks in reverse, and from 6f85d63c7f9 on edx-platform depends on xblocks-core, so the pin would add a second copy of the blocks. Renovate is told to leave it alone until then. https://github.mit.edu/mitxonline/mitxonline-issues/issues/1652 Claude-Session: https://claude.ai/code/session_01FGZebDvGwVSXfw1tvwmscW
642dab5 to
6f2ae83
Compare

What are the relevant tickets?
https://github.mit.edu/mitxonline/mitxonline-issues/issues/1652
Description (What does it do?)
mitxonline rc shows broken formula previews (
[FormulaEquationInput] Oops no mathjax). mitxonline is held at edx-platform d2dbc6a5930, the commit before the MathJax 4 upgrade (openedx/openedx-platform#33555), so it loads MathJax 2.7.5. But d2dbc6a already pins xblocks-contrib 1.0.8 (bumped in 3cbb05b4274 on 2026-11-02), and 1.0.8 moved the problem and discussion blocks' JavaScript to the MathJax 4 API only. On rc the collectedformula_equation_preview.373edaa808a4.jscomes from 1.0.8 and has noMathJax.Hubpath. Prod still serves the 1.0.7 version of that file.This forces xblocks-contrib 1.0.7, the last release on the MathJax 2 API, through the mitxonline master cell's
overrides, and adds a Renovate rule so it isn't bumped back. 1.0.7 and 1.0.8 declare the same dependencies, and 1.0.8's changes are all MathJax 4 work plus dependency bumps.The pin has to be removed once mitxonline builds 78b892c6e2d or later: from there the platform loads MathJax 4, which 1.0.7 breaks in reverse, and from 6f85d63c7f9 on edx-platform depends on xblocks-core, so the pin would install a second copy of the blocks. The manifest comment says the same.
How can this be tested?
pytest tests/core/test_build_manifest.py tests/cli/test_build.py tests/cli/test_compat.pypasses, and the mitxonline cell's rendered overrides end inxblocks-contrib==1.0.7(the mitx cells don't get it). lehrer's own settings and plugin checks build edx-platform master HEAD rather than d2dbc6a, so they don't exercise this pin.This can only be confirmed after merge: once the mitxonline image is rebuilt at d2dbc6a and deployed to rc,
pip listin the CMS pod should show xblocks-contrib 1.0.7,/static/js/capa/src/formula_equation_preview.json courses.rc.learn.mit.edu should useMathJax.Hub.Queue, and formula previews should render in Studio and the LMS.https://claude.ai/code/session_01FGZebDvGwVSXfw1tvwmscW