-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
GNIP 98: Django upgrade to 4.2 LTS #11821
Comments
For who is interested, i was able to upgrade geonode by changing the minimum as possible. In the end, the main changes are:
What is missing:
|
Thanks, I made a lot of forks to upgrade the broken deps and so on. I did saw that keywords and thesaurus will not work because some strange in autocomplete light, but regions uses autocomplete too but in another way, maybe is a good point to standardize all the forms in a clean way. And dropping old dependencies like jQuery etc. I see in mapstore client at user profile a thing that calls AngularJS... Why there is at the same time react AngularJS and jQuery? This can become be unmaintainable... |
Starting from version 4.0, we moved the FE from Geonode to the mapstore client. I suggest leaving this matter out of the issue/PR and instead focusing on upgrading Django to a newer version without disrupting backward compatibility. |
sa decided with @giohappy we will remove |
as decided with @giohappy we will remove |
Sorry, why? i guess haystack/elasticsearch is a good complement to improve any django project about searching |
That part is unmaintained since geonode 33x. The search was changed in geonode 4.0 and that part was not mainteined anymore. |
Hello, sorry, i was a bit afk because vacations and so on, i'd return and available again. I just noticed that there is a new release of 4.2.0, i want to continue with the integration of django 4.2, so, i have to ask you what branch i need to take, because my changes were on 4.1.x so i have to make my changes on a new branch, but i'm not sure about choosing 4.2.x or 4.2.0 or master. Please let me know what brach is the best choice to make my contrib proposals. |
I already done the main integration to the master branch starting from your changes and are available in this branch (ISSUE_11821) in the geonode repo. The PR with the changes is this one #11829 The open points for now are:
If you want to contribute on this points, please start from my branch and open a PR with the changes to the ISSUE_11821 branch |
thanks, i just made a PR but some tests have failed, in fact for a strange reason i have a strange error when i use geonode-project 4.2.x branch, i can't see why but compose tries to get image from dockerhub and of course it don't find it i can't understand yet the whole geonode-project changes in 4.2.x branch, and dont work well, but with geonode-project 4.1.x and geonode 4.2.x it builds and run well. Please check my PR there is a lot of changes, not only the dependencies references described early. |
@mattiagiupponi i can't send PR because CLA, what i need to sing the CLA? |
is in the CONTRIBUTING file. |
The PR is ready, the dependecies are updated at the minimum to keep the compatibility. |
* Upgrade to django 4.2 * Upgrade to django 4.2 * Fix tests * black and flake fix * Drop support of pinax-ratings * Drop support of pinax-ratings * black and flake fix * black and flake fix * remove support to HAYSTACK_SEARCH * remove support to HAYSTACK_SEARCH * remove pinax_ratings_tags * Fix warning on lock acquire * [Fixes #11821] rollback SKIP_PERMS_FILTER * [Fixes #11821] fix dependencies * [Fixes #11821] remove unused test of raitings * [Fixes #11821] use geonode fork for dynamic rest * [Fixes #11821] use geonode fork for dynamic rest * [Fixes #11821] use geonode fork for dynamic rest * [Fixes #11821] Fix setup.cfg * [Fixes #11821] fix dependencies * [Fixes #11821] fix dependencies * [Fixes #11821] fix dependencies * [Fixes #11821] fix dependencies * [Fixes #11821] fix setup.cfg * [Fixes #11821] fix setup.cfg * [Fixes #11821] fix setup.cfg * [Fixes #11821] fix setup.cfg * [Fixes #11821] fix requirements.txt * remove default_app_config since is deprecated since django 3.2 * Define apps.py for app registration according to Django 4.2 * Define apps.py for app registration according to Django 4.2 * [Fixes #11821] Fix tests * [Fixes #11821] Add apps.py and fix test import * [Fixes #11821] Add apps.py and fix test import * [Fixes #11821] Add apps.py and fix test import * merge with master * upgrade requirement * Update setup.cfg * Update setup.cfg * Fix select autocomplete light --------- Co-authored-by: Giovanni Allegri <[email protected]>
Hello, thanks for the updates. I'm trying run this from geonode-project but there is a problem, all goes fine except running the django container, all others containers run well but django4geonode thows Fail, if i inspect the logs it seems all tasks are complete and i can see uwsgi runs but container keeps restarting |
i see there is differences about mapstore client between requirements.txt and setup.cfg, btw |
in tasks.py this code allways go to exception: def migrations(ctx):
print("**************************migrations*******************************")
ctx.run(f"python manage.py migrate --noinput --settings={_localsettings()}", pty=True)
ctx.run(
f"python manage.py migrate --noinput --settings={_localsettings()} --database=datastore",
pty=True,
)
try:
ctx.run(
f"python manage.py rebuild_index --noinput --settings={_localsettings()}",
pty=True,
)
except Exception:
pass because python manage.py rebuild_index is a haystack command, so is not needed that last try-catch block, i guess can be removed, i did open #11920 for this. |
GNIP 98 - Django upgrade to 4.2 LTS
Overview
As pointed out by the community, soon Django 3.2 will be deprecated in April 2024 in favor of 4.2
Proposed By
@mattiagiupponi
@cesar-benjamin
Assigned to Release
This proposal is for GeoNode 4.2/master.
State
Motivation
Django 3.2 will be no longer supported.
Proposal
This upgrade can be quite challenging due to the different geonode dependencies as also mentioned in #11722.
Many geonode dependencies are not maintained and this is blocking the upgrade.
So far the libraries that are raising issues with django 4.2 (list in progress):
For the above libraries, we should evaluate if:
Other than the libraries, there are some fixes to be done:
More info here https://docs.djangoproject.com/en/4.2/releases/4.0/#features-removed-in-4-0
Notes
An initial work has been done by @cesar-benjamin and is available here
Feedback
Update this section with relevant feedback, if any.
Voting
Project Steering Committee:
Links
Remove unused links below.
The text was updated successfully, but these errors were encountered: