Conversation
1a0275b to
f412f35
Compare
Bachibouzouk
left a comment
There was a problem hiding this comment.
I just though yesterday that we were due to update django. Shouldn't we unpin the dependencies ? I would keep a file with pinned dependencies but use the one with unpinned such that we always get the latest updates when we deploy (we could setup a scheduled job to build using the unpinned requirements and be notifyed when it fails). If it fails and it is a friday or one day before a workshop and one has no time, we can fallback on the pinned dependencies and leave it as TODO to fix the dependencies later.
Caused from upgrade: `ValueError: Model instances passed to related filters must be saved.`
Only raw html displayed after update
25435f6 to
ec3ab2b
Compare
Depends on new environment variable `PROD_ENV` being set to true
4136233 to
b772c7c
Compare
|
✅dependabot config looks good 👍 |
c68a703 to
4b8eefb
Compare
Should only be used to serve frontend assets and was causing issues with migrations on CI test build
45b935d to
5d5a7d8
Compare
|
Hi @Bachibouzouk, I think this is about ready. What I did:
Let me know what you think. I did change quite a few things so I assume this will take quite a bit of noodling around on staging to make sure that everything really still works as intended. One thing I have not yet done is move from Django-q to celery beat. I will do this when I have a bit of time again. Also, I have now included the changes from your other closed PRs to the Changelog here, as they were still missing. |
app/epa/settings.py
Outdated
| # https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure | ||
| CSRF_COOKIE_SECURE = True | ||
| # https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-seconds | ||
| # TODO: set this to 60 seconds first and then to 518400 once you prove the former works |
There was a problem hiding this comment.
NB: make sure this is addressed in a later commit
| # https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure | ||
| CSRF_COOKIE_SECURE = True | ||
| # https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-seconds | ||
| # TODO: set this to 60 seconds first and then to 518400 once you prove the former works |
OpenPlan is currently based on python 3.9, which has already reached it's EoL, and Django 4.2, which has its long term support (LTS) phase also ending at the end of the year. Additionally, most project dependencies have not been updated in a long time, posing possible security issues, among other things.
This PR aims to upgrade the project to python 3.12 and Django 5.2 (as a compromise between a jump to all latest versions and moving to versions that have at least two years of long term support ahead). Other project dependencies will also be checked for upgrades.
Within this PR, oemof packages are also upgraded to
oemof-solph==0.5.7andoemof-thermal==0.0.8. Will have to do some testing. Likely these versions were pinned to be in sync with MVS, but since we are moving away from MVS we will need to update anyway. The upgrade was necessary, since the package dependencies were not compatible with python 3.12.Closes #399
TODO: