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

Upgrade to Django 3.2.13 #1331

Merged
merged 1 commit into from
May 12, 2022
Merged

Conversation

ktohalloran
Copy link
Contributor

@ktohalloran ktohalloran commented May 6, 2022

Overview

Upgrades to Django 3.2.13 following the release of a point release to fix a security vulnerability.

Notes

When running test and runserver, the following deprecation warning appears in the console:

/usr/local/lib/python3.6/dist-packages/boto/plugin.py:40: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

This seems to be an issue with dependency boto that has still not been addressed in their latest release.

While testing, I ran into some issues with my instance of OTP. As they're occurring on both develop and this branch, it seems unlikely to be caused by this upgrade; however, these errors mean my tests are failing so it would be worth testing this theory on another machine.

Testing Instructions

Note: These testing instructions have largely been copied from PR 1320.

  • Provision your app VM to update Django vagrant provision app
  • Next, run tests and the dev server to make sure that you don't see any deprecation warnings from Django (other than the ones mentioned above from boto):
    • vagrant ssh app
    • cd /opt/app/python/cac_tripplanner
    • python3 -Wall manage.py test
    • sudo systemctl stop cac-tripplanner-app (This stops the server process that comes up by default when you start the VM; you need to do this before starting up the Django dev server manually because you'll get a port conflict if you don't)
    • python3 -Wall manage.py runserver
  • Last, click around the app and make sure everything works as it used to.

Checklist

  • No gulp lint warnings
  • No python lint warnings
  • Python tests pass

Connects #1330

Copy link
Contributor

@ddohler ddohler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! I'm not sure what's up with the OTP test failures you observed; I'm not able to replicate them on my machine:

vagrant@app:/opt/app/python/cac_tripplanner$ python3 -Wall manage.py test
/usr/local/lib/python3.6/dist-packages/boto/plugin.py:40: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
.[2022-05-11 15:29:36 -0400] [4596] [WARNING] Bad Request: /map/reachable
......[2022-05-11 15:29:42 -0400] [4596] [WARNING] Not Found: /learn/unpublished-comm/
............................[2022-05-11 15:29:44 -0400] [4596] [WARNING] Method Not Allowed (GET): /link/shorten/
[2022-05-11 15:29:44 -0400] [4596] [WARNING] Method Not Allowed: /link/shorten/
[2022-05-11 15:29:44 -0400] [4596] [WARNING] Bad Request: /link/shorten/
[2022-05-11 15:29:44 -0400] [4596] [WARNING] Method Not Allowed (POST): /link/abcdefghijklmnopqrstuv
[2022-05-11 15:29:44 -0400] [4596] [WARNING] Method Not Allowed: /link/abcdefghijklmnopqrstuv
[2022-05-11 15:29:44 -0400] [4596] [WARNING] Not Found: /link/abcdefghijklmnopqrstuv
.
----------------------------------------------------------------------
Ran 36 tests in 8.570s

OK
Destroying test database for alias 'default'...

Could you open an issue for the OTP failures? My guess at the moment is that they may be related to different Virtualbox versions or something OS-specific. But I think we're good to go to merge this.

@@ -1,10 +1,10 @@
from django.conf.urls import url
from django.conf.urls import re_path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I don't know how I missed this. 🤦

@ktohalloran
Copy link
Contributor Author

Thank you for reviewing! I'm glad the tests didn't fail on your machine, too. I've made #1332 to look into the failures later.

@ktohalloran ktohalloran merged commit 18525a4 into develop May 12, 2022
@ktohalloran ktohalloran deleted the feature/kob/upgrade-django-3.2.13 branch June 13, 2022 13:52
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