the-draupnir-project / Draupnir

A Matrix moderation bot
https://the-draupnir-project.github.io/draupnir-documentation/
82 stars 14 forks source link

Config validation via TypeBox schema. #449

Open Gnuxie opened 3 months ago

Gnuxie commented 3 months ago

Part of https://github.com/the-draupnir-project/Draupnir/issues/217.

This whole exercise was miserable and has failed, sadly (read commit messages).

https://matrix.to/#/%23draupnir%3Amatrix.org/%24FDjyJ_bxlqx6lW5Ce74RfpDQpYxT973fddywBtyNJQY?via=matrix.org&via=envs.net&via=ubuntu.com

Following up I think the best course of action is to first figure out how to report transform errors correctly (or stop using transforms).

And also migrate the config to a new format behind the scenes that can be validated more easily*.

What we mean by this is we create a new format, which we encourage everyone to use, but the old format can still be loaded just fine and is migrated to the new one transparently until they change to the new format. Which we will detect with a version number