build: bump xblocks-contrib to 1.0.3 (fixes author-side ungraded problems, mitodl/hq#12023) - #38960
Conversation
|
Thanks for the pull request, @AhtishamShahid! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
CI evidence from the first commit
with the cause visible in the logs (run 31097321942): The blast radius in CI is wider than the 17 modules that import those fixtures directly — Current state: draft, pointing at the fix branch
and Note the Next stepOnce #286 merges and releases as 1.0.4, I'll replace the VCS reference with the released pin and take this out of draft. No changes to this repo's own code are needed — the only reason the bump was reverted in 2d315eb is the upstream packaging bug. |
Updated for the long-term upstream shapeopenedx/xblocks-core#286 has been reworked. Rather than re-shipping a Verified with the resulting wheel installed on Python 3.12: the previously-erroring modules collect cleanly (1281 tests collected, 0 errors) and The VCS reference now points at that PR's latest commit. Sequencing is otherwise unchanged: once #286 merges and releases, this goes back to a released pin ( |
8c201ee to
7922a93
Compare
|
Rewrote this branch to clean history — the two
The CI evidence for the original failure is preserved in run 31097321942 and referenced from the description, so dropping that commit loses nothing. Also note openedx/xblocks-core#286 has itself been trimmed to the minimum — it no longer touches |
7922a93 to
5ae1800
Compare
openedx/xblocks-core#286 moves the capa fixtures this repo imports out of `xblocks_contrib.problem.capa.tests`, which no 1.0.x wheel ships, into a `capa.testing` package that does: capa.tests.response_xml_factory -> capa.testing.response_xml_factory capa.tests.test_util.UseUnsafeCodejail -> capa.testing.codejail.UseUnsafeCodejail Update all 17 importers accordingly.
Picks up the CapaBlock grading fix released in 1.0.3 (openedx/xblocks-core#272), which restores the correct score and graded state for a problem added to a graded subsection when viewed by its author. Reverses the pin from 2d315eb. Points at the branch behind openedx/xblocks-core#286 while that is unreleased, because no released 1.0.x wheel ships the capa fixtures this repo's tests import. Becomes `xblocks-contrib==1.0.4` once edly-io#286 is released.
5ae1800 to
8c7c17a
Compare
What this fixes
A problem added to a graded subsection displays as
0 points / ungraded— but only to the author who created it. Everyone else sees it correctly, and duplicating the problem also renders correctly.get_progress()reads grading off the persisted user-state score, and the author ends up with a stale one:max_score()is 0.lcpseesscore is Noneand persistsScore(0, 0)— for this author only.max_score()is now 1.lcpwill not refresh the score, becausescoreis no longerNone, soraw_possiblestays 0.get_progress()returnsNone, and the author sees0 points, ungraded.Any other user has no persisted state, so their score reflects the current problem (
Score(0, 1)) and they correctly see1 point possible (graded). That asymmetry is what made this confusing to report.Fixed upstream in openedx/xblocks-core#272, released in
xblocks-contrib1.0.3 on 2026-07-29. It has never reached a deployment because this repo is still pinned to 0.17.0.This affects the code that actually runs:
USE_EXTRACTED_PROBLEM_BLOCKdefaults toTrue, soxmodule.capa_block.ProblemBlockresolves toxblocks_contrib.problem.capa_block.ProblemBlockat runtime.Why the pin is stuck at 0.17.0
Not lag — a deliberate revert. 2d315ebd69 ("build: downgrade xblocks-contrib — The renaming is causing some conflicts and causing tests to fail") reverted the bot's bump from 1.0.1, because no 1.0.x wheel ships
xblocks_contrib.problem.capa.tests, which this repo imports from 17 of its own test modules.Pinning the released 1.0.3 fails every unit-test shard with
ModuleNotFoundError: No module named 'xblocks_contrib.problem.capa.tests'— demonstrated on this branch earlier, run 31097321942. The blast radius is wider than the direct importers, sincelms/djangoapps/grades/tests/base.pyis imported transitively.That is an upstream packaging bug, fixed by openedx/xblocks-core#286.
The two commits
937130356a8c7c17a4feImport changes, per openedx/xblocks-core#286:
The requirement currently points at that PR's branch (
f532c455cd) so CI can run green against the fix. Verified locally with that wheel installed (Py3.12): the previously-erroring modules collect with 0 errors,xmodule/tests/test_capa_block.pypasses 201/201, and the reported bug is gone — the author now getsProgress(0, 1)/(0, 1)instead ofNone/(0, 0).Compile requirementsandcheck_dependenciesare expected to fail while a VCS requirement sits in the compiled files.Sequencing
xblocks-contrib==1.0.4— a one-commit amend — and comes out of draft.No changes to this repo's own source are needed — only test imports and the pin.
Note on the built-in copy
xmodule/capa_block.py's_BuiltInProblemBlock.get_progresshas the same defect, so deployments runningUSE_EXTRACTED_PROBLEM_BLOCK = Falsestay affected after this bump. Left alone here since #38751 removes that implementation — happy to port the guard across if you'd prefer an interim fix.