Skip to content

fix(deps): pin xblocks-contrib to 1.0.7 for mitxonline - #421

Merged
blarghmatey merged 1 commit into
mainfrom
pin-xblocks-contrib-1.0.7
Nov 17, 2026
Merged

blarghmatey merged 1 commit into
mainfrom
pin-xblocks-contrib-1.0.7

Conversation

@blarghmatey

Copy link
Copy Markdown
Member

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 collected formula_equation_preview.373edaa808a4.js comes from 1.0.8 and has no MathJax.Hub path. 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.py passes, and the mitxonline cell's rendered overrides end in xblocks-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 list in the CMS pod should show xblocks-contrib 1.0.7, /static/js/capa/src/formula_equation_preview.js on courses.rc.learn.mit.edu should use MathJax.Hub.Queue, and formula previews should render in Studio and the LMS.

https://claude.ai/code/session_01FGZebDvGwVSXfw1tvwmscW

Copilot AI balanced review requested due to automatic review settings November 17, 2026 21:06

@agent-optibot agent-optibot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Copilot AI 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.

🟡 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-contrib to 1.0.7 in 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

@agent-optibot agent-optibot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Status: Needs Changes 🔧

Blocking Issues:

  • Invalid Renovate matcher key disables the wrong scope of updates

📌 Reviewed up to the latest commit · ⏱️ Review completed in 4 minutes

  • 🔄 re-review this PR

Comment thread renovate.json
},
{
"matchFileNames": ["deployments/mit-ol/build_manifest.yaml"],
"matchDepNames": ["xblocks-contrib"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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


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]

Solve it in vscode or cursor.

blarghmatey added a commit that referenced this pull request Nov 17, 2026
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
blarghmatey added a commit that referenced this pull request Nov 17, 2026
…#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
@blarghmatey
blarghmatey force-pushed the pin-xblocks-contrib-1.0.7 branch from 642dab5 to 6f2ae83 Compare November 17, 2026 23:48
@blarghmatey
blarghmatey merged commit bdad6bc into main Nov 17, 2026
22 checks passed
@blarghmatey
blarghmatey deleted the pin-xblocks-contrib-1.0.7 branch November 17, 2026 23:48
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