updated validation decision
Validation plugins operate as indenpendent blackboxes.
For every backend each mounted validation plugin iterates
-over the whole keyset, checks every key for it's trigger metakey,
+over the whole keyset, checks every key for its trigger metakey,
and validates the key.
-Each plugin decides on it's own what should happen when a key
-fails to validate.
+Currently all needed validation plugins need to be specified at
+mounttime - if additional validation is required, the backend
+has to be remounted with the required plugins and plugin
+configuration.
-## Constraints
+If validation of a key fails, each plugin decides on its own
+how to handle the issue and proceed in ways that might be
+different than what is expected or desired.
-## Assumptions
-While plugins should always fail and return
-an error if validation fails on kdbSet, there are be different
-requirements on what should happen on kdbGet:
+## Constraints
-- do nothing
+## Assumptions
- we just want to read the configuration file and don't
- care about invalid values
+While plugins should always fail and return an error if validation
+fails on kdbSet, there are be can be several different requirements
+for what should happen on kdbGet and handle problems e.g.
-- issue warnings
+- only issue warnings
we want to read the whole configuration, but issue warnings
- if keys fail to validate
+ if keys fail to validate instead
+
+ problems are handled external by an application, user, ...
- remove invalid keys
we want to read the whole configuration, but drop invalid keys
+ invalid keys might be replaced by default values, requested
+ from the user, ...
+
- fail with error
we only want to read valid configurations, and fail with
an error if the configuration is invalid
+
## Considered Alternatives
- Extend validation plugins to allow us to specify what should happen
@@ -58,6 +66,8 @@ of each key to the corresponding validation plugin.
## Implications
+- validation plugins have to export their validation routine
+
## Related decisions
## Notes
