Skip to content

fix: pin drf-yasg below 1.21.17 to unbreak collectstatic - #3010

Open
GlugovGrGlib wants to merge 1 commit into
openedx:masterfrom
GlugovGrGlib:g-glugovskiy/pin-drf-yasg
Open

GlugovGrGlib wants to merge 1 commit into
openedx:masterfrom
GlugovGrGlib:g-glugovskiy/pin-drf-yasg

Conversation

@GlugovGrGlib

@GlugovGrGlib GlugovGrGlib commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Description

The requirements bot PR #3009 fails unit_tests before any test runs: make static crashes in collectstatic:

Post-processing 'drf-yasg/redoc-old/redoc.min.js' failed!
ValueError: The file 'drf-yasg/redoc-old/redoc.min.map' could not be found with <ManifestStaticFilesStorage ...>

Cause: drf-yasg 1.21.17 (bumped from 1.21.15 in #3009) changed the last line of static/drf-yasg/redoc-old/redoc.min.js from //# sourceMappingURL=redoc.min.js.map to //# sourceMappingURL=redoc.min.map, but the wheel still ships the map as redoc.min.js.map. ManifestStaticFilesStorage resolves source-map references and fails on the missing file. I confirmed this by diffing the 1.21.15 and 1.21.17 wheels. It's the same packaging regression drf-yasg had in 1.21.6 (axnsan12/drf-yasg#855). The Django 5.2.17 → 5.2.18 bump in the same PR is not involved.

This PR adds drf-yasg<1.21.17 to requirements/constraints.txt, with a comment explaining when to remove it. Compiled .txt files on master are already at 1.21.15, so nothing else changes here; the next bot run (or a re-run of the Upgrade Requirements workflow) will regenerate #3009 with the pin applied.

Verified with pip-compile that the constraint resolves to drf-yasg==1.21.15 together with django==5.2.18.

drf-yasg 1.21.17 ships redoc-old/redoc.min.js ending with
'//# sourceMappingURL=redoc.min.map', while the bundled source map is
redoc.min.js.map. ManifestStaticFilesStorage follows the reference and
collectstatic fails, breaking unit_tests in the requirements bot PR
(openedx#3009). This is the same regression drf-yasg had in 1.21.6
(axnsan12/drf-yasg#855).
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @GlugovGrGlib!

This repository is currently maintained by @jajjibhai008.

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Oct 6, 2026
@e0d

e0d commented Oct 7, 2026

Copy link
Copy Markdown
Member

@feanil should we be updating this repo to use the latest API doc tooling so we can remove this dependency? It looks like there have been no updates to this dependency upstream in a year.

@feanil

feanil commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Yes, We should move this to DRF spectacular like we have done so with openedx-platform. I'll create an issue and follow up on that.

@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: No status
Status: Waiting on Author

Development

Successfully merging this pull request may close these issues.

5 participants