Skip to content
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

feat: upgrade to Django 4.2 #4088

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

gsueros
Copy link
Contributor

@gsueros gsueros commented Sep 12, 2023

Issue: edx/upgrades#207
Upgrade to Django 4.2

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 12, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @gsueros! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@eLRuLL
Copy link

eLRuLL commented Sep 12, 2023

@e0d could you please enable tests to run for this PR?

@e0d
Copy link

e0d commented Sep 12, 2023

Yep, done.

@gsueros
Copy link
Contributor Author

gsueros commented Sep 12, 2023

@irtazaakram I saw this PR #4086 related to the same issue about Django upgrade to 4.2, is this feature still needed?. Also there are test errors related to Django32 support, we have to keep support for Django32 or it should be removed from the repository.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
requirements/constraints.txt Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@gsueros
Copy link
Contributor Author

gsueros commented Sep 15, 2023

@e0d please could you help me to enable test to run in the PR?

@UsamaSadiq
Copy link
Member

@gsueros I've made an intermediate PR #4091 to handle the deprecation warnings separately. You can rebase your PR once it has been merged. This'll help you in weeding out the extra changes.

@gsueros
Copy link
Contributor Author

gsueros commented Sep 18, 2023

@e0d please could you help me to enable test to run in the PR?

@gsueros gsueros requested a review from awais786 September 18, 2023 17:13
Makefile Outdated Show resolved Hide resolved
Copy link
Member

@UsamaSadiq UsamaSadiq left a comment

Choose a reason for hiding this comment

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

Hi @gsueros I've updated the issue description according to our internal discussion. We are no longer planning to provide backward compatibility with Django 3.2 so you can follow the instructions and remove the Django 3.2 and Mysql5.7 related envs as well.

@gsueros
Copy link
Contributor Author

gsueros commented Sep 19, 2023

@UsamaSadiq already removed 3.2 backward compatibility, please could you enable to run CI tasks.

@UsamaSadiq
Copy link
Member

@gsueros please rebase your PR to the latest master branch. The PyMemcache backend migration change has been merged in the master branch which is needed to run the tests successfully with Django 4.2

Copy link
Contributor

@Ali-D-Akbar Ali-D-Akbar left a comment

Choose a reason for hiding this comment

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

I approved the wrong PR so please disregard my approval.

Copy link
Contributor

@AfaqShuaib09 AfaqShuaib09 left a comment

Choose a reason for hiding this comment

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

Seems like issue is with the MultiSelectField
countries = MultiSelectField(choices=COUNTRIES, null=True, blank=True)
https://github.com/openedx/course-discovery/actions/runs/6241579132/job/16955605638?pr=4088

@gsueros
Copy link
Contributor Author

gsueros commented Sep 21, 2023

@UsamaSadiq this branch was already updated with the PR about PyMemcache backend migration. I've just updated to PyMemcachedCache in .ci/docker-compose-ci.yml and executed make static because calling python manage.py collectstatic -v 0 --noinput is causing the tests to fail. Please enable to run again the test.

@UsamaSadiq
Copy link
Member

@gsueros please squash your commits and rebase with the latest master branch. It'll help you avoid making mistakes when resolving conflicts during the rebase step.

@gsueros gsueros force-pushed the django-42-support branch from 9c740ac to 42ed994 Compare October 6, 2023 05:58
@gsueros
Copy link
Contributor Author

gsueros commented Oct 6, 2023

@gsueros did you run makemigration and migrate command ? Please run these command once to make sure nothing happens.

Done.

@gsueros
Copy link
Contributor Author

gsueros commented Oct 6, 2023

@gsueros please squash your commits and rebase with the latest master branch. It'll help you avoid making mistakes when resolving conflicts during the rebase step.

@UsamaSadiq Done.

@gsueros gsueros requested a review from UsamaSadiq October 6, 2023 06:00
@iamsobanjaved iamsobanjaved reopened this Oct 6, 2023
@awais786
Copy link
Contributor

awais786 commented Oct 6, 2023

@gsueros tests are not running

giving following error use allowlist_externals to allow it

@UsamaSadiq
Copy link
Member

@gsueros would you please add me as a maintainer in your fork so I can help you in fixing these issues and make the PR ready to merge as soon as possible. Right now, I am only able to guide you step by step which is taking time and we've reached our deadline for the branch cut for next release of openedx (branch release is expected on upcoming Tuesday).

@gsueros
Copy link
Contributor Author

gsueros commented Oct 6, 2023

@gsueros would you please add me as a maintainer in your fork so I can help you in fixing these issues and make the PR ready to merge as soon as possible. Right now, I am only able to guide you step by step which is taking time and we've reached our deadline for the branch cut for next release of openedx (branch release is expected on upcoming Tuesday).

@UsamaSadiq I already send you and ivitation.

@awais786 awais786 closed this Oct 6, 2023
@awais786 awais786 reopened this Oct 6, 2023
@UsamaSadiq UsamaSadiq force-pushed the django-42-support branch 2 times, most recently from 5197d73 to b2773a5 Compare October 7, 2023 10:09
@@ -117,9 +118,8 @@ defusedxml==0.7.1
# djangorestframework-xml
# python3-openid
# social-auth-core
django==3.2.22
django==4.2.6
Copy link
Contributor

Choose a reason for hiding this comment

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

Version upgraded.

@kdmccormick
Copy link
Member

I've made the Django3.2 checks optional so that this PR can merge whenever it's ready.

@DawoudSheraz DawoudSheraz merged commit 3c075d4 into openedx:master Oct 16, 2023
13 checks passed
@openedx-webhooks
Copy link

@gsueros 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

awais786 added a commit to awais786/course-discovery that referenced this pull request Oct 16, 2023
@awais786
Copy link
Contributor

@gsueros congrats !!!

@gsueros
Copy link
Contributor Author

gsueros commented Oct 18, 2023

@gsueros congrats !!!

Thanks.

iamsobanjaved pushed a commit to iamsobanjaved/course-discovery that referenced this pull request Oct 18, 2023
cmltaWt0 pushed a commit that referenced this pull request Nov 22, 2023
* feat: upgrade to Django 4.2 (#4088)

* chore: upgrading `edx-drf-extensions` to fix django42 issue. (#4153)

* chore: using CSRF_TRUSTED_ORIGINS now. No need for extra variable. (#4157)

---------

Co-authored-by: Gustavo Suero <[email protected]>
Co-authored-by: Awais Qureshi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.