-
Notifications
You must be signed in to change notification settings - Fork 0
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
task/WP-271 Upgrade Django to 4.2 and update other 3rd party dependencies #895
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #895 +/- ##
==========================================
+ Coverage 63.40% 63.46% +0.05%
==========================================
Files 432 432
Lines 12404 12406 +2
Branches 2585 2585
==========================================
+ Hits 7865 7873 +8
+ Misses 4327 4317 -10
- Partials 212 216 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
# Django Channels | ||
'channels', | ||
'daphne', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
filterwarnings = | ||
ignore::DeprecationWarning:twisted.*: | ||
ignore::django.utils.deprecation.RemovedInDjango50Warning | ||
markers = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to filter a couple of warnings.
- The
twisted
package has a PR open currently to address the cgi deprecation warning - We can ignore any RemovedInDjango50Warning since Django 5 support is still limited at the moment
@@ -7,5 +7,5 @@ | |||
from portal.apps.notifications.consumers import NotificationsConsumer | |||
|
|||
websocket_urlpatterns = [ | |||
re_path(r'ws/notifications/$', NotificationsConsumer), | |||
re_path(r'ws/notifications/$', NotificationsConsumer.as_asgi()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server/portal/asgi.py
Outdated
application = get_default_application() | ||
application = ProtocolTypeRouter({ | ||
"http": get_asgi_application(), | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do websocket notifications work without defining a mapping for "websocket"
in the ProtocolTypeRouter
? https://channels.readthedocs.io/en/latest/topics/routing.html?highlight=protocoltyperouter#protocoltyperouter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The websocket mapping is defined in routing.py and from my testing notifications are working fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, LGTM. Tested the changes locally. I wiped my postgres data and restarted fresh.
May be there is a better way - like upgrading postgres for local users.
- Created a job
- checked webhook usage with job status, interactive job status.
With upgrade from 3 to 4 with django, how we handle rollback. Lets say, we deploy to dev.cep, and rollback, does that work well?
Rolling back would probably require restoring from a database backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* updated django version and dependencies * upgraded channels to version 3 and fixed tests * upgraded channels to version 4 * formatting fix * Added nginx conf * add pytest filterwarning * removed added nginx conf, added CSRF trusted origin for cep.test * upgrade postgres to v14.9 * linting, added CSRF setting to settings_default * update settings --------- Co-authored-by: Sal Tijerina <[email protected]> Co-authored-by: Chandra Y <[email protected]>
* updated django version and dependencies * upgraded channels to version 3 and fixed tests * upgraded channels to version 4 * formatting fix * Added nginx conf * add pytest filterwarning * removed added nginx conf, added CSRF trusted origin for cep.test * upgrade postgres to v14.9 * linting, added CSRF setting to settings_default * update settings --------- Co-authored-by: Sal Tijerina <[email protected]> Co-authored-by: Chandra Y <[email protected]>
Overview
Updates Django to version 4.2, addresses deprecation warnings and any breaking changes.
Resources:
Related
Changes
Testing
/server
and runpoetry install
make build
UI
Notes
Added comments for some stuff I am not sure about so would appreciate some feedback on that