Skip to content

Commit

Permalink
[identity] bump native min supported version and add web min supporte…
Browse files Browse the repository at this point in the history
…d version

Summary:
bump native min supported version to 401, to resolve https://linear.app/comm/issue/ENG-9421/consider-marking-mobile-versions-below-401-unsupported-by-identity

also introducing a web min supported version and setting it to 120, which is the web equivalent of 401

Test Plan: changed min supported versions on staging identity to one higher than my dev native/web versions. was logged out on both platforms with an alert/modal explaining why. was alerted that i should update when i tried to log back in. then changed min supported versions back to 401/120 and could log in again

Reviewers: will

Reviewed By: will

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D13790
  • Loading branch information
vdhanan committed Oct 25, 2024
1 parent 7fa2310 commit 9644faf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/identity/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ pub const ONE_TIME_KEY_REFRESH_NUMBER: u32 = 5;

// Minimum supported code versions

pub const MIN_SUPPORTED_NATIVE_VERSION: u64 = 270;
pub const MIN_SUPPORTED_NATIVE_VERSION: u64 = 401;
pub const MIN_SUPPORTED_WEB_VERSION: u64 = 120;

// Request metadata

Expand Down
9 changes: 9 additions & 0 deletions services/identity/src/grpc_services/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use tracing::trace;

use crate::constants::{
request_metadata, tonic_status_messages, MIN_SUPPORTED_NATIVE_VERSION,
MIN_SUPPORTED_WEB_VERSION,
};

pub use grpc_clients::identity::shared::PlatformMetadata;
Expand All @@ -18,6 +19,14 @@ pub fn version_interceptor(req: Request<()>) -> Result<Request<()>, Status> {
{
Err(unsupported_version())
}
Some((version, platform))
if (platform == "web"
|| platform == "windows"
|| platform == "mac_os")
&& version < MIN_SUPPORTED_WEB_VERSION =>
{
Err(unsupported_version())
}
_ => Ok(req),
}
}
Expand Down

0 comments on commit 9644faf

Please sign in to comment.