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.wsgifile 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-siteto 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.wsgimodule that contains
all the setup. It only needs aREVIEWBOARD_SITEDIRenvironment
variable to work, which can be set by a server.The generated
htdocs/reviewboard.wsgifile 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.xto move existing configurations over to this
module.
Tested an Apache install with the old
reviewboard.wsgifile forwarding
to thereviewboard.wsgimodule.Tested a Gunicorn install with the new
reviewboard.wsgimodule.