Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: daf_butler
-
Labels:
-
Story Points:6
-
Team:Architecture
Description
Our YAML files are a bit of a mess, and they're very hard to use:
- The defaults for StorageClass and the registry schema are not just nodes in the Butler config tree; there are also special nodes that point to files (e.g. "storageClasses.config") that make it impossible to use the defaults directly, and obfuscate what the real structure ought to be.
- Each of the methods that constructs something from a Config has its own special handling for non-Config arguments (e.g. filenames).
- StorageClassFactory has two public APIs for constructing StorageClasses from Config.
- Because we never validate any of the structures, error messages due to bad configs are very opaque.
- Config files contain references to other Config files that are relative to the current working directory (which is assumed to be DAF_BUTLER_DIR, since that's where tests are run).
- Constructing most important daf_butler objects requires either creating a Config file on disk or a Config object in memory, rather than applying an automatically-located default configuration and overriding with kwargs.
I think it's time to step back and actually design how we want the configuration system to work.
While I agree with all the statements above the only thing I'm not sure about is the timing. Are we already at the stage where we know all we want to configure and the ways in which we want it to be?
If yes, then great! Lets redesign. If not, then we might benefit from muddling on a tiny little bit longer until that becomes clear.