fix(mit-ol): install forum from our branch, drop the edx-django-utils fork - #208
Merged
Conversation
… fork Two override changes, in opposite directions. Forum: the Typesense search backend is non-functional on every search, not just some -- per_page is set above Typesense's hard cap of 250, and the topic filter names a field the collection schema does not declare. Both have been there since the backend shipped. Fix is openedx/forum#289, which is green and awaiting review; until it merges and releases, the master cells install forum from the branch. Scoped to master only: our branch is based on forum master, so pointing verawood or ulmo at it would jump them across release boundaries for no benefit -- both still have forum search on Elasticsearch. This changes nothing at runtime today, since typesense:forum_search_enabled is false everywhere. It is what makes flipping that toggle possible. edx-django-utils: openedx/edx-django-utils#549 merged and shipped in 8.0.2, so the fork branch is no longer needed. edx-platform master already pins 8.0.2 and the three master cells simply drop the override. The verawood and ulmo cells cannot: those branches pin 8.0.1, which predates the fix, so they take an explicit 8.0.2 pin instead. Deleting the override outright would have quietly regressed OpenTelemetryBackend.create_span() on four of the seven cells.
There was a problem hiding this comment.
Pull request overview
Updates deployment dependency overrides to use upstream fixes appropriately.
Changes:
- Installs the Typesense forum fix branch for master cells.
- Removes the obsolete edx-django-utils fork.
- Pins edx-django-utils 8.0.2 for older release cells.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
I had scoped this to the master cells out of caution rather than evidence. Having actually diffed 0.4.2 against forum master, verawood can take it too. The delta is ten commits, and only three modules are genuinely removed once the src/ layout move is normalised away: backends/mongodb/*, forum_create_mongodb_indexes, and toggles.py. None of that reaches us. All twelve environments already run forum_v2.enable_mysql_backend for everyone, so nobody is on the Mongo data backend. Nothing in openedx-platform imports forum.backends.mongodb or forum.toggles, and nothing in ol-infrastructure or lehrer invokes the removed management command. toggles.py only ever defined the enable_mysql_backend waffle flag itself, which is redundant now that MySQL is the sole backend -- worth noting that our set_waffle_flags entries for it become dead config. The rest is packaging (uv, src layout, semantic-release) and typing.cast() wrappers around request.data in the views, which are no-ops at runtime. ulmo stays on 0.4.1, now for a concrete reason rather than caution: forum master declares requires-python >=3.12 and the ulmo cell builds on 3.11, so it cannot install. verawood builds on 3.12, and forum master's only other constraint is Django>=4.2. Verified by installing the branch into a clean 3.12 venv: builds, reports 0.4.5, and the installed forum/search/typesense.py carries TYPESENSE_MAX_PER_PAGE = 250 and the singular commentable_id filter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Two override changes to
deployments/mit-ol/build_manifest.yaml, in opposite directions.Install forum from our branch (master cells only)
openedx/forum's Typesense search backend is non-functional on every search, not just some. Two defects, both present since the backend shipped in openedx/forum#225:per_pageis set toFORUM_MAX_DEEP_SEARCH_COMMENT_COUNT(1000); Typesense rejects anything above 250 with HTTP 422. Fires on every search, filtered or not.commentable_ids, but the collection schema declarescommentable_id— HTTP 400 on any topic-scoped search.Fix is openedx/forum#289 (all checks green, awaiting review, nudged). Until it merges and releases, six of the seven cells install forum from
mitodl/forum@tmacey/fix-typesense-search-params.This changes nothing at runtime today.
typesense:forum_search_enabledis false or unset in all twelve environments, so forum search is on Elasticsearch regardless. What it does is make flipping that toggle possible — and forum search is the only index in the Elasticsearch estate with nonzero query counts, so it is what unblocks retiring those domains.Applied to the three
mastercells and the threeverawoodcells.ulmois the only exclusion, and for a hard reason: forum master declaresrequires-python >=3.12and the ulmo cell builds on 3.11, so it cannot install there. It stays onopenedx-forum==0.4.1.Why verawood is safe
The 0.4.2 → master delta is ten commits. Normalising away the
src/layout move, only three modules are genuinely removed:backends/mongodb/*management/commands/forum_create_mongodb_indexes.pytoggles.pyNone of it reaches us:
forum_v2.enable_mysql_backendto--everyone, so nothing is on the Mongo data backend.openedx-platformimports neitherforum.backends.mongodbnorforum.toggles(0 code-search hits on either).ol-infrastructureorlehrerinvokes the removed management command.toggles.pyonly ever defined theenable_mysql_backendwaffle flag itself, redundant now that MySQL is the sole backend. Worth noting as a follow-up: ourset_waffle_flagsentries forforum_v2.enable_mysql_backendbecome dead config after this.Everything else is packaging (uv,
src/layout, semantic-release) andtyping.cast()wrappers aroundrequest.datain the views — no-ops at runtime. Forum master's only other constraint isDjango>=4.2, which verawood satisfies.Drop the edx-django-utils fork
openedx/edx-django-utils#549 merged and shipped in v8.0.2 — the release tag is identical to the merge commit — so the
blarghmatey/edx-django-utils@otel-create-spanbranch is no longer needed.The three
mastercells simply drop the override: edx-platform master already pinsedx-django-utils==8.0.2.The four
verawood/ulmocells cannot. Those branches pin8.0.1, which predates the fix, so they take an explicitedx-django-utils==8.0.2override instead. Deleting the override outright would have quietly regressedOpenTelemetryBackend.create_span()on four of the seven cells.Testing
pre-commit run --files deployments/mit-ol/build_manifest.yamlpasses (yamllint, Format YAML, check yaml, detect-secrets).build_manifest.schema.json; still 7 cells, each with the expected overrides.0.4.5, declaresname = "openedx-forum"matching the#egg=fragment, and the installedforum/search/typesense.pycarriesTYPESENSE_MAX_PER_PAGE = 250and the singularcommentable_idfilter — i.e. the fix is really in the artifact.Follow-up
Both overrides are temporary and carry a "remove once X merges" comment. The forum one comes out when openedx/forum#289 merges and releases; at that point those cells go back to whatever edx-platform pins on their branch.