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

251 Коммитов

Автор SHA1 Сообщение Дата
Phil Booth 31da83bb39
feat(db): serialize to JSON on write and deserialize from JSON on read
Previously, our Redis abstraction only worked with strings because it
only dealt with the somewhat nebulous concept of message metadata. Now
that we also want to use it for concrete types, it makes sense to bake
in automatic serialization from and deserialization to those types. This
frees consumers from the responsibility of having to serialize to a
Redis-friendly format manually.

This change achieves that aim by making the db methods generic. `db.set`
gets a type parameter that is `Serialize` and the getters get one that
is `DeserializeOwned`.
2018-10-06 13:52:31 +01:00
Phil Booth 6a43ce4048
Merge pull request #196 from mozilla/pb/strongly-typed-email-addresses
https://github.com/mozilla/fxa-email-service/pull/196
r=shane-tomlinson
2018-10-06 13:51:08 +01:00
Phil Booth dc08356f38
refactor(types): prefer EmailAddress type to raw strings
The EmailAddress type was only being used in some places, which meant
some places that weren't using it had to call `validate::email_address`
manually. This change spreads it throughout most of the project, so
that almost everywhere gets to benefit from strong typing.

The only place I decided to leave it alone was the provider layer, where
some providers have their own `EmailAddress` struct. I could have
aliased it at that layer too, but by that point addresses are just dumb
strings anyway so it didn't seem worth it.
2018-10-05 14:17:42 +01:00
Phil Booth d409f3755b
Merge pull request #199 from mozilla/pb/update-readme
https://github.com/mozilla/fxa-email-service/pull/199
r=shane-tomlinson
2018-10-05 14:17:28 +01:00
Phil Booth 6d04dcc9ba
feat(docs): mention command-line shortcuts for running binaries 2018-10-05 13:46:04 +01:00
Phil Booth 80bb986418
feat(docs): promote fxa-local-dev as a first class way to run locally 2018-10-05 13:46:03 +01:00
Phil Booth c1928df500
chore(docs): update the readme to match current reality 2018-10-05 13:46:03 +01:00
Phil Booth 1ebe354736
chore(docs): make circleci build badge match its peers 2018-10-05 13:46:00 +01:00
Phil Booth c8a42f7f0b
Merge pull request #197 from mozilla/pb/195
https://github.com/mozilla/fxa-email-service/pull/197
r=shane-tomlinson
2018-10-05 13:45:44 +01:00
Phil Booth 95e20e0740
fix(ci): only build deployment artifacts for tags 2018-10-04 19:56:07 +01:00
Phil Booth 12c2e325e9
Merge pull request #193 from mozilla/pb/166
https://github.com/mozilla/fxa-email-service/pull/193
r=shane-tomlinson,brizental
2018-10-04 07:49:29 +01:00
Phil Booth a644d18ca5
refactor(redis): extract redis code to a dedicated db module 2018-10-04 07:26:53 +01:00
Shane Tomlinson cf79a894d6
Merge pull request #194 from mozilla/train-122 r=@shane-tomlinson
Release v1.122.0
2018-10-03 07:49:05 +01:00
Vlad Filippov 9cc6880b16 Release v1.122.0 2018-10-02 17:57:57 -04:00
Phil Booth 7dbc8ade5b
Merge pull request #192 from mozilla/pb/191
https://github.com/mozilla/fxa-email-service/pull/192
r=shane-tomlinson
2018-09-26 11:52:39 +01:00
Phil Booth 85529f7f94
fix(config): ignore empty environment variables 2018-09-26 09:55:13 +01:00
Phil Booth 35eaefd3e2
Merge pull request #190 from brizental/brizental/189
https://github.com/mozilla/fxa-email-service/pull/190
r=philbooth
2018-09-25 19:13:34 +01:00
Beatriz Rizental 0f2b5740c3 fix(queues): remove unused fields from notification structs 2018-09-25 14:57:08 -03:00
Phil Booth f20841662a
Merge pull request #188 from brizental/brizental/162
https://github.com/mozilla/fxa-email-service/pull/188
r=philbooth
2018-09-24 19:58:55 +01:00
Beatriz Rizental 588f0d6740 chore(tests): add tests for message parsing in the queues 2018-09-24 15:48:41 -03:00
Beatriz Rizental 9a882094a6 fix(config): update config version in Cargo.toml 2018-09-20 13:47:58 -03:00
Vijay Budhram 97595afe3f
Merge pull request #187 from mozilla/train-121 2018-09-19 11:35:46 -04:00
vladikoff d548d5ecc4 Release v1.121.0 2018-09-18 13:45:04 -04:00
Phil Booth 5192acf319
Merge pull request #184 from pjenvey/chore/rust-toolchain
https://github.com/mozilla/fxa-email-service/pull/184
r=philbooth
2018-09-18 05:54:24 +01:00
Philip Jenvey 3903f0b94f
chore: utilize a rust-toolchain file
moves the toolchain spec to solely one file
2018-09-17 15:56:03 -07:00
Phil Booth 9fce06a919
Merge pull request #183 from mozilla/train-120
https://github.com/mozilla/fxa-email-service/pull/183
r=philbooth
2018-09-06 07:20:37 +01:00
vladikoff b72ff78202 Release v1.120.0 2018-09-05 22:38:44 -04:00
Phil Booth e5b82c7a7c
Merge pull request #182 from brizental/brizental/98
https://github.com/mozilla/fxa-email-service/pull/182
r=philbooth
2018-08-25 07:53:05 +01:00
Beatriz Rizental 482f69cebf feat(docs): document errors and errno 2018-08-24 13:24:51 -07:00
Phil Booth 06cd3ad672
Merge pull request #180 from brizental/brizental/157
https://github.com/mozilla/fxa-email-service/pull/180
r=philbooth
2018-08-23 06:51:08 +01:00
Beatriz Rizental d74eaec97f feat(errors): return bouncedAt field in bounce error message 2018-08-22 14:59:30 -07:00
Beatriz Rizental f7eb9f65bb Release v1.119.0 (#179) 2018-08-22 12:15:25 -04:00
Beatriz Rizental 7beca536e6 fix(queues): make queue parsing logic follow the sns format (#178) r=@vladikoff 2018-08-21 18:48:23 -04:00
Beatriz Rizental 0f790c1647 fix(logging): remove unnecessary and add debug logs in queues (#177) r=@vladikoff
There is a bunch of minor fixes going on in this PR.

Fix #173

Add some debug logs for notifications in case we need it (probably would be good to only show them when we have some debug flag on or something)
Notification JSON may come in different shapes, nested or not nested, so I added functionality to accept both. That logic might me a little fragile so let me know what you think.
2018-08-20 20:22:57 -04:00
Beatriz Rizental 73d07bd7cc feat(logging): add sentry support (#176) r=@vladikoff
Fix #155

I added support for Sentry. For that to work we just need to set FXA_EMAIL_SENTRY_DSN.
2018-08-16 14:06:14 -07:00
Beatriz Rizental 5e9f268826 fix(queues): fix executor error on queues process (#174) r=@vladikoff,@philbooth 2018-08-16 13:40:14 -07:00
Beatriz Rizental ac2bfa2626
Merge pull request #175 from mozilla/brizental-patch-1
chore(docs): remove under construction badge
2018-08-16 10:30:27 -07:00
Beatriz Rizental 0851f8ca12
chore(docs): remove under construction badge 2018-08-16 08:12:51 -07:00
Phil Booth 6fc6c31043
Merge pull request #171 from brizental/brizental/socketlabs-message-id
r=philbooth
2018-08-14 08:37:07 +01:00
Beatriz Rizental 30639fc3bc feat(socketlabs): create and return id for socketlabs messages 2018-08-13 13:08:19 -07:00
Beatriz Rizental eddeb9a97e Release v1.118.0 (#165) 2018-08-09 14:55:55 -04:00
Beatriz Rizental c085cbb3f3 fix(ses): use updated rusoto version that sends message in body (#164) r=@vladikoff
Fixes https://github.com/mozilla/fxa-email-service/issues/139
2018-08-09 14:21:32 -04:00
Beatriz Rizental 501a59167c chore(queues): use mozlog and failure in queues process (#161) r=@vladikoff,@philbooth
Fixes #10
Fixes #99
Connects to #116

This was my first experience messing with the queues part of the service, I thought dealing with these issues first would make the experience smoother. I added the standard logging and error handling with the failure crate just like the rest of the lib.

Since our errors were very much centered around requests and rocket, we have some fields that don't really make sense for the queues process, like the http code, so let me know what you think about that and if the queues process should have a different error format. I also did another minor change to the errors: now the response JSON will return a number for code and errno, instead of a string.

For logging, I implemented an AppErrorFields so that we get better structured logs for our AppErrors. I used slog_scope to make it easier to have a global logger for the queues process, let me know what you think about that... In the README.md for that crate, they have some warnings about it not being the best idea all the time, but anyways, I thought it was neat and worked well for our case.

Finally, when I started working in the queues they were not really working due to parsing errors, you will see that I changed a little bit the SQS Notification struct, that was for parsing to work, also I created a notification-dev queue in the AWS Console, because it didn't exist yet, I think everything is working fine now.
2018-08-08 20:24:14 -04:00
Phil Booth 95acb7c99e
Merge pull request #160 from brizental/brizental/updates
chore(deps): update rocket, failure, rusoto and rust versions
r=philbooth
2018-08-08 19:02:09 +01:00
Beatriz Rizental 9854cc99a0 chore(deps): update rocket, failure, rusoto and rust versions 2018-08-08 09:43:34 -07:00
Beatriz Rizental e0a283915a chore(config): change aws region defaults for dev and prod (#154) r=@vladikoff,@philbooth
Fixes #153
2018-08-02 16:41:28 -04:00
Beatriz Rizental bed6a93f9d Release v1.117.0 (#152) 2018-08-01 13:42:20 -04:00
Beatriz Rizental 3e3d6cf72e chore(tests): add tests for request unicode handling (#151) r=@vladikoff,@philbooth
Fixes #9
2018-08-01 11:52:07 -04:00
Phil Booth 0e7957a878
Merge pull request #142 from mozilla/pb/enforce-default-provider
https://github.com/mozilla/fxa-email-service/pull/142
r=brizental,vladikoff
2018-07-30 08:04:05 +01:00
Phil Booth c115318dfa
refactor(settings): group provider-related settings together 2018-07-30 07:45:29 +01:00