canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.9k stars 862 forks source link

[enhancement]: Support fastjsonschema as well as jsonschema for schema validator #5764

Open ani-sinha opened 10 hours ago

ani-sinha commented 10 hours ago

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.

blackboxsw commented 9 hours ago

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.