Repository navigation
sandbox.opencraft.com deployment tracking | DO NOT CLOSE - #824
Draft
kaustavb12 wants to merge 1042 commits into
Draft
kaustavb12 wants to merge 1042 commits into
kaustavb12 wants to merge 1042 commits into
Conversation
kaustavb12
marked this pull request as draft
February 6, 2026 08:34
The production reader is a SettingToggle('ENABLE_EXPORT_GIT') that reads the flat
settings.ENABLE_EXPORT_GIT. The git-export command test still enabled it by building a
FEATURES_WITH_EXPORT_GIT = settings.FEATURES.copy() and applying
@override_settings(FEATURES=...). Drop the dict copy and fold ENABLE_EXPORT_GIT=True into
the class-level override_settings so no settings.FEATURES usage remains; the SettingToggle
picks up the flat override.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
…RES-as-dict CERTS_HTML_VIEW_CONFIG_PATH is not read anywhere in the platform anymore, so the CertificateHtmlViewConfiguration test's FEATURES override is a no-op. It was applied via a FEATURES_INVALID_FILE_PATH = settings.FEATURES.copy() + @override_settings(FEATURES=...). Convert to the equivalent flat @override_settings(CERTS_HTML_VIEW_CONFIG_PATH=...) (still a no-op, but off the dict), drop the dict copy, and remove the now-unused settings import. Co-Authored-By: Claude Opus 4.8 <[email protected]>
These flags are now flat Django settings, but several comments/docstrings still described them as FEATURES-dict keys, and each kept a 'settings.FEATURES' reference alive in a repo-wide grep. Update them to the flat setting they now describe: - embargo/middleware.py: settings.FEATURES['EMBARGO'] -> settings.EMBARGO - git_export.py: FEATURE['ENABLE_EXPORT_GIT'] -> ENABLE_EXPORT_GIT setting - auto_auth.py: settings.FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] -> settings.AUTOMATIC_AUTH_FOR_TESTING - split_mongo/split.py: reword the historical entrance-exams comment off the dict syntax - test_auto_auth.py: update the setUp comments to name the flat setting No code/behavior change; comment/docstring text only. Co-Authored-By: Claude Opus 4.8 <[email protected]>
testutil.AUTH_FEATURE_ENABLED was hasattr(settings, 'ENABLE_THIRD_PARTY_AUTH'), which is true under LMS settings (the flag is defined in lms/envs/common.py, absent from cms/envs) and false under CMS, regardless of the flag's value. So both @unittest.skipUnless(AUTH_FEATURE_ENABLED, ...) and the skip_unless_thirdpartyauth() helper (whose docstring literally says "skip ... tests in CMS") were roundabout ways of saying "run only in the LMS test suite" -- but they read as if they gated on the feature being enabled, which was misleading. Replace every usage with the existing @skip_unless_lms decorator and delete AUTH_FEATURES_KEY, AUTH_FEATURE_ENABLED, and skip_unless_thirdpartyauth(). Behavior is unchanged: these tests run in the LMS suite and skip in the CMS suite (verified locally: LMS runs, CMS skips). Co-Authored-By: Claude Opus 4.8 <[email protected]>
…onsolidated feat: pip-compile -> uv migration
Nothing in edx-platform wires up django-storage-swift or an openstack.py settings module. Carried over from requirements/edx/openstack.txt during the uv migration; dropping it removes 14 unused transitive deps.
…ck-extra fix: remove unused openstack extra
* fix: added inline commit lint * fix: corected the inline comment * fix: updated pylintrc * feat: Upgrade Python dependency edx-lint Bump edx-lint to latest. This will need #39022 to fast-follow to prevent failing checks. Commit generated by workflow `openedx/openedx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` --------- Co-authored-by: bmtcril <[email protected]>
The LMS setting ENABLE_MFE_CONFIG_API (default False) gated two read-only endpoints used by frontends: GET /api/mfe_config/v1 GET /api/frontend_site_config/v1/ Both return only non-sensitive frontend configuration, and both are empty unless an operator populates MFE_CONFIG, MFE_CONFIG_OVERRIDES, or FRONTEND_SITE_CONFIG. There was no reason to keep them off by default, so the toggle is gone and both endpoints now respond unconditionally. The data settings (MFE_CONFIG, MFE_CONFIG_OVERRIDES, FRONTEND_SITE_CONFIG) are unchanged and remain how operators control what these endpoints return. The toggle was LMS-only; there was no CMS equivalent. Removes: - the toggle definition and annotation in lms/envs/common.py - the `if not settings.ENABLE_MFE_CONFIG_API` guards in MFEConfigView.get and FrontendSiteConfigView.get, plus the HttpResponseNotFound / NotFound imports they were the only users of - the ENABLE_MFE_CONFIG_API overrides in lms/envs/test.py and lms/envs/mock.yml - the two "returns 404 when disabled" tests, which no longer describe any reachable behaviour See DEPR ticket: #38959 BREAKING CHANGE: Operators who set ENABLE_MFE_CONFIG_API in their LMS_CFG yaml or a private settings module should drop the line; the key is now ignored. If you set it to True, deleting it is all that is needed -- that is the new default. If you set it to False *and* populated MFE_CONFIG, MFE_CONFIG_OVERRIDES, or FRONTEND_SITE_CONFIG, that configuration is now served publicly by the two endpoints above; review or clear it if it should not be public. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
ADR 0001 recorded the decision to gate the MFE config API behind ENABLE_MFE_CONFIG_API. That decision has been reversed, so replace the bullet with the current state -- the API is always available -- while keeping the history and linking the DEPR ticket that removed the toggle. See DEPR ticket: #38959 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…8674) * fix: surface EnrollmentNotAllowed message to instructor dashboard Co-authored-by: Cursor <[email protected]> * chore: retrigger CI * test: cover enrollment errors on instructor API --------- Co-authored-by: Cursor <[email protected]>
The programs API has two variants: B2C and B2B:
- B2C: `GET /api/dashboard/v1/programs/`
- B2B: `GET /api/dashboard/v1/programs/{enterprise_uuid}/`
The B2B variant uses enterprise internal functions to help filter the
response to include only enterprise-subsidized enrollments. This can't
go on any longer because we need to remove all enterprise imports from
the platform.
This commit replaces those enterprise function calls with a plugin hook
point. We introduce the `OVERRIDE_PROGRAMS_GET_ENTERPRISE_COURSE_IDS`
pluggable override which allows the enterprise plugin itself register an
implementation, allowing all `enterprise` imports to be removed from the
programs API views.py file.
ENT-11575
feat: [programs API] replace enterprise dependency with plugin hook
…ry-database-41268412679 Update GeoLite Database
pytest 9.2.0 renamed the private FixtureManager._arg2fixturedefs to _arg2node2fixturedefs as part of the fixture-resolution rework in pytest-dev/pytest#14635. pylint-pytest 1.1.9.post1 still reads the old name in its pytest_sessionfinish hook, so with pytest 9.2.0 every file pylint checks fails with F0002 (astroid-error): AttributeError: 'FixtureManager' object has no attribute '_arg2fixturedefs'. Did you mean: '_arg2node2fixturedefs'? That is why all seven pylint jobs went red on the requirements bump that moved pytest 9.1.1 -> 9.2.0. The fix is upstream in pylint-dev/pylint-pytest#164 (approved, unreleased), tracked by pylint-dev/pylint-pytest#163. Constrain pytest to <9.2.0 in [tool.edx_lint].uv_constraints and regenerate with `make compile-requirements`; only pytest moves. Removing the constraint once a pylint-pytest release includes that fix is #39337. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…irements-f2fc446 chore: Upgrade Python requirements
Django 5.2.19 security release: fixes multipart base64 upload memory use, Vary cache-key collisions, admin password hash visibility for view-only users, and GeoDjango/GDAL issues. See https://www.djangoproject.com/weblog/2026/nov/03/security-releases/ Commit generated by workflow `openedx/openedx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` Co-authored-by: robrap <[email protected]>
* build: pin JS tests to ubuntu-24.04 The xmodule Karma video specs time out on ubuntu-26.04, which ubuntu-latest is migrating to by 2026-11-19. Pin to 24.04 until the specs are fixed. See #39346. Co-Authored-By: Claude <[email protected]> * build: pin runs-on instead of matrix.os so the job name is unchanged Keep matrix.os as ubuntu-latest so the JS job keeps its current name (and any required check on it), and pin runs-on to ubuntu-24.04. Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
Reverts #39055 while the interaction between course and library permissions remains under discussion.
The page shown after a learner confirms an email change said the new address is visible on the dashboard, which never shows it. Link to the Account MFE (honouring site configuration) where the email is shown.
* feat: mathjax upgrade v2 to v3 - Pin CDN URLs to [email protected] - Fix mathjax_delay_renderer.js immediate path to pass DOM node - Add null guard in capa/display.js for missing math element - Fix CSS syntax: comma to semicolon in MathJax SVG rules - Pass textContent instead of innerHTML for security * fix(mathjax): use chtml output * fix(mathjax): support v4 formula previews * fix(mathjax): render formula previews with v4 - mathjax_delay_renderer.js: add typesetClear before .html() in both immediate and delayed paths, so MathJax v3/v4 re-renders replaced content - capa/display.js refreshMath: replace v2 Hub.Queue/getAllJax with v3/v4 typesetClear/typesetPromise; add typesetClear before setting preview textContent; unify rendering to AsciiMath/backtick for all non-tex-delimited input (fixes formula preview for formulaequationinput where * → multiplication and / → fraction instead of literal chars) - capa/display_spec.js: add tests for calculator syntax backtick wrapping, TeX delimiter preservation, and empty-input early return * temp: fix * fix(mathjax): enable extracted xblocks for v4 * fix(mathjax): stabilize v4 xblock rendering * fix(mathjax): restore dollar delimiters * fix(mathjax): remove redundant dollar delimiter config and detection Dollar delimiters ($...$, $$...$$) are MathJax 3 defaults, so explicit config is redundant. Remove them from config, inline detection, and tests, and simplify the tag-detection logic (no remaining self-matching pairs). * fix: remove invalid settings * chore: apply suggestion BREAKING CHANGE: The platform now loads MathJax 4.1.2 with CHTML output in place of 2.7.5 with SVG output. Custom themes that style the MathJax_SVG output classes and XBlocks or other frontend code that call the MathJax.Hub API stop rendering math until they move to the MathJax 4 API (window.MathJax config and typesetPromise) and the mjx-container output.
fix: apply openedx-authz manage_tags orgs consistently across tagging rules
…#39355) Fixes the RTD build failure that surfaced on the xblocks-core upgrade PR [1]: django.core.exceptions.ImproperlyConfigured: The LOCALE_PATHS setting must be a list or a tuple. docs/docs_settings.py called into app code (get_api_docs_settings()), which reads django.conf.settings, which points right back at docs_settings. Django then tried to configure itself from the half-loaded module, where LOCALE_PATHS was still an unresolved Derived, and rejected it. This only worked before [1] by accident: xblocks-contrib's Django app plugin entry point loaded every xblock at settings-import time, and one of them touched django.conf.settings early enough to paper over the problem. xblocks-core's entry point doesn't, so the accident went away. Quick fix: use the API_DOCS_SETTINGS constant directly instead of calling get_api_docs_settings(). The real fix is that settings shouldn't import app code at all; the defaults should live in settings, and apidocs.py should import them. Draft refactoring, open for discussion: [2] [1] #38473 [2] #39356 Co-Authored-By: Claude Fable 5.1 <[email protected]>
xblocks-contrib has been renamed to xblocks-core. Its 2.0.0 release moves each built-in XBlock out of the shared xblocks_contrib namespace and into its own top-level package (xblock_problem, xblock_video, ...). Swap the dependency for xblocks-core 2.0.0 from PyPI, and point imports of the extracted blocks at the new xblock_* modules. - xblocks_contrib.poll becomes xblock_poll_question, matching its entry point and <poll_question> tag; xblock_poll is OpenCraft's newer poll XBlock. - Point XBLOCK_NOAUTH_HANDLER_ALLOWLIST at the new LTI and video handler paths. - Update docs that referred to xblocks-contrib. BREAKING CHANGE: If you override XBLOCK_NOAUTH_HANDLER_ALLOWLIST, replace the old LTI and video handler entries with their new paths, or LTI 1.1 grade passback and video transcript downloads will stop working: Remove: xblocks_contrib.lti.lti.LTIBlock.grade_handler xblocks_contrib.lti.lti_2_util.LTI20BlockMixin.lti_2_0_result_rest_handler xblocks_contrib.video.video_handlers.VideoStudentViewHandlers.transcript Add: xblock_lti.block.LTIBlock.grade_handler xblock_lti.lti_2_util.LTI20BlockMixin.lti_2_0_result_rest_handler xblock_video.video_handlers.VideoStudentViewHandlers.transcript The lti_consumer entries are unchanged. Part of: openedx/xblocks-core#237 Part of: openedx/xblocks-core#149 Co-Authored-By: Claude Opus 4.6 <[email protected]>
…en models (#37988) * feat: [FC-7879] add signal handler to save assignment dates to edx-when models * feat: [AXM-2300] map course assignments to edx-when Assignment DTOs * fix: [AXM-2300] read published course for assignment dates task * fix: [AXM-2300] modify draft blocks under draft branch in task tests * test: [AXM-2300] drop unpublished subsection test
…39255) * chore: upgrade openedx-authz to 3.1.0 * feat: enforce AuthZ permissions in the Instructor Dashboard API v2 Add shared infrastructure to check Instructor Dashboard permissions with openedx-authz, driven per course by the authz.enable_course_authoring flag (AuthZ when enabled, legacy roles otherwise). - Add InstructorAuthzPermission, user_has_instructor_permission and the legacy checks under lms/djangoapps/instructor/authz. - Use them in CourseMetadataView, which returns authz_enabled and resolves the dashboard tabs through AuthZ. - Seed the tests with the static AuthZ schema, as openedx-authz 3.1.0 no longer ships authz.policy. The schema is compiled once per process, as compiling it on every test is too slow. - Add tests and a migration guide. * fix: return error_code permission_denied on Instructor AuthZ denials DRF reads message and code from the permission class when access is denied. Declare them in InstructorAuthzPermission and make DeveloperErrorViewMixin expose the code of a PermissionDenied as error_code, so the 403 follows the standard error format required by openedx/openedx-authz#485. * fix: keep the legacy access of legacy roles in the Instructor Dashboard with AuthZ With authz.enable_course_authoring enabled, only AuthZ was consulted for the Instructor Dashboard. openedx-authz maps the legacy limited staff, data researcher and beta tester roles to AuthZ roles that hold no dashboard permission, only a compatibility permission, so these users got a 403 and lost the access their legacy rules gave them. Add a compatibility module with the compatibility permission of each of those roles. When AuthZ denies and the user holds one of them, the decision falls back to the legacy check, the same one used with the flag disabled, so each role keeps exactly its legacy access. Roles that hold dashboard permissions, such as course admin and course staff, are not included: AuthZ is authoritative for them. --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Record a learner's competency criterion status on every subsection grade write, with no setting to switch it on. In a deployment with no competency criteria the core call is one SELECT that returns no rows and queues no roll-up task, so the gate saved almost nothing and added a configuration step an operator could miss. The setting was added by #39179 and shipped in no named release. Operators tracking master who never set it now run the competency write on every grade, and a competency storage failure fails the grade write, as the design requires. Each scored subsection grade write now runs one extra SELECT, and the query-count assertions in the grades tests are raised to match. Related to openedx/openedx-core#924 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…uthz (#39369) * chore: upgrade openedx-authz to 3.2.0 and import constants from openedx_authz.authz --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
* feat: remove legacy Django unit editor The legacy unit editor (controlled by LEGACY_STUDIO_UNIT_EDITOR waffle flag) has been fully removed. The MFE-based unit editor (frontend-app- authoring) is now the only editor and is always active. Removed: - LEGACY_STUDIO_UNIT_EDITOR CourseWaffleFlag - container_handler legacy Django-rendered path (now always redirects to MFE) - xblock_edit_view and xblock_edit_handler URL (/xblock/<key>/action/edit) - container.html and container_editor.html templates - unit_outline_spec.js and related legacy tests Kept (still used by MFE): - container_embed_handler and /container_embed/<key> URL - container_chromeless.html template (rendered for MFE iframes) - use_new_unit_page serializer field (hardcoded True; MFE still reads it) Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix: remove unused imports and stale Karma spec reference - Remove unused imports in block.py (xframe_options_exempt, render_to_response, _get_item_in_course) - Remove unused libraries_v1_enabled import in component.py - Remove unused ADVANCED_COMPONENT_TYPES import in test_contentstore.py - Remove unused BeautifulSoup import in test_block.py - Fix trailing newlines in test_block.py and test_container_page.py - Remove deleted unit_outline_spec.js from Karma spec list in main.js Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix: remove legacy test_container_html and revert split_test fallback The test_container_html was testing legacy Django-rendered HTML content (breadcrumbs, section tags from the deleted container.html template). Removed it since the legacy editor is gone and the split_test container URL (/container/<key>) was legacy-only — the MFE does not use it. Also reverts the get_parent_xblock fallback added to container_handler as it was adding new functionality rather than just removing legacy code. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor: restore xblock_edit_view and remove use_new_unit_page from toggles - Restore xblock_edit_view, container_editor.html, and the xblock_edit_handler URL — the Authoring MFE still calls /xblock/<id>/action/edit to load the xblock edit modal in an iframe (getLegacyEditModalUrl in xblock-container-iframe) - Remove use_new_unit_page() from toggles.py — it had no remaining callers after container_handler was simplified to always redirect to the MFE Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix: fix multiple review comments - container_handler: redirect any xblock with its own Studio page (via xblock_has_own_studio_page) instead of only units/library-content/ split-test-children, fixing a 404 for nested containers (e.g. split_test) that Studio still links to directly - drop unused lms_link/preview_lms_link locals in container_handler - repoint get_page_html at container_embed_handler (what the MFE actually loads) instead of container_handler, which now only redirects - restore container page test coverage for a unit, a split_test, and a nested wrapper container via container_embed_handler - add a split_test redirect test case to container_handler's redirect test - remove dead test helpers _check_verticals/check_verticals (their only caller was already removed) - remove a stray blank line left in toggles.py - update get_use_new_unit_page docstring to reflect that the Authoring MFE never read this waffle flag key - delete the dead unit_outline JS view, its child view, and template: their only mount point (.wrapper-unit-overview) existed solely in the already- removed legacy container.html Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: remove dangling unit-outline entry from CONTAINER_TEMPLATES CONTAINER_TEMPLATES is rendered into every container_embed_handler, xblock_edit_view, and library page via get_container_handler_context. It still listed "unit-outline" after the underlying unit-outline.underscore template file was deleted, breaking those pages with TemplateDoesNotExist: js/unit-outline.underscore. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: redirect split test group verticals to their split test page Restore the get_parent_if_split_test fallback in container_handler so /container/<group vertical> redirects to the parent split test's MFE page instead of returning a 404. Studio still links to these URLs from the deprecated-blocks list and the import error page. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fixup! feat: remove legacy Django unit editor Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]> Co-authored-by: Kyle D McCormick <[email protected]> Co-authored-by: Feanil Patel <[email protected]>
…irements-32e2f7d chore: Upgrade Python requirements
* build: drop the django42 test dependency group Nothing in CI selects it: migrations-check.yml and unit-tests.yml only run django-version "pinned", which resolves Django through the testing group's own Django<6.0 constraint (5.2.x today). The group's only effect was on uv.lock, where the django42/django52 conflict set forced a second resolution for every package whose newest release no longer supports Django 4.2. lti-consumer-xblock 11.5.0 (django>=5.2) was the latest: the 2026-11-13 requirements bump (#39373) locked 11.4.4 for django42 and 11.5.0 for everything else. Removing the group and the [tool.uv].conflicts entry collapses those packages to the version the pinned environment already installs (django, django-autocomplete-light, django-filter, django-ipware, django-simple-history, edx-auth-backends, event-tracking, lti-consumer-xblock); no package in the pinned set changes version. The django52 group stays for a future explicit-version matrix leg. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fixup! build: drop the django42 test dependency group --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
AssetManager.find() has been a plain pass-through to contentstore().find() for many years. This commit: - replaces `AssetManager.find` with `contentstore().find()` everywhere - marks `AssetManager` as deprecated Co-Authored-By: Claude Opus 5.5 <[email protected]>
(In practice, every export going back many years contains an empty assets.xml file that only contains "<assets/>". The only way to put data into this file was importing a course that already contained such metadata, and even then it wouldn't affect anything.) Course export now always writes an empty assets/assets.xml (for backwards compatibility), and course import ignores that file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… API Nothing uses asset metadata in the modulestore any more: Studio never populated it, and course import/export no longer read or write it. Mark AssetMetadata, CourseAssetsFromStorage, and the asset metadata methods of the modulestore interface and MixedModuleStore as deprecated, so that they can be removed in a future release. Also add xmodule.util.deprecation.deprecated, which provides warnings.deprecated on Python 3.13+ and the typing_extensions backport on older versions, and simplify the Old Mongo modulestore's delete_all_asset_metadata() (still used when deleting a course) so that it doesn't use the deprecated classes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Temporarily bring us back to 2.3.0 until the fix in 2.3.1 is superseded. See openedx/edx-lint#590 Commit generated by workflow `openedx/openedx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` Co-authored-by: UsamaSadiq <[email protected]>
GET /api/content_tagging/v1/object_tags/{object_id}/ now reports a
taxonomy_type ("tags"/"competency") on each taxonomy entry, with the
same values as the taxonomy endpoints, so the Course Outline and
Libraries pages can hide the remove control on competency tags. PUT
returns through the same path, so its response carries the field too.
ObjectTagOrgByTaxonomySerializer computes the type with
openedx_learning.api's is_competency_taxonomy(). It loads the object's
taxonomies once through select_competency_taxonomies(), so the check
costs one query per request, whatever the number of taxonomies.
Per ADR 0013 (openedx-core), computed through the CBE public API
instead of naming the CompetencyTaxonomy relation directly.
Closes openedx/openedx-core#783
…mory (#38946) DjangoStorageReportStore.store() read its entire buffer into memory, re-encoded it, and copied it into a ContentFile before handing it to the storage backend: buff_contents = buff.read() # whole file into RAM if not isinstance(buff_contents, bytes): buff_contents = buff_contents.encode('utf-8') # second copy buff = ContentFile(buff_contents) # third self.storage.save(path, buff) That put peak memory at roughly 3x the report size at the final step, and it undid most of the benefit of TemporaryFileReportMixin: that mixin spills rows to a temp file specifically to avoid holding the report in memory, then the upload read the whole thing straight back in. The ReportStore docstring has anticipated this for some time -- "Should probably refactor later to create a ReportFile object that can simply be appended to for the sake of memory efficiency". A binary buffer is now handed to the backend as-is, so it streams: S3Boto3Storage uploads in parts, FileSystemStorage writes in chunks, and peak memory is one chunk rather than the whole report. Text buffers still work, and still have to be read in full because the backends require bytes. Both in-tree callers that pass text are unaffected in behaviour; the type is probed with a zero-length read rather than by inspecting mode attributes, which are not consistently present across the raw file objects, ContentFile and BytesIO instances that callers pass. Two callers move to binary so they take the streaming path: * TemporaryFileReportMixin now opens its temp files 'w+b' and writes through a TextIOWrapper, which is what makes the on-disk grade report actually bounded end to end rather than only during row generation. * store_rows() builds its CSV in a BytesIO by the same means. Both wrappers use newline='' per the csv module's contract -- the writer emits its own line terminators and must not have them translated again -- and are detached rather than closed, so the underlying file outlives the wrapper. Tests assert the streaming behaviourally rather than by inspecting call args: a streaming backend reads in bounded chunks, so an unbounded read() is the signature of the report being slurped into RAM. Added to ReportStoreTestMixin so they run against all three configurations, including the S3 stub. Round-trip tests cover the binary, text and store_rows paths; CSV bytes are unchanged. Completes the last of the five findings in the issue. Refs: #38943 Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is a PR for tracking upstream master, and auto-deploying/updating the https://sandbox.opencraft.com/ Open edX instance, using the PR sandbox automation.
This PR should be kept open, because this sandbox is actually a long-lived instance for demo purposes.
The settings headings below are custom settings that are applied to the instance by the automation.
Internal tickets:
WARNING: use single quotes, not double quotes when quoting settings below. There is an issue with the workflow relating to quote escaping being overly zealous.
Settings
Tutor requirements