Repository navigation
Support Tutor 20.x (Teak) alongside Ulmo/Verawood - #2
Merged
Merged
Conversation
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>
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.
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_STORAGEstring setting instead of theSTORAGESdict (even though Teak itself runs Django 4.2.20 - a version check would get this backwards). Every settings patch that touchesSTORAGESnow branches on"STORAGES" in globals()at render time, the same presence-detection idiom edx-platform's ownresolve_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 bothdevelopment.pyandproduction.py) strips thebase_urlkey Teak'slms/urls.pystill reads directly, before delegating toS3Boto3Storage.pyproject.toml'stutordependency now reads>=20.0.0,<23.0.0.Verification
Live-tested against three real environments, not just the fabricated-namespace unit tests:
tutor devandtutor local launch(confirms the production/DEBUG=Falsecode path, and that the__name__-based wrapper resolves to the correct production module).STORAGES["profile_image"]still fires exactly as before,PROFILE_IMAGE_BACKENDstays untouched, zero behavioral change.New
exec()-based tests intests/test_patches.pyrun the real rendered patches against fabricated Teak- and Verawood-shaped namespaces (not justcompile()), 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 testgreen in Teak (20.0.5), Ulmo (21.0.9) and Verawood (22.0.2) venvstutor local launchon Teak (production/DEBUG=Falsepath)🤖 Generated with Claude Code