Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using partial loading for config schemas #1105

Open
llucax opened this issue Nov 15, 2024 · 0 comments
Open

Consider using partial loading for config schemas #1105

llucax opened this issue Nov 15, 2024 · 0 comments
Labels
part:config Affects the configuration management type:enhancement New feature or enhancement visitble to users
Milestone

Comments

@llucax
Copy link
Contributor

llucax commented Nov 15, 2024

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 raw dicts instead of a class, but that will make dealing with config updates much more complicated.

@llucax llucax added part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed type:enhancement New feature or enhancement visitble to users labels Nov 15, 2024
@llucax llucax added this to the Untriaged milestone Nov 15, 2024
@llucax llucax added part:config Affects the configuration management and removed part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:config Affects the configuration management type:enhancement New feature or enhancement visitble to users
Projects
Status: To do
Development

No branches or pull requests

1 participant