-
Notifications
You must be signed in to change notification settings - Fork 880
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
[enhancement]: Support fastjsonschema as well as jsonschema for schema validator #5764
Comments
Good suggestion @ani-sinha, I can see it packaged in alpine, rawhide, fedora, debian and ubuntu archives as well so making this switch should be desired for distributions which have this package available. This will be a fairly complex bit of work because cloudinit.config.schema has some tight coupling with the following for custom extensions:
But, this is definitely something worth exploring further to size this amount of effort. |
Testing the impact to boot I put We would welcome patches for this work and help shepherd in those changes. If the community starts to approach this effort we would like to make sure that we can retain our schema error and deprecation annotation functionality:
|
I think the main motivation to consider switching from jsonschema to fastjsonschema it to reduce the install footprint and not to cut validation time. E.g. on my Fedora 40 I see:
Schema validation is optional, this gives two options: install jsonschema and all its dependencies and get full validation or not install it and skip validation completely. Maybe there's room for a third option, e.g. install fastjsonschema and get some 'basic' validation (errors only)? |
Enhancement
In RHEL, we are looking to drop support for jsonschema. We would like to use fastjsonschema. The api doc is here:
https://horejsek.github.io/python-fastjsonschema/
It would be nice if cloud-init could support both python libraries to check json schema.
The text was updated successfully, but these errors were encountered: