From 55af66a7e6ff01ee8bc99b995793860c642ea71d Mon Sep 17 00:00:00 2001 From: jrconlin Date: Wed, 13 Jul 2022 15:29:00 -0700 Subject: [PATCH 1/3] chore: tag 1.64.0 --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ Cargo.lock | 6 +++--- autoendpoint/Cargo.toml | 2 +- autopush-common/Cargo.toml | 2 +- autopush/Cargo.toml | 2 +- 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f832d60dd..1b0e5eada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ + +## (2022-07-13) + + +#### Bug Fixes + +* add jitter to retry (#319) ([3272fdec](https://github.com/mozilla-services/autopush-rs/commit/3272fdec1ccd144b0fdff678c64eddf27d45626f)) +* various mini-patches for FxA integration work (#321) ([b2b6bfd3](https://github.com/mozilla-services/autopush-rs/commit/b2b6bfd3e5f4273e6312f6305fb122013182d55b)) + * Added more verbose `trace!` and `debug!` logging messages. + * ignore padding errors for VAPID keys + * bumped up default max bytes to handle base64 encoded 4096 block + * record the VapidError as an info before we send it to metrics + +#### Chore + +* tag 1.63.0 (#312) ([f40a14a7](https://github.com/mozilla-services/autopush-rs/commit/f40a14a7972f19702d11075d7f49c6f29853b6c2)) + +#### Breaking Changes + +* Update for Jun 2022: Alters env var key names (#313) ([1ec85899](https://github.com/mozilla-services/autopush-rs/commit/1ec858990dabeefea5953b486dbd9beeada29ca2)) + Broke: Environment var key changes from: + + `AUTOPUSH_` => `AUTOPUSH__` + + `AUTOEND_` => `AUTOEND__` + ## 1.63.0 (2022-06-02) diff --git a/Cargo.lock b/Cargo.lock index 0cc5a2462..15519e5d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -500,7 +500,7 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "autoendpoint" -version = "1.63.0" +version = "1.64.0" dependencies = [ "a2", "actix-cors", @@ -553,7 +553,7 @@ dependencies = [ [[package]] name = "autopush" -version = "1.63.0" +version = "1.64.0" dependencies = [ "autopush_common", "base64 0.13.0", @@ -602,7 +602,7 @@ dependencies = [ [[package]] name = "autopush_common" -version = "1.63.0" +version = "1.64.0" dependencies = [ "base64 0.13.0", "cadence", diff --git a/autoendpoint/Cargo.toml b/autoendpoint/Cargo.toml index 17c1522bc..844f3c265 100644 --- a/autoendpoint/Cargo.toml +++ b/autoendpoint/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "autoendpoint" # Should match version in ../autopush/Cargo.toml -version = "1.63.0" +version = "1.64.0" authors = ["Mark Drobnak ", "jrconlin "] edition = "2021" diff --git a/autopush-common/Cargo.toml b/autopush-common/Cargo.toml index 2f35e14b7..4573c8ff7 100644 --- a/autopush-common/Cargo.toml +++ b/autopush-common/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "autopush_common" # Should match version in ../autopush/Cargo.toml -version = "1.63.0" +version = "1.64.0" authors = [ "Ben Bangert ", "JR Conlin ", diff --git a/autopush/Cargo.toml b/autopush/Cargo.toml index 00e5a864d..311435678 100644 --- a/autopush/Cargo.toml +++ b/autopush/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "autopush" -version = "1.63.0" +version = "1.64.0" authors = [ "Ben Bangert ", "JR Conlin ", From f1b1ed12d8e2ff0d799338104445e91bc0edca1a Mon Sep 17 00:00:00 2001 From: jrconlin Date: Mon, 15 Aug 2022 15:16:41 -0700 Subject: [PATCH 2/3] bug: Silence data overflow error in sentry * also apply 1.63 clippy fixex Closes: #326 --- autoendpoint/src/error.rs | 4 +++- autoendpoint/src/extractors/routers.rs | 2 +- autoendpoint/src/headers/vapid.rs | 6 +++--- autoendpoint/src/routers/apns/router.rs | 1 + autoendpoint/src/routers/mod.rs | 2 +- autopush/src/megaphone.rs | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/autoendpoint/src/error.rs b/autoendpoint/src/error.rs index 36c80a890..f7addc534 100644 --- a/autoendpoint/src/error.rs +++ b/autoendpoint/src/error.rs @@ -200,7 +200,9 @@ impl ApiErrorKind { | ApiErrorKind::InvalidAuthentication | ApiErrorKind::InvalidLocalAuth(_) | // Ignore missing or invalid user errors - ApiErrorKind::NoUser | ApiErrorKind::NoSubscription, + ApiErrorKind::NoUser | ApiErrorKind::NoSubscription | + // Ignore overflow errors + ApiErrorKind::Router(RouterError::TooMuchData(_)), ) } diff --git a/autoendpoint/src/extractors/routers.rs b/autoendpoint/src/extractors/routers.rs index 66f0c893d..26dcf8cb7 100644 --- a/autoendpoint/src/extractors/routers.rs +++ b/autoendpoint/src/extractors/routers.rs @@ -13,7 +13,7 @@ use std::str::FromStr; use std::sync::Arc; /// Valid `DynamoDbUser::router_type` values -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] #[allow(clippy::upper_case_acronyms)] pub enum RouterType { WebPush, diff --git a/autoendpoint/src/headers/vapid.rs b/autoendpoint/src/headers/vapid.rs index b7d101dcf..bd98e9280 100644 --- a/autoendpoint/src/headers/vapid.rs +++ b/autoendpoint/src/headers/vapid.rs @@ -5,7 +5,7 @@ use thiserror::Error; pub const ALLOWED_SCHEMES: [&str; 3] = ["bearer", "webpush", "vapid"]; /// Parses the VAPID authorization header -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub struct VapidHeader { pub scheme: String, pub token: String, @@ -21,7 +21,7 @@ pub struct VapidHeaderWithKey { } /// Version-specific VAPID data. Also used to identify the VAPID version. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub enum VapidVersionData { Version1, Version2 { public_key: String }, @@ -77,7 +77,7 @@ impl VapidHeader { } } -#[derive(Debug, Error, PartialEq)] +#[derive(Debug, Error, Eq, PartialEq)] pub enum VapidError { #[error("Missing VAPID token")] MissingToken, diff --git a/autoendpoint/src/routers/apns/router.rs b/autoendpoint/src/routers/apns/router.rs index 03dfb9a2d..4a23ea234 100644 --- a/autoendpoint/src/routers/apns/router.rs +++ b/autoendpoint/src/routers/apns/router.rs @@ -335,6 +335,7 @@ mod tests { const DEVICE_TOKEN: &str = "test-token"; const APNS_ID: &str = "deadbeef-4f5e-4403-be8f-35d0251655f5"; + #[allow(clippy::type_complexity)] /// A mock APNS client which allows one to supply a custom APNS response/error struct MockApnsClient { send_fn: Box) -> Result + Send + Sync>, diff --git a/autoendpoint/src/routers/mod.rs b/autoendpoint/src/routers/mod.rs index 76e43ceff..bbccd63ec 100644 --- a/autoendpoint/src/routers/mod.rs +++ b/autoendpoint/src/routers/mod.rs @@ -34,7 +34,7 @@ pub trait Router { } /// The response returned when a router routes a notification -#[derive(Debug, PartialEq)] +#[derive(Debug, Eq, PartialEq)] pub struct RouterResponse { pub status: StatusCode, pub headers: HashMap<&'static str, String>, diff --git a/autopush/src/megaphone.rs b/autopush/src/megaphone.rs index 8e0050687..e4169ce75 100644 --- a/autopush/src/megaphone.rs +++ b/autopush/src/megaphone.rs @@ -67,7 +67,7 @@ struct BroadcastRevision { // A provided Broadcast/Version used for `BroadcastSubsInit`, client comparisons, and outgoing // deltas -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] pub struct Broadcast { broadcast_id: String, version: String, From 5a3e22d0f725517f0527bc33f12a5a022202b147 Mon Sep 17 00:00:00 2001 From: jrconlin Date: Mon, 15 Aug 2022 15:48:31 -0700 Subject: [PATCH 3/3] f clippy spare --- autopush-common/src/db/models.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopush-common/src/db/models.rs b/autopush-common/src/db/models.rs index 84a3b5c0e..3be9c5cbe 100644 --- a/autopush-common/src/db/models.rs +++ b/autopush-common/src/db/models.rs @@ -63,7 +63,7 @@ impl From> for NotificationHeaders { } } -#[derive(Deserialize, PartialEq, Debug, Clone, Serialize)] +#[derive(Deserialize, Eq, PartialEq, Debug, Clone, Serialize)] pub struct DynamoDbUser { // DynamoDB #[serde(serialize_with = "uuid_serializer")]