Upgrade htdocs/reviewboard.wsgi when performing a rb-site upgrade.

Review Request #11482 — Created Feb. 23, 2021 and submitted

Information

Review Board
release-4.0.x

Reviewers

rb-site upgrade now checks whether the htdocs/reviewboard.wsgi file
makes use of an older WSGI loader from either Django 1.6 or 1.11. If so,
it's upgraded to use the new reviewboard.wsgi module, stripping out
some of the old environment settings in the process, and adding the
REVIEWBOARD_SITEDIR setting. This will help keep things maintainable,
and avoid issues later as requirements or configuration needs change.

Unit tests pass.

Manually tested upgrading sites from a 3.0 and a 4.0 beta 2 install and
seeing the new WSGI files in both cases. Verified the new files worked.

Summary ID
Upgrade htdocs/reviewboard.wsgi when performing a rb-site upgrade.
`rb-site upgrade` now checks whether the `htdocs/reviewboard.wsgi` file makes use of an older WSGI loader from either Django 1.6 or 1.11. If so, it's upgraded to use the new `reviewboard.wsgi` module, stripping out some of the old environment settings in the process, and adding the `REVIEWBOARD_SITEDIR` setting. This will help keep things maintainable, and avoid issues later as requirements or configuration needs change.
a50bddcfe3bea69b8229540e1357e2afbd33ecc7
Description From Last Updated

This would be slightly better as: if not line.startswith(to_remove): new_lines.append(line.rstrip())

daviddavid
david
  1. 
      
  2. reviewboard/cmdline/rbsite.py (Diff revision 1)
     
     
     
     
     

    This would be slightly better as:

    if not line.startswith(to_remove):
        new_lines.append(line.rstrip())
    
  3. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (55a1b81)
Loading...