Add a new, centralized reviewboard.wsgi module.
Review Request #11473 — Created Feb. 16, 2021 and submitted — Latest diff uploaded
Historically, we've shipped a
reviewboard.wsgi
file in the generated
site directory, which could be passed to some WSGI implementations. This
wasn't suitable for all, though, as some servers (like gunicorn) want an
actual module path and not a standalone file on the filesystem.It was also bad for maintenance. We've already had to write patching
logic inrb-site
to update parts of this for Django 1.11 in
release-4.0.x
. Making more invasive changes down the road is even more
work.Now we ship an actual importable
reviewboard.wsgi
module that contains
all the setup. It only needs aREVIEWBOARD_SITEDIR
environment
variable to work, which can be set by a server.The generated
htdocs/reviewboard.wsgi
file is now simpler, just
setting this variable and importing from the newreviewboard.wsgi
.Since this is landing on
release-3.0.x
, no existing configurations
will be updated. Things will continue working as-is. The plan is to
updaterelease-4.0.x
to move existing configurations over to this
module.
Tested an Apache install with the old
reviewboard.wsgi
file forwarding
to thereviewboard.wsgi
module.Tested a Gunicorn install with the new
reviewboard.wsgi
module.