feat(coderd): add new dispatch logic for coder inbox (#16764)

This PR is [resolving the dispatch part of Coder
Inbocx](https://github.com/coder/internal/issues/403).

Since the DB layer has been merged - we now want to insert notifications
into Coder Inbox in parallel of the other delivery target.

To do so, we push two messages instead of one using the `Enqueue`
method.
This commit is contained in:
Vincent Vielle
2025-03-05 22:43:18 +01:00
committed by GitHub
parent 32450a2f77
commit 522181fead
42 changed files with 415 additions and 120 deletions

View File

@ -19,7 +19,8 @@
"initiator": "rob",
"name": "Bobby's Template"
},
"data": null
"data": null,
"targets": null
},
"title": "Template \"Bobby's Template\" deleted",
"title_markdown": "Template \"Bobby's Template\" deleted",

View File

@ -24,7 +24,8 @@
"organization": "coder",
"template": "alpha"
},
"data": null
"data": null,
"targets": null
},
"title": "Template 'alpha' has been deprecated",
"title_markdown": "Template 'alpha' has been deprecated",

View File

@ -16,7 +16,8 @@
}
],
"labels": {},
"data": null
"data": null,
"targets": null
},
"title": "A test notification",
"title_markdown": "A test notification",

View File

@ -20,7 +20,8 @@
"activated_account_user_name": "William Tables",
"initiator": "rob"
},
"data": null
"data": null,
"targets": null
},
"title": "User account \"bobby\" activated",
"title_markdown": "User account \"bobby\" activated",

View File

@ -20,7 +20,8 @@
"created_account_user_name": "William Tables",
"initiator": "rob"
},
"data": null
"data": null,
"targets": null
},
"title": "User account \"bobby\" created",
"title_markdown": "User account \"bobby\" created",

View File

@ -20,7 +20,8 @@
"deleted_account_user_name": "William Tables",
"initiator": "rob"
},
"data": null
"data": null,
"targets": null
},
"title": "User account \"bobby\" deleted",
"title_markdown": "User account \"bobby\" deleted",

View File

@ -20,7 +20,8 @@
"suspended_account_name": "bobby",
"suspended_account_user_name": "William Tables"
},
"data": null
"data": null,
"targets": null
},
"title": "User account \"bobby\" suspended",
"title_markdown": "User account \"bobby\" suspended",

View File

@ -18,7 +18,8 @@
"labels": {
"one_time_passcode": "00000000-0000-0000-0000-000000000000"
},
"data": null
"data": null,
"targets": null
},
"title": "Reset your password for Coder",
"title_markdown": "Reset your password for Coder",

View File

@ -20,7 +20,8 @@
"template_version_message": "template now includes catnip",
"template_version_name": "1.0"
},
"data": null
"data": null,
"targets": null
},
"title": "Workspace \"bobby-workspace\" updated automatically",
"title_markdown": "Workspace \"bobby-workspace\" updated automatically",

View File

@ -19,7 +19,8 @@
"name": "bobby-workspace",
"reason": "autostart"
},
"data": null
"data": null,
"targets": null
},
"title": "Workspace \"bobby-workspace\" autobuild failed",
"title_markdown": "Workspace \"bobby-workspace\" autobuild failed",

View File

@ -57,7 +57,8 @@
}
],
"total_builds": 55
}
},
"targets": null
},
"title": "Workspace builds failed for template \"Bobby First Template\"",
"title_markdown": "Workspace builds failed for template \"Bobby First Template\"",

View File

@ -20,7 +20,8 @@
"version": "alpha",
"workspace": "bobby-workspace"
},
"data": null
"data": null,
"targets": null
},
"title": "Workspace 'bobby-workspace' has been created",
"title_markdown": "Workspace 'bobby-workspace' has been created",

View File

@ -24,7 +24,8 @@
"name": "bobby-workspace",
"reason": "autodeleted due to dormancy"
},
"data": null
"data": null,
"targets": null
},
"title": "Workspace \"bobby-workspace\" deleted",
"title_markdown": "Workspace \"bobby-workspace\" deleted",

View File

@ -24,7 +24,8 @@
"name": "bobby-workspace",
"reason": "autodeleted due to dormancy"
},
"data": null
"data": null,
"targets": null
},
"title": "Workspace \"bobby-workspace\" deleted",
"title_markdown": "Workspace \"bobby-workspace\" deleted",

View File

@ -22,7 +22,8 @@
"reason": "breached the template's threshold for inactivity",
"timeTilDormant": "24 hours"
},
"data": null
"data": null,
"targets": null
},
"title": "Workspace \"bobby-workspace\" marked as dormant",
"title_markdown": "Workspace \"bobby-workspace\" marked as dormant",

View File

@ -23,7 +23,8 @@
"workspace_build_number": "3",
"workspace_owner_username": "mrbobby"
},
"data": null
"data": null,
"targets": null
},
"title": "Workspace \"bobby-workspace\" manual build failed",
"title_markdown": "Workspace \"bobby-workspace\" manual build failed",

View File

@ -26,7 +26,8 @@
"version": "alpha",
"workspace": "bobby-workspace"
},
"data": null
"data": null,
"targets": null
},
"title": "Workspace 'bobby-workspace' has been manually updated",
"title_markdown": "Workspace 'bobby-workspace' has been manually updated",

View File

@ -21,7 +21,8 @@
"reason": "template updated to new dormancy policy",
"timeTilDormant": "24 hours"
},
"data": null
"data": null,
"targets": null
},
"title": "Workspace \"bobby-workspace\" marked for deletion",
"title_markdown": "Workspace \"bobby-workspace\" marked for deletion",

View File

@ -25,7 +25,8 @@
"threshold": "90%"
}
]
}
},
"targets": null
},
"title": "Your workspace \"bobby-workspace\" is low on volume space",
"title_markdown": "Your workspace \"bobby-workspace\" is low on volume space",

View File

@ -33,7 +33,8 @@
"threshold": "95%"
}
]
}
},
"targets": null
},
"title": "Your workspace \"bobby-workspace\" is low on volume space",
"title_markdown": "Your workspace \"bobby-workspace\" is low on volume space",

View File

@ -19,7 +19,8 @@
"threshold": "90%",
"workspace": "bobby-workspace"
},
"data": null
"data": null,
"targets": null
},
"title": "Your workspace \"bobby-workspace\" is low on memory",
"title_markdown": "Your workspace \"bobby-workspace\" is low on memory",

View File

@ -19,7 +19,8 @@
"activated_account_name": "bobby",
"initiator": "rob"
},
"data": null
"data": null,
"targets": null
},
"title": "Your account \"bobby\" has been activated",
"title_markdown": "Your account \"bobby\" has been activated",

View File

@ -14,7 +14,8 @@
"initiator": "rob",
"suspended_account_name": "bobby"
},
"data": null
"data": null,
"targets": null
},
"title": "Your account \"bobby\" has been suspended",
"title_markdown": "Your account \"bobby\" has been suspended",