Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: remove notifications experiment#14869

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dannykopping merged 8 commits intomainfromdk/notification-stable
Oct 1, 2024

Conversation

dannykopping
Copy link
Contributor

@dannykoppingdannykopping commentedSep 30, 2024
edited
Loading

Notifications have proved stable in themainline release of v2.15, and in preparation for v2.16 we're moving this to stable.

Note:

Assuming a config which relies on the defaults for notifications settings, customers will now start seeing logs like this (assuming they don't have an open SMTP server on localhost):

[API] 2024-09-30 09:44:44.695 [warn]  notifications.manager.notifier: message dispatch failed  notifier_id=4991afe2-66e2-4d89-835b-d737141cfec5  msg_id=eeaae4b1-70de-4e89-9d11-6f83ecb8bce2  method=smtp  attempt=1 ...[API] error= SMTP client creation:[API] github.com/coder/coder/v2/coderd/notifications/dispatch.(*SMTPHandler).dispatch.func1[API] /Users/danny/Code/coder/coder/coderd/notifications/dispatch/smtp.go:128[API] - establish plain connection to server:[API] github.com/coder/coder/v2/coderd/notifications/dispatch.(*SMTPHandler).client[API] /Users/danny/Code/coder/coder/coderd/notifications/dispatch/smtp.go:323[API] - dial tcp [::1]:587: connect: connection refused

This occurs because the default notification method is set assmtp inCODER_NOTIFICATIONS_METHOD, and other defaults are configured (CODER_NOTIFICATIONS_EMAIL_SMARTHOST andCODER_NOTIFICATIONS_EMAIL_HELLO).

This is not harmful, but it isavoidable. We'd have to remove the default values forCODER_NOTIFICATIONS_EMAIL_SMARTHOST andCODER_NOTIFICATIONS_EMAIL_HELLO, and detect their absence, and log a warning with a link to the docs.

Effectively it amounts to the same thing, but it's a little more user-friendly.

The challenge with this approach, though, is it might remove some actually useful default values for customers. We could cover this in release notes, but it weakens our backwards-compatibility posture. It's not strictly a break, but it could cause unintended behaviour if operators blindly upgrade without reading the notes (everybody reads the release notes, right? RIGHT?)and they rely on these defaults.

I think a good middleground could be to mention the docs in the above error log. Then, when we implement#14644, we remove the default SMTP values and set anone method by default.


In retrospect I should've tried to find a way to not define any defaults here, but we live and learn.

@stirby
Copy link
Collaborator

@dannykopping thanks for calling out that note. We should ship as is and revisit this before the next release.

I'd opt to keep the defaults with a note in the docs rather than introduce friction in backward compatibility. To improve visibility, I can link to this PR in the release notes for 2.16.0.

We get a lot of negative feedback on the difficulty of reverting upgrades, and it'd be unfortunate for a downgrade to override their settings.

Can we merge this ASAP so I can pull it into the release branch? Just whenever you all are online. (cc@mtojek)

dannykopping reacted with thumbs up emoji

@dannykoppingdannykopping marked this pull request as ready for reviewOctober 1, 2024 09:07
@@ -49,7 +49,7 @@ func NewReportGenerator(ctx context.Context, logger slog.Logger, db database.Sto
return nil
}

err = reportFailedWorkspaceBuilds(ctx, logger,db, enqueuer, clk)
err = reportFailedWorkspaceBuilds(ctx, logger,tx, enqueuer, clk)
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Passing the maindb object through caused a deadlock; we need to pass the transaction-scoped db object instead.

Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
…rovisionerDaemonSigned-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
@dannykopping
Copy link
ContributorAuthor

I've added the beta badge:

image

image

stirby reacted with heart emoji

Signed-off-by: Danny Kopping <danny@coder.com>
@@ -148,11 +148,12 @@ const DeploymentSettingsNavigation: FC<DeploymentSettingsNavigationProps> = ({
Users
</SidebarNavSubItem>
)}
{experiments.includes("notifications") && (
<Stack direction={"row"} alignItems={"center"} css={{ gap: 0 }}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: When passing string values directly you can pass the value directly without the brackets:

direction="row"

dannykopping reacted with thumbs up emoji
@BrunoQuaresma
Copy link
Collaborator

I tried to QA this locally, but I don't see the option in the sidebar when starting the server without any experiments set. Is it expected? I'm not sure how we are handling beta features tho.

Copy link
Collaborator

@BrunoQuaresmaBrunoQuaresma left a comment

Choose a reason for hiding this comment

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

UI and code look good! 👍

dannykopping reacted with heart emoji
Signed-off-by: Danny Kopping <danny@coder.com>
@dannykoppingdannykoppingenabled auto-merge (squash)October 1, 2024 13:26
Signed-off-by: Danny Kopping <danny@coder.com>
@dannykoppingdannykopping merged commit11f7b1b intomainOct 1, 2024
28 of 29 checks passed
@dannykoppingdannykopping deleted the dk/notification-stable branchOctober 1, 2024 13:43
stirby pushed a commit that referenced this pull requestOct 1, 2024
Notifications have proved stable in the [mainline release ofv2.15](https://github.com/coder/coder/releases/tag/v2.15.0), and inpreparation for v2.16 we're moving this to stable.(cherry picked from commit11f7b1b)
@stirbystirby mentioned this pull requestOct 1, 2024
4 tasks
stirby added a commit that referenced this pull requestOct 1, 2024
- [x]#14869- [x]#14778- [x]#14883Addition to resolve flake: - [x]#14875---------Co-authored-by: Danny Kopping <dannykopping@gmail.com>Co-authored-by: Garrett Delfosse <garrett@coder.com>Co-authored-by: Ben Potter <ben@coder.com>Co-authored-by: Spike Curtis <spike@coder.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@BrunoQuaresmaBrunoQuaresmaBrunoQuaresma approved these changes

@mtojekmtojekmtojek approved these changes

Assignees

@dannykoppingdannykopping

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@dannykopping@stirby@BrunoQuaresma@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp