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

chore!: upgrade Django version to 4.2 (LTS) #33969

Merged
merged 8 commits into from
Jan 23, 2024

Conversation

iamsobanjaved
Copy link
Contributor

@iamsobanjaved iamsobanjaved commented Dec 21, 2023

Upgrade to Django 4.2

Issue: #32833

This is final django42 upgrade PR for production.

  • sandbox created
  • ecommerce checkout working
  • import/export and few celery tasks tested.
  • makemigration does not bring new migration.
  • migrate does not run any hidden migration.
  • sha1 value updated to sha256 in settings.py

Muhammad Soban Javed and others added 6 commits December 21, 2023 18:27
chore!: upgrade Django version to 4.2

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
…5375ea

feat: Upgrade Python dependency Django
@feanil
Copy link
Contributor

feanil commented Jan 17, 2024

@awais786 @iamsobanjaved what's left to do before this can merge?

@iamsobanjaved
Copy link
Contributor Author

@feanil We were testing on the sandbox and fixing issues after the MySQL upgrade on production, it is ready to merge now but there are some issues in the deployment pipelines of edx-platform. We will attempt once the pipeline issue is fixed.

@iamsobanjaved iamsobanjaved merged commit fc8e40f into master Jan 23, 2024
46 checks passed
@iamsobanjaved iamsobanjaved deleted the iamsobanjaved/django-42 branch January 23, 2024 11:53
@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.

@awais786
Copy link
Contributor

awais786 commented Jan 24, 2024

Production and stage amis failed. But edge build was fine. We are debugging this issue now. Apparently some js file has some invalid character. Its due to some internal requirment.

Django4 has some changes related with JS resource maps. 

https://docs.djangoproject.com/en/4.0/releases/4.0/#django-contrib-staticfiles

2024-01-23 13:59:47,127 WARNING 112197 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/conf/__init__.py:201: RemovedInDjango51Warning: The STATICFILES_STORAGE setting is deprecated. Use STORAGES instead.
  self._show_deprecation_warning(

Traceback (most recent call last):
  File "manage.py", line 106, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 209, in handle
    collected = self.collect()
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 148, in collect
    for original_path, processed_path, processed in processor:
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/require/storage.py", line 175, in post_process
    for path in super_class.post_process(paths, dry_run, **options):
  File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/theming/storage.py", line 300, in post_process
    yield from super_class.post_process(paths.copy(), dry_run, **options)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pipeline/storage.py", line 42, in post_process
    yield from super_class.post_process(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/contrib/staticfiles/storage.py", line 488, in post_process
    yield from super().post_process(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/contrib/staticfiles/storage.py", line 301, in post_process
    for name, hashed_name, processed, _ in self._post_process(
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/contrib/staticfiles/storage.py", line 364, in _post_process
    content = original_file.read().decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants