You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dannykopping
changed the title
Add code-generation to enumerate system notification templates
Add code-generation & linter for system notification templates
Aug 7, 2024
Right now, the delivery methods are smtp and webhook, but they are typed as regular string values in the codersdk. I think it would be great to have the method value as enum types in the SDK to ensure more reliable type checking in the BE and FE. I see they are enums in the database layer, though.
Ideally this code generation would produced a file called
coderd/notifications/system_templates_generated.go
:NOTE: this must ONLY consider templates of
kind=system
.We need this code-generation to solve a few problems:
notification_templates
table won't need to use a real pg db anymore, speeding up testsAllSystemTemplates()
will allow us to determine if we're missing any test casesOver and above this, we'll need a linter to validate that this new file is not out-of-sync with the database after migrations have run.
The text was updated successfully, but these errors were encountered: