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

[DO NOT MERGE] Upgrade wagtail v2.8 and django V3.0.3 #3536

Closed
wants to merge 11 commits into from

Conversation

pkfec
Copy link
Contributor

@pkfec pkfec commented Feb 10, 2020

Summary (required)

Pillow is child pkg of Wagtail and the latest version of Wagtail v2.8 comes with the pillow v6.2.2. While updating wagtail, i noticed that the wagtail v2.8 is compatible with Django v3.0. So i went ahead and updated Django to latest v3.0.3.

Include a summary of proposed changes.

  1. remove the pkg called six thats not required. SET_NULL on delete flag
  2. django3.0.3 - django.core.urlresolvers is deprecated. Replace it with django.urls
  3. As of Django 1.9, the old way of including the admin urls is deprecated. pass admin.site.urls directly to url(), without the call to include().
  4. {% load staticfiles %} is deprecated in Django 2.1, and removed in Django 3.0. Replaced {% load staticfiles %} tag with {% load static %} in template files.
  5. Django 3.0.3: ForeignKey field requires on_delete argument
  6. Django 2.0 has dropped support for old-style middleware classes in MIDDLEWARE_CLASSES. Renamed it as MIDDLEWARE.
  7. Upgrade Wagtail v2.8, Django v3.0.3, Django-jinja v2.5.0

Impacted areas of the application

  • wagtail interface
  • fec-cms app

How to test

  1. checkout the feature/3454-pkg-upgrade
  2. create a new python virtual environment
  3. run pip install -r requirements.txt
  4. drop your local cfmd_cms_test db
  5. create cfdm_cms_test db
  6. download the latest wagtail pg dump file from shared drive
  7. run pg_restore cmd to load this dump file on to your local cfdm_test_db
  8. run ./manage.py makemigration
  9. run ./manage.py migrate
  10. run pytest under fec-cms folder
  11. run pytest under fec-cms/fec folder
  12. start server (./manage.py runserver)
  13. Login to your local wagtail : http://127.0.0.1:8000/admin/login/
  14. Add/Edit wagtail pages
  15. export FEC_API_URL to dev, stage or prod and test the API endpoints on your local server http://127.0.0.1:8000/

@johnnyporkchops
Copy link
Contributor

We should push this to feature space so we can have content team do a through test of Wagtail functionality.

@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented Feb 10, 2020

Although we do not have to, it may actually be helpful to squash migrations before makemigrations for this PR because it would remove migrations that cancel each other out . For example"
0006_auto_20150819_0546.py creates OptionsPage model....
0013_auto_20160427_2133.py removes OptionsPage model

@pkfec
Copy link
Contributor Author

pkfec commented Feb 10, 2020

We should push this to feature space so we can have content team do a through test of Wagtail functionality.

@johnnyporkchops I second that. I would want you and @patphongs go over the changes in the PR first and approve before i push this branch to feature space

@pkfec pkfec requested a review from lbeaufort February 10, 2020 19:04
@pkfec pkfec changed the title [WIP] Feature/3454 pkg upgrade Feature/3454 pkg upgrade Feb 10, 2020
@pkfec pkfec requested a review from fec-jli February 10, 2020 19:19
@@ -9,11 +9,11 @@ psycopg2==2.7.3.2
requests==2.21.0
slacker==0.8.6
whitenoise==2.0.3
wagtail==2.2.1
wagtail==2.8
Copy link
Member

Choose a reason for hiding this comment

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

@pkfec I recommend upgrading to the long term support (LTS) versions of Django and Wagtail. This will ensure greater support especially for patches and fixes than a version that is not supported. Django 2.2 is LTS until 4/2022 and Wagtail 2.7 is LTS until 2/2021.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@patphongs thanks for feedback. I am going to downgrade the wagtail and django pkg to the LTS version. I will submit a new PR with the LTS version of those packages.

Copy link
Member

@patphongs patphongs left a comment

Choose a reason for hiding this comment

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

Please see my recommendation

@pkfec pkfec changed the title Feature/3454 pkg upgrade OLD-Feature/3454 pkg upgrade Feb 20, 2020
@pkfec pkfec changed the title OLD-Feature/3454 pkg upgrade OLD PR - Wagtail v2.8 and Django V3.0.3 Feb 20, 2020
@pkfec pkfec changed the title OLD PR - Wagtail v2.8 and Django V3.0.3 [DO NOT MERGE] PR with has - Wagtail v2.8 and Django V3.0.3 Feb 20, 2020
@pkfec pkfec changed the title [DO NOT MERGE] PR with has - Wagtail v2.8 and Django V3.0.3 [DO NOT MERGE] PR which has wagtail v2.8 and django V3.0.3 latest pkg upgrades Feb 20, 2020
@codecov-io
Copy link

Codecov Report

Merging #3536 into develop will decrease coverage by 0.01%.
The diff coverage is 75%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3536      +/-   ##
===========================================
- Coverage    74.96%   74.94%   -0.02%     
===========================================
  Files          120      120              
  Lines         7377     7373       -4     
  Branches       642      642              
===========================================
- Hits          5530     5526       -4     
  Misses        1847     1847
Impacted Files Coverage Δ
fec/fec/urls.py 77.27% <0%> (ø) ⬆️
fec/fec/tests/test_robots.py 95.23% <100%> (ø) ⬆️
fec/fec/settings/base.py 87.95% <100%> (ø) ⬆️
fec/home/models.py 87.43% <100%> (-0.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7946880...9eb4b1e. Read the comment docs.

@pkfec
Copy link
Contributor Author

pkfec commented Feb 20, 2020

LTS versions of Wagtail v2.7 and Django v2.2.10 upgrades are being tracked in this PR #3536

Closing this PR.

@pkfec pkfec closed this Feb 20, 2020
@pkfec pkfec changed the title [DO NOT MERGE] PR which has wagtail v2.8 and django V3.0.3 latest pkg upgrades [DO NOT MERGE] Upgrade wagtail v2.8 and django V3.0.3 Mar 17, 2020
@pkfec pkfec deleted the feature/3454-pkg-upgrade branch January 26, 2022 00:09
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.

4 participants