Homec4science

Repair invalid configuration by setting values back to defaults

Authored by epriestley <git@epriestley.com> on Jan 18 2013, 01:25.

Description

Repair invalid configuration by setting values back to defaults

Summary:
When configuration is set incorrectly (e.g., of the wrong type), detect and repair it by setting it to the default value. A setup warning will be raised separately.

Notably, this removes the need to hard-code all the class types.

This runs separately from the "invalid config" check because we need to run it on every page, but do setup checks only once per restart (some of them are slow).

Also dirty setup when we edit configuration.

Test Plan: Set config incorrectly on purpose, saw Phabricator correct it on restart and on every subsequent page load until it was fixed.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2292

Differential Revision: https://secure.phabricator.com/D4492

Details

Committed
epriestley <git@epriestley.com>Jan 18 2013, 01:25
Pushed
aubortJan 31 2017, 17:16
Parents
rPHb180a5f59924: Minor, update celerity map.
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHb0d815d1574c: Repair invalid configuration by setting values back to defaults (authored by epriestley <git@epriestley.com>).Jan 18 2013, 01:25