Skip to content

Support Tutor 20.x (Teak) alongside Ulmo/Verawood - #2

Merged
Syed-Ali-Abbas-568 merged 2 commits into
mainfrom
fix/teak-compat
Oct 26, 2026
Merged

Syed-Ali-Abbas-568 merged 2 commits into
mainfrom
fix/teak-compat

Conversation

@Syed-Ali-Abbas-568

Copy link
Copy Markdown
Collaborator

Summary

Adds Tutor 20.x (Teak) support alongside the already-supported 21.x/22.x (Ulmo/Verawood), without changing behavior on either of those.

Teak's edx-platform and course-discovery still use Django's old DEFAULT_FILE_STORAGE string setting instead of the STORAGES dict (even though Teak itself runs Django 4.2.20 - a version check would get this backwards). Every settings patch that touches STORAGES now branches on "STORAGES" in globals() at render time, the same presence-detection idiom edx-platform's own resolve_storage_backend() already uses for this exact boundary.

Profile images get the same full S3 treatment as Verawood/Ulmo, in both dev and production: a thin wrapper storage class (referenced via a self-referential __name__-based dotted path, since the same patch renders into both development.py and production.py) strips the base_url key Teak's lms/urls.py still reads directly, before delegating to S3Boto3Storage.

pyproject.toml's tutor dependency now reads >=20.0.0,<23.0.0.

Verification

Live-tested against three real environments, not just the fabricated-namespace unit tests:

  • Tutor 20.0.5 (Teak): LMS, CMS and Discovery boot cleanly and read/write through all three backends (rustfs, azure, external_s3), in both tutor dev and tutor local launch (confirms the production/DEBUG=False code path, and that the __name__-based wrapper resolves to the correct production module).
  • Tutor 21.0.9 (Ulmo): same checks, same result - LMS/CMS/Discovery clean boot and live S3 read/write across all three backends.
  • Tutor 22.0.2 (Verawood): regression-checked live - STORAGES["profile_image"] still fires exactly as before, PROFILE_IMAGE_BACKEND stays untouched, zero behavioral change.

New exec()-based tests in tests/test_patches.py run the real rendered patches against fabricated Teak- and Verawood-shaped namespaces (not just compile()), since CI always resolves the newest Tutor in the widened range and will never install Tutor 20.x itself - these are the durable regression guard.

make test (lint, format, types, unit, package build) passes in all three environments' own venvs.

Test plan

  • make test green in Teak (20.0.5), Ulmo (21.0.9) and Verawood (22.0.2) venvs
  • Live profile-image upload + object-storage read/write on all three backends, on Teak and Ulmo
  • tutor local launch on Teak (production/DEBUG=False path)
  • Live regression check on Verawood: no behavior change

🤖 Generated with Claude Code

Syed-Ali-Abbas-568 and others added 2 commits October 23, 2026 02:16
Teak's edx-platform/course-discovery still use DEFAULT_FILE_STORAGE
instead of the STORAGES dict (even on Django 4.2.20, so this is
presence-detection, not a version check). Profile images get the same
S3 treatment in dev and production via a thin wrapper class, referenced
through a self-referential __name__ path so it resolves correctly in
whichever settings module it renders into.

Verified live against a real Tutor 20.0.5 environment: LMS, CMS and
Discovery boot and read/write cleanly across all three backends, in
both tutor dev and tutor local launch. Verawood/Ulmo behavior unchanged,
confirmed via the same live re-check and the full test suite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… entry

Stood up a real Tutor 21.0.9 environment and confirmed LMS, CMS and
Discovery boot cleanly and read/write across all three backends there
too, not just inferred from the Verawood (22.x) re-check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Syed-Ali-Abbas-568
Syed-Ali-Abbas-568 merged commit f2a073f into main Oct 26, 2026
3 checks passed
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.

1 participant