Consider using partial loading for config schemas #1105
Labels
part:config
Affects the configuration management
type:enhancement
New feature or enhancement visitble to users
Milestone
What's needed?
When loading a config, if one field doesn't pass validation, then the whole config object is not created. This means that if only one field is wrong, but many other are OK, the whole update won't be done, when it could have been possible to load the fields that were valid and only keep the invalid field with the outdated value.
Proposed solution
Use marshmallow partial loading.
Use cases
No response
Alternatives and workarounds
No response
Additional context
We need to see if
marshmallow_dataclass
supports this, and how would this play with the type system, as if, for example, one required value is now not present in the config, the types won't match. One possible solution would be to return partially loaded configs as rawdict
s instead of a class, but that will make dealing with config updates much more complicated.The text was updated successfully, but these errors were encountered: