Граф коммитов

222 Коммитов

Автор SHA1 Сообщение Дата
Phil Booth abf4456098
Merge pull request #249 from mozilla/pb/env-enum-type
https://github.com/mozilla/fxa-email-service/pull/249
r=vladikoff
2018-11-26 15:58:01 +00:00
Phil Booth dba93f0dbf
refactor(settings): promote Env to an enum from a wrapped string 2018-11-26 12:16:14 +00:00
Phil Booth 592b4d38b2
Merge pull request #250 from mozilla/pb/less-debug-info
https://github.com/mozilla/fxa-email-service/pull/250
r=vladikoff
2018-11-22 14:56:32 +00:00
Phil Booth 91a5173029
chore(build): lower the debug level to decrease binary size 2018-11-22 07:34:50 +00:00
Phil Booth bede88da56
Merge pull request #246 from mozilla/pb/214
https://github.com/mozilla/fxa-email-service/pull/246
r=vladikoff,vbudhram
2018-11-20 20:31:43 +00:00
Phil Booth 05acce118c
chore(package): create an automated release script 2018-11-20 19:36:00 +00:00
Vlad Filippov 2649bbf634
Merge pull request #247 from mozilla/train-125
Uplift Train 125 to master
2018-11-20 12:02:28 -05:00
Phil Booth 283a2840d9
chore(package): bump version, update changelog 2018-11-20 14:23:13 +00:00
Phil Booth 7a3d60ec75
Merge pull request #245 from mozilla/pb/244
https://github.com/mozilla/fxa-email-service/pull/245
r=vladikoff
2018-11-20 14:15:44 +00:00
Phil Booth 3fed10523f
fix(sentry): stop passing 4xx errors to Sentry 2018-11-20 12:18:17 +00:00
Phil Booth ecb7c38da0
Merge train-125 into master
https://github.com/mozilla/fxa-email-service/pull/241
r=vladikoff
2018-11-15 14:33:58 +00:00
Phil Booth 3d73bee857
chore(package): bump version, update changelog 2018-11-15 07:55:24 +00:00
Phil Booth 5bd956cf30
Merge pull request #240 from mozilla/pb/239
https://github.com/mozilla/fxa-email-service/pull/240
r=rfk
2018-11-15 07:54:16 +00:00
Phil Booth 1449161261
fix(ci): enable branch builds in travis 2018-11-15 07:33:23 +00:00
Phil Booth 67ebf3fe77
fix(headers): propagate the Content-Language header 2018-11-15 07:33:23 +00:00
Phil Booth 3e27866763
fix(ses): add Sender header 2018-11-15 06:53:49 +00:00
Phil Booth 67320d2830
fix(ses): ensure html part gets charset=utf-8 content type 2018-11-15 06:33:48 +00:00
Vijay Budhram b74a56f0d9
Merge pull request #238 from mozilla/train-125, r=@vladikoff
chore(package): bump version to 1.125.0
2018-11-14 12:51:58 -05:00
Vijay Budhram 54ce16c65c
chore(package): bump version to 1.125.0 2018-11-14 07:46:53 -05:00
Phil Booth c9c62459c8
Merge pull request #218 from mozilla/pb/provider-type
https://github.com/mozilla/fxa-email-service/pull/218
r=vbudhram
2018-11-10 09:12:20 +00:00
Phil Booth 3a13ef4561
Merge pull request #237 from mozilla/pb/update-rust
https://github.com/mozilla/fxa-email-service/pull/237
r=shane-tomlinson
2018-11-09 16:20:22 +00:00
Phil Booth 0bd766d431
feat(settings): extract provider type to a fully-fledged enum
The provider type was modelled as a newtype struct around a `String` but
there's a finite number of values, so really it should be an enum. This
wasn't too pressing until now but will shortly come in useful for the
configuration stuff, which needs a provider type too.
2018-11-09 16:20:12 +00:00
Phil Booth 664222cd27
chore(deploy): update rust version 2018-11-09 16:00:57 +00:00
Phil Booth 8268f4697e
Merge pull request #236 from mozilla/pb/210
https://github.com/mozilla/fxa-email-service/pull/236
r=brizental
2018-11-09 15:23:17 +00:00
Phil Booth 4297ed2fad
refactor(api): reduce the number of different error kinds we return
The error-handling in this repo grew pretty organically without us
giving much thought to an over-arching strategy. The end result of that
was a proliferation of different error types that weren't really adding
much value.

The API here is simple and the 4xx responses are really limited to bad
requests and bounce/complaint limit violations. Everything else is an
internal server error. As such, the `error` module could be simplified
by employing a blanket `Internal` error type to cover the multitude of
niche errors that should never occur during normal conditions. The
detail for those errors is still available in the `message` property and
Sentry will still log the backtrace of course.

I also noticed that the Rocket catcher stuff wasn't really being used,
so pulled that out too. We have a standard JSON error format like the
rest of the FxA ecosystem, and we always want the response payload to be
the serialisation of that structure.

