Add a get_data_dir() function, and proper developer-mode data management.

Review Request #13168 — Created July 31, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

This introduces reviewboard.admin.server.get_data_dir(), which returns
the the absolute path to the data directory.

In practice, this is always $HOME, whether in production or
development. This is important, as much of the state stored and accessed
in this directory is SCM-specific, which hard-code $HOME. However,
that also means that for development, state gets written to the user's
$HOME, but that's not a new problem.

Our checks have been updated to use this, and some upcoming code will be
using this as well.

Unit tests pass.

Made sure that startup checks still work.

Made use of this in some in-progress code.

Summary ID
Add a get_data_dir() function, and proper developer-mode data management.
This introduces `reviewboard.admin.server.get_data_dir()`, which returns the the absolute path to the data directory. In practice, this is always `$HOME`, whether in production or development. This is important, as much of the state stored and accessed in this directory is SCM-specific, which hard-code `$HOME`. However, that also means that for development, state gets written to the user's `$HOME`, but that's not a new problem. Our checks have been updated to use this, and some upcoming code will be using this as well.
52370a62743d077a440d7e567380d0e77fdbfa7b
Description From Last Updated

'django.conf.settings' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'reviewboard' imported but unused Column: 1 Error code: F401

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

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (d7939a8)