Conversation
8790f65 to
422ff50
Compare
b677666 to
573a0a4
Compare
fisx
reviewed
Nov 18, 2022
Contributor
fisx
left a comment
There was a problem hiding this comment.
i left some comments. looks good, but i think i want a guided tour on monday or so! :-) ping me!
977dd09 to
f509136
Compare
fisx
approved these changes
Nov 23, 2022
Comment on lines
+174
to
+177
| let resultLog = case e of | ||
| SMTPUnauthorized -> | ||
| ("Failed to establish connection, check your credentials." :: String) | ||
| SMTPConnectionTimeout -> ("Connection timeout." :: String) |
Contributor
There was a problem hiding this comment.
Suggested change
| let resultLog = case e of | |
| SMTPUnauthorized -> | |
| ("Failed to establish connection, check your credentials." :: String) | |
| SMTPConnectionTimeout -> ("Connection timeout." :: String) | |
| let resultLog = show e |
? not sure about this one :)
Contributor
Author
There was a problem hiding this comment.
I'd argue that it's fine to be a bit more chatty in log messages. Finally, they are meant to be interpreted by Ops people outside of Wire.
Co-authored-by: fisx <mf@zerobuzz.net>
Co-authored-by: fisx <mf@zerobuzz.net>
supersven
added a commit
that referenced
this pull request
Nov 24, 2022
This reverts commit 5d9f018.
supersven
added a commit
that referenced
this pull request
Nov 24, 2022
This reverts commit 5d9f018. It introduced flaky tests. E.g.: - https://concourse.ops.zinfra.io/teams/main/pipelines/wire-server-pr/jobs/integration-tests/builds/935.2#L634fd92d:2505 - https://concourse.ops.zinfra.io/teams/main/pipelines/wire-server-pr/jobs/integration-tests/builds/935.3#L634fda54:2468
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem to be solved:
When an SMTP server was misconfigured in the
brigconfiguration or was misbehaving itself,brigwas hanging on startup without any useful logs.Changes in this PR:
Add tests for sending via SMTP. The used SMTP server is postie. Unfortunately, the current version of postie wasn't compatible to our GHC version due to outdated dependencies. I've updated postie's dependencies and brought it upstream (alexbiehl/postie@c927023). However, these changes are neither on Hackage nor in nixpkgs, yet. That's why I had to add a Nix override...
The entry and exit (with result) are now logged. I've separated the log logic from other concerns.
In the initialization code, logs are flushed before any error is thrown.
I've added a
timeoutwith a big tolerance to every action. This should prevent use from hanging due to endlessly delaying SMTP servers and other network obscurities.Behaviour:
timeout, the observable behavior should be unchanged. All caught exceptions are logged and then re-thrown as is.Output without and with this patch:
When the SMTP server isn't reachable on startup.
Before:
Now:
Where
[brig]is logged output andbrig:stderr/stdout.Ticket: SQPIT-497
Checklist
changelog.d