One side-effect of all these changes is that the errno value has changed
in most cases. However, I took care to preserve the errno for the bounce
and complaint violations, because it's hard-coded in the auth server. It
wouldn't have been that onerous to open a PR for commensurate changes
over there, but the number of errors left here worked out in such a way
that made sense not to bother.
2018-11-09 13:45:31 +00:00
Vlad Filippov 1ef739242c
Merge pull request #234 from mozilla/comment-rm
fix(cargo): remove old rocket comment
2018-11-08 15:57:22 -05:00
Vlad Filippov c706d760f7
fix(cargo): remove old rocket comment 2018-11-08 14:31:23 -05:00
Phil Booth 785e2b3161
Merge pull request #233 from mozilla/pb/allow-sentry-disabled
https://github.com/mozilla/fxa-email-service/pull/233
r=vladikoff
2018-11-08 14:07:17 +00:00
Phil Booth 4f47e93b6a
fix(settings): fix panic when sentry is disabled 2018-11-08 09:18:48 +00:00
Phil Booth 321fd721d5
Merge train-124 into master
https://github.com/mozilla/fxa-email-service/pull/232
r=vladikoff
2018-11-07 18:53:57 +00:00
Phil Booth 6f795044ce
Merge branch 'master' into train-124 2018-11-07 18:13:06 +00:00
Phil Booth a5c9c1f5b8
Merge pull request #229 from mozilla/pb/201
https://github.com/mozilla/fxa-email-service/pull/229
r=vladikoff
2018-11-07 16:37:49 +00:00
Phil Booth d6d01b32c4
chore(package): bump version, update changelog 2018-11-07 16:34:01 +00:00
Phil Booth 1302edf987
Merge pull request #228 from mozilla/pb/emailmessage-dep
https://github.com/mozilla/fxa-email-service/pull/228
r=vladikoff
2018-11-07 16:32:13 +00:00
Phil Booth 5d5ae603de
feat(types): ignore display name part when parsing email addresses
Fixes #201.

Email addresses that we receive from bounce, complaint and delivery
notifications may not be identical matches to what we set on messages.
We already did some normalization by lower-casing the address when
parsing. This change extends that normalization process by trimming
whitespace and unwrapping the address part if it has been wrapped in
angle bracket delimiters to separate it from the display name. This
matches the behaviour of the auth server.
2018-11-07 16:16:58 +00:00
Phil Booth d7aaf59ea4
Merge pull request #230 from mozilla/pb/sentry-updates
https://github.com/mozilla/fxa-email-service/pull/230
r=vladikoff
2018-11-07 16:02:25 +00:00
Phil Booth 0a2d39a33d
chore(package): include debug symbols in release builds 2018-11-07 15:39:06 +00:00
Phil Booth 02408f590a
fix(sentry): capture errors at point of creation rather than when logged
We were sending errors to Sentry at the point where they are logged,
but there are a number of paths where an error is raised without being
logged. Instead, this change captures them at the point of creation,
which should mean we now capture every error.
2018-11-07 15:39:06 +00:00
Phil Booth 608c07eb7e
chore(deps): update sentry 2018-11-07 15:39:03 +00:00
Phil Booth c403c3fb81
Merge pull request #231 from mozilla/pb/205
https://github.com/mozilla/fxa-email-service/pull/231
r=vladikoff
2018-11-07 15:38:51 +00:00
Phil Booth 906f391151
feat(bounces): use timestamps from ses instead of the current time
Fixes #205.

SES provides a UTC-based timestamp for bounce and complaint events but
the auth server opted to ignore it. I'm not sure that was the optimal
decision because messages might linger on a queue (either ours or the
provider's) for a length of time before we process it. Given that we
already trust SES et al to deliver sane notifications, it doesn't seem
too great a stretch to also trust the timestamp on those notifications.
2018-11-07 14:05:25 +00:00
Phil Booth 5d03a48dad
fix(mime): use base64 encoding instead of 8bit 2018-11-07 06:43:45 +00:00
Phil Booth 5966d6252d
refactor(providers): eliminate format! invocations in ses send method 2018-11-05 16:12:01 +00:00
Phil Booth 85ffe3ebe8
refactor(ses): upgrade the emailmessage crate 2018-11-05 16:12:01 +00:00
Phil Booth f5023c2f23
Merge pull request #221 from mozilla/pb/tidy-app-errors
https://github.com/mozilla/fxa-email-service/pull/221
r=rfk
2018-11-01 21:13:34 +00:00
Phil Booth 90c6a0110e
refactor(errors): stop exposing AppErrorKind directly from AppError
There was a minor violation of the law of Demeter in our `AppError`
struct, where it was directly exposing its inner `AppErrorKind` to
callers. Not a huge deal, but it meant that any changes made to the
inner structure would leak out and require corresponding changes to the
consuming code (and I am planning some of those inner changes as part of
issue #210). Better to expose just the parts that are necessary via its
own API.

At the same time, I opted to replace the home-baked `AppError::json()`
method with a more conventional `impl Serialize`, because it's less
astonishing and just as easy to use with `serde_json::to_string`.
2018-11-01 11:02:11 +00:00
Phil Booth 12e4a4c37b
Merge train-124 into master
https://github.com/mozilla/fxa-email-service/pull/215
r=shane-tomlinson
2018-10-30 15:51:01 +00:00
Phil Booth c0dfd7a382
chore(package): bump version, update changelog 2018-10-30 14:09:55 +00:00
Phil Booth cb5ccbf78d
Merge pull request #213 from mozilla/pb/tidy-src-tree
https://github.com/mozilla/fxa-email-service/pull/213
r=shane-tomlinson
2018-10-30 13:29:02 +00:00
Phil Booth cf32a4362d
refactor(project): tidy up the directory structure a bit
We've grown a lot of modules in this repo and it's hard to see the wood
for the trees when you look in the `src` directory. This commit attempts
to neaten everything up a bit by scoping some of them under collective
parent modules:

* `auth_db`, `delivery_problems` and `message_data` have moved to `db`,
  and the old `db` has moved to `db/core`.

* `healthcheck` and `send` have moved to `api`.

* `app_errors`, `duration`, `email_address` and `validate` have moved to
  `types`, and `app_errors` is now just `error`.

* `serialize` has moved to `settings` as it was only referenced there.

Hopefully the end result makes it easier to zero in on modules of
interest when working in the repo.
2018-10-30 07:30:21 +00:00