Modernize rb-site for better output and database setup improvements.

Review Request #10679 — Created Sept. 5, 2019 and submitted

Review Board

This updates rb-site to use the new Evolver API in Django Evolution
to control the database creation and upgrade process. This gives us a
lot more control than we had when we were shelling out to the evolve
command. We can now provide a better, more tailored error when the
evolutions don't resolve the schema differences (pointing people to
possible causes and to our support page), and can better control
progress output.

We now check for access to the database before performing any of the
evolution-related operations, giving users a chance to create the
database if missing. We had this before, but it was a little more

The whole creation/upgrade operation is less noisy than before. We no
longer have to tell people to ignore some warnings/errors in the output,
since any that do appear are now going to be important and not just
noise in syncdb/evolve commands.

Other aspects of rb-site have been improved as well. We have better
output for the evolution steps, and the version upgrade is now shown
first instead of part-way through the upgrade process. We also link
to the modern support URL and better describe Power Pack features.

This all fixes problems with creating the initial database, due to an
order of operations issue. This fixes as well.

Tested installing a new site from scratch.

Tested attempting to install without access to a database, verifying
that a useful error was shown and that the user had a chance to try

Tested evolution discrepencies, and the resulting error.

Tested upgrading a Review Board 3.0 database to 4.0.

Tested upgrading a site directory without a database upgrade being

Tested a first-time run of

Description From Last Updated

F841 local variable 'old_version' is assigned to but never used

Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.


  1. This looks reasonable to me.

Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (c5e3c4b)