-
Notifications
You must be signed in to change notification settings - Fork 881
chore: add workspace reached resource threshold notification #16250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌 LGTM !
@stirby for the wording on template.
@DanielleMaywood I had imagined these being separate notification toggles for disk and memory since they're hardcoded in the template. I realize this is a little late to make that change, would it be overly complex to separate these toggles? I fear that OOM alerts will be noisy compared to OOD. If the user has to choose both or neither, they may forfeit OOD to mute OOM. |
I'm happy to just have two separate notifications in this case. @defelmnq What are your thoughts? |
Chatted live, we'll separate these into two notifications. Copy looks good, I'd recommend a more pop-out header:
Then we can keep the more descriptive body as-is. |
coderd/database/migrations/000288_oom_and_ood_notification.up.sql
Outdated
Show resolved
Hide resolved
Labels: map[string]string{ | ||
"workspace": "bobby-workspace", | ||
"threshold": "90%", | ||
"volume": "/home/coder", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we only alert on one volume being above threshold at once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With how this template is written, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we refactor to accept a slice of volumes please?
As an end-user, I wouldn't find much value in receiving one notification for each volume. We already have memory and volume split which I understand is for practical reasons, but splitting volumes would just add noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have now done so, have updated the screenshots to show the update notification wording
coderd/database/migrations/000288_oom_and_ood_notification.up.sql
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,33 @@ | |||
INSERT INTO notification_templates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make these inactive by default? We'll be launching inbox (hopefully) soon after OOM/OOD drops, and duplication would be unfortunate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do, although I could be convinced to go either way on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stirby WDYT? I fairly feel strongly that SMTP alerts for these are low value, and webhook is unlikely to be the default method chosen most of the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to leave these enabled for user visibility. I think more redundancy is preferred since these are pointing out an error that may lead to loss of work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, thank you! 👍
LGTM
}, | ||
}, | ||
{ | ||
name: "TemplateWorkspaceOutOfDisk", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: same test name twice.
name: "TemplateWorkspaceOutOfDisk", | |
name: "TemplateWorkspaceOutOfDisk_MultipleVolumes", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good for me -
Just I see that there's 5 golden files for each SMTP and Webhook, isn't there some of them that should be removed ? (outdated and due to previous generated versions of the PR ?)
Otherwise no need another review from me ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah, the new templates are fantastic! Awesome work.
Good catch @defelmnq, will delete the unused ones. |
Closes coder/internal#247
User Notification Settings:

Admin Notification Settings:

Out Of Memory notification:

Out Of Disk notifications:
