Skip to content

Cannot deserialize notification channel data without a database lookup

(see !587 (comment 464887))

In the pydantic models for channel data we don't have a tag in the data type or in the TaskNotification fields that tells what kind of data is expected. This makes it potentially impossible to validate or deserialize a task without looking up the channel type by channel name in the database. Is this something we want to change?

https://docs.pydantic.dev/1.10/usage/types/#discriminated-unions-aka-tagged-unions could be a way to do this, and a probably easier way would be to add the method field to TaskNotification, with the same value as in debusine.db.NotificationChannel

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information