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

refactor: Update Django to 4.2 LTS #1543

Closed
wants to merge 23 commits into from
Closed

Conversation

NtskwK
Copy link
Contributor

@NtskwK NtskwK commented Aug 19, 2024

What's new

Docker-compose:

Version top-level element (obsolete)

Django 4.2:

Django 4.2 supports PostgreSQL 12 and highe

django.conf.urls.url() is removed.

django.utils.encoding.force_text() and are removed.smart_text()

PostgreSQL JSONField is deprecated

Others

PostGIS Support Matrix: https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS

unfix:

djangorestframework-simplejwt

there are also many different from django-rest-framework-jwt to djangorestframework-simplejwt. So it can not pass the test in webodm.sh.

rio-tiler

RioTilerBaseModel:warn 'key' access will has been deprecated and will be removed in rio-tiler 7.0."

webpack

  • (node:5096) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET] DeprecationWarning: Compilation.chunks was changed from Array to Set (using Array method
    'map' is deprecated)

  • (node:5096) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
    (Use node --trace-deprecation ... to show where the warning was created)

  • WARNING in webpack performance recommendations: webapp | You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.

django-webpack-loader

There is a bug(?) in static template at v1.0.0 or higher version.

Error during template rendering In template /mnt/d/Program/gitwork/WebODM/app/templates/app/base.html

Docker-compose

Maintainer tag is deprecated

@NtskwK
Copy link
Contributor Author

NtskwK commented Aug 19, 2024

#1471

@pierotofy pierotofy marked this pull request as draft August 19, 2024 22:09
@pierotofy
Copy link
Member

pierotofy commented Aug 19, 2024

Thanks @NtskwK 👋 I haven't had a chance to review everything, but a few things stand out right away:

  • Please do not remove the database migrations! This would break updates from older versions.
  • It's nice to update Postgres to a newer version (ref Upgrade to PostgreSQL 12.x #826), but I do not see a mechanism for performing a seamless update when users issue ./webodm.sh update. This is a requirement for considering updating the database, and we are not going to break the installation for thousands of people. See this comment here Upgrade to PostgreSQL 12.x #826 (comment)

There might be other things that need to be addressed, but these two stood out.

@NtskwK NtskwK marked this pull request as ready for review August 20, 2024 05:20
@NtskwK
Copy link
Contributor Author

NtskwK commented Aug 20, 2024

Yes, an automated scripts souds good.
I see those files are not compatible here. It must be solved.

db\Dockerfile
...
> 83 | VOLUME /var/lib/postgresql/data

I have never tried to migrate database with data. Could you give me some suggest?

@NtskwK
Copy link
Contributor Author

NtskwK commented Aug 20, 2024

I have revert to recover migrations files just now.

Then, I found some manual about migration with the old data. But I have no idea for it.

https://www.postgresql.org/docs/current/pgupgrade.html

@NtskwK NtskwK closed this Aug 25, 2024
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.

2 participants