flake8
-
reviewboard/cmdline/rbsite.py (Diff revision 1) Show all issues
Review Request #12507 — Created Aug. 5, 2022 and submitted
Information | |
---|---|
chipx86 | |
Review Board | |
release-4.0.x | |
Reviewers | |
reviewboard | |
Every so often, someone encounters a bad database upgrade. This often
comes from in-house modifications, canceled upgrades, or an upgrade from
some particular versions where Django Evolution or Django had some bad
behavior in their SQL or project signature generation.To help diagnose these issues, this change logs useful information when
either the project signature diff is non-empty (indicating missing
evolution state) or an upgrade fails due to an error. The contents of
the log include:
Ideally we'd also log the SQL schema, but that'd require some
per-database logic for correctly running each one's SQL dumping command.
Instead, we'll leave that to something handled during support.
There are also fixes for typos in the output message, and more detail
in the upgrade failure message.
This is something I've had on the backburner for a long time, but a
recent hard-to-diagnose failure in CI helped incentivize building this
logic. Hopefully it will help in the future when customers reach out
with problems.
Simulated different failures, both at signature diff time and upgrade
time. Checked the resulting log file and the output for errors.
Summary | |
---|---|
Description | From | Last Updated |
---|---|---|
undefined name 'get_app_label' Column: 44 Error code: F821 |
![]() |
Fixed a missing import needed for showing pending evolutions, and tested that case again.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+542 -16) |