Fix building docs for release-5.0.x

Review Request #12370 — Created June 14, 2022 and submitted

Information

Review Board
release-5.0.x

Reviewers

The new SCMTools registry work caused a problem trying to build docs.
The issue was that we were using AppConfig.ready to populate the
registry, but doing so will do some database accesses (in order to pull
any legacy Tool instances that don't exist in entry points into the
registry). According to the documentation for ready, we should avoid
doing any DB queries here, precisely because it can affect running
management commands.

This change moves the registry population back into a handler for the
initializing signal, along with a comment explaining why.

While it's apparently not necessary for the docs build, I've also added
the new scmtool_id field to the fixtures for the docs DB.

  • Ran unit tests.
  • Built docs.
Summary ID
Fix building docs for release-5.0.x
The new SCMTools registry work caused a problem trying to build docs. The issue was that we were using `AppConfig.ready` to populate the registry, but doing so will do some database accesses (in order to pull any legacy Tool instances that don't exist in entry points into the registry). According to the documentation for `ready`, we should avoid doing any DB queries here, precisely because it can affect running management commands. This change moves the registry population back into a handler for the `initializing` signal, along with a comment explaining why. While it's apparently not necessary for the docs build, I've also added the new `scmtool_id` field to the fixtures for the docs DB. Testing Done: - Ran unit tests. - Built docs.
b34e273ffbabd64430cc38e040da9ed724d1ec13
Description From Last Updated

Missing the Args: docs.

chipx86chipx86

Could put a Version Added in here

maubinmaubin
maubin
  1. 
      
  2. reviewboard/scmtools/__init__.py (Diff revision 1)
     
     
    Show all issues

    Could put a Version Added in here

  3. 
      
chipx86
  1. 
      
  2. reviewboard/scmtools/__init__.py (Diff revision 1)
     
     
     
    Show all issues

    Missing the Args: docs.

  3. 
      
david
maubin
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.0.x (dfb5935)