Better handle dependency-related messages in manage.py and settings.

Review Request #9471 - Created Jan. 8, 2018 and updated

Christian Hammond
Review Board
release-3.0.x
b643dca...
reviewboard

Since nearly the beginning, we've had manage.py check for required and
optional dependencies that could not be handled by the package's
dependency list, like git, cvs, etc. That code hasn't been updated much,
and had a lot of room for improvement. It also missed some of the more
recent mandatory dependencies.

This change fixes all this up, starting with adding dependency notices
for NodeJS, node_modules (and binaries within it), and removing some
legacy dependencies that are no longer worth checking for. The error
messages themselves have all been updated, giving some hints for
installation in order to help users deal with them.

The code for managing these dependency messages have moved from
settings.py to dependencies.py. This gives us a more formal (but
strictly internal) API for these types of checks, and lets us clean up
settings.py a bit. Along with the cleanup of those functions, one
check (for determining if settings.py lives within a reviewboard
directory) has been removed, as it hasn't really been relevant since the
mid-1.0 days.

These dependency messages have a much nicer display, prefixing any
required dependency errors with "ERROR:" and any optional dependency
warnings with "WARNING:". The actual text is wrapped to fit on the
screen, aligning after the ERROR/WARNING prefix, and adding a blank line
between each, helping to read the new content.

Tested each of the dependency issues (by forcing the display of each).
Verified the display and that URLs were correct. Also verified that if
any are shown, the final text with the manual URL was displayed.

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

Christian Hammond
Review request changed

Change Summary:

Fixed line length issues.

Diff:

Revision 2 (+153 -76)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
David Trowbridge
  1. Ship It!
  2. 
      
Loading...