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

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

Information

Review Board
release-4.0.x
1f09e44...

Reviewers

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
error-prone.

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 prepare-dev.py 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
again.

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
needed.

Tested a first-time run of prepare-dev.py.

    Loading...