Skip to content

feat: removing get_storage_class from COURSE_IMPORT_STORAGE #36849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2025

Conversation

dwong2708
Copy link
Contributor

@dwong2708 dwong2708 commented Jun 3, 2025

Description

Fixes: #36738

The file cms/djangoapps/contentstore/storage.py was updated to use storages, as get_storage_class will be removed in Django 5.1.

These changes include:

  • Ensuring the updated code is compatible with both Django 4.2 and Django 5 or above
  • Adding test cases to verify the compatibility mentioned above
  • Considering future compatibility with the STORAGES settings

Testing instructions

Run pytest -s cms/djangoapps/contentstore/tests/test_import.py

Functionality verified locally

image

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jun 3, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Jun 3, 2025

Thanks for the pull request, @dwong2708!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

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.


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.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Jun 3, 2025
@dwong2708 dwong2708 changed the title feat: update file storage access to support Django 5.0 storages registry feat: removing get_storage_class from COURSE_IMPORT_STORAGE Jun 3, 2025
@dwong2708 dwong2708 marked this pull request as ready for review June 3, 2025 20:54
@jacobo-dominguez-wgu jacobo-dominguez-wgu added the mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). label Jun 3, 2025
@wgu-taylor-payne wgu-taylor-payne self-requested a review June 4, 2025 05:17
@dwong2708 dwong2708 force-pushed the dw/upgrade-django-5-course-import branch from 53ac66a to a2c8bb2 Compare June 4, 2025 15:12
Copy link
Contributor

@wgu-taylor-payne wgu-taylor-payne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we introduce the same storage.py module here and in #36761 and since the other changes mirror each other, my recommendation is to pull these additions into #36761 (your dwong/updgrade-django-5-get-storages branch), and have that PR close both #36736 and #36738.

@dwong2708
Copy link
Contributor Author

Since we introduce the same storage.py module here and in #36761 and since the other changes mirror each other, my recommendation is to pull these additions into #36761 (your dwong/updgrade-django-5-get-storages branch), and have that PR close both #36736 and #36738.

Thanks, Taylor. This time, I’d prefer to keep this PR separate. Although the cases are very similar, this one follows a different workflow. I’ll follow up with the storage.py module to ensure it contains the same code for both PRs. What do you think?

@wgu-taylor-payne
Copy link
Contributor

Good question. I'm a little unsure of the best strategy, but the current strategy of introducing the same module in two distinct branches seems suboptimal to me. There are other approaches we might consider, but seeing how similar these two PRs, makes me think an easy approach would be combining them into one PR.

Maybe @awais786 and/or @feanil could weigh in on how to best handle these two related PRs?

@dwong2708
Copy link
Contributor Author

Good question. I'm a little unsure of the best strategy, but the current strategy of introducing the same module in two distinct branches seems suboptimal to me. There are other approaches we might consider, but seeing how similar these two PRs, makes me think an easy approach would be combining them into one PR.

Maybe @awais786 and/or @feanil could weigh in on how to best handle these two related PRs?

@wgu-taylor-payne I have an idea. What if we create another PR derived from this one (#36761)? In theory, we would already have storage.py updated for this PR.

@wgu-taylor-payne
Copy link
Contributor

@dwong2708 That sounds good to me 👍 .

@awais786
Copy link
Contributor

awais786 commented Jun 9, 2025

@dwong2708 You can merge one of the PRs first, and then rebase the other one on top of it.

@wgu-taylor-payne wgu-taylor-payne self-requested a review June 9, 2025 15:20
@mphilbrick211 mphilbrick211 moved this from Needs Triage to In Eng Review in Contributions Jun 10, 2025
@dwong2708
Copy link
Contributor Author

This PR has a dependency: #36761

@dwong2708 dwong2708 force-pushed the dw/upgrade-django-5-course-import branch 3 times, most recently from a388e2a to ba5e505 Compare June 17, 2025 20:57
@feanil
Copy link
Contributor

feanil commented Jun 20, 2025

@dwong2708 can you rebase this when you have a sec, then I can merge it.

@dwong2708 dwong2708 force-pushed the dw/upgrade-django-5-course-import branch from ba5e505 to e0a0d01 Compare June 20, 2025 15:07
@dwong2708
Copy link
Contributor Author

@dwong2708 can you rebase this when you have a sec, then I can merge it.

Done. Thanks @feanil

@feanil feanil merged commit 009dd30 into openedx:master Jun 20, 2025
49 checks passed
@github-project-automation github-project-automation bot moved this from In Eng Review to Done in Contributions Jun 20, 2025
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

RemovedInDjango51Warning for get_storage_class in COURSE_IMPORT_EXPORT_STORAGE.
7 participants