Add new management commands for siteconfig.

Review Request #3855 — Created Feb. 8, 2013 and submitted

Information

Djblets
master

Reviewers

Add new management commands for siteconfig.

This adds some useful management commands for listing the current
site configuration, setting an existing key, or displaying the value of
a key. It should help when correcting configuration or debugging a
configuration problem.

The new commands are:

    * list-siteconfig
    * get-siteconfig
    * set-siteconfig
Tested list-siteconfig, and saw the whole site configuration.

Tested set-siteconfig with valid and invalid keys of different depths.
Tested setting strings, integers, and booleans.
Tried overriding arrays and dicts, and got the proper error.

Tested get-siteconfig with valid and invalid keys, and different
value types.
Description From Last Updated

unused import

RA rajasaur

unused import

RA rajasaur

Should the settings be reloaded using load_site_config after a save? I don't think so because these may just be commands …

RA rajasaur
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        djblets/siteconfig/management/commands/get-siteconfig.py
        djblets/siteconfig/management/commands/list-siteconfig.py
        djblets/siteconfig/management/commands/set-siteconfig.py
      Ignored Files:
    
    
  2. 
      
RA
  1. 
      
  2. Should the settings be reloaded using load_site_config after a save? I don't think so because these may just be commands that are run outside of the running process.
    
    But even in that case, lets say, I change the logging directory, we would need to call something to reset the logging setup if the settings is modified, isnt it?
    1. We don't need to worry about that.
      
      First, this is out of process. It'll be executed on the command line.
      
      If it was done in the same process as something else using siteconfig, they'd both operate on the same object.
      
      Since there's going to be multiple processes/threads/machines running Review Board with the same database and memcached, we already had to make sure changes in one thread updated other threads, so we're good there.
  3. 
      
david
  1. Looks good to me once you fix the unused imports.
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (be51ec4)
Loading...