Skip to content

feat!: allow disabling notifications #15509

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

Merged
merged 24 commits into from
Nov 19, 2024
Merged

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywood DanielleMaywood commented Nov 14, 2024

Resolves #15513

Adds a new option ($CODER_NOTIFICATIONS_ENABLED) that allows disabling notifications. This defaults to true to avoid disabling notifications for existing installations of Coder.

Disables notifications when both $CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT and $CODER_EMAIL_SMARTHOST are unset.

Drops the default value for $CODER_EMAIL_SMARTHOST.

@DanielleMaywood DanielleMaywood marked this pull request as ready for review November 14, 2024 13:13
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits but otherwise LGTM 👍🏻

Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking from my side!

@DanielleMaywood
Copy link
Contributor Author

I've made some changes to the approach taken here due to feedback in #15513. Rather than having a flag that enables/disables notifications, we figure it out based on if certain env variables are set. To do this we are making a breaking change by dropping the default for CODER_EMAIL_SMARTHOST, although this shouldn't be a major issue as anyone using SMTP notifications will most likely have changed this setting anyway.

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, a couple more things to tweak and we can get this merged today 👍

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @DanielleMaywood!

@johnstcn
Copy link
Member

I've made some changes to the approach taken here due to feedback in #15513. Rather than having a flag that enables/disables notifications, we figure it out based on if certain env variables are set. To do this we are making a breaking change by dropping the default for CODER_EMAIL_SMARTHOST, although this shouldn't be a major issue as anyone using SMTP notifications will most likely have changed this setting anyway.

Gotcha! FYI, if we do a breaking change, we should indicate that in the commit message (e.g. feat!: ...

@DanielleMaywood DanielleMaywood changed the title feat: allow disabling notifications feat!: allow disabling notifications Nov 19, 2024
@DanielleMaywood DanielleMaywood added the release/breaking This label is applied to PRs to detect breaking changes as part of the release process label Nov 19, 2024
@DanielleMaywood DanielleMaywood merged commit 576e1f4 into main Nov 19, 2024
32 of 33 checks passed
@DanielleMaywood DanielleMaywood deleted the dm-fix-defaults-notifications branch November 19, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/breaking This label is applied to PRs to detect breaking changes as part of the release process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support disabling notifications
4 participants