Page MenuHomePhabricator

[web] check if version is supported by identity service
ClosedPublic

Authored by varun on Jun 12 2024, 12:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 15, 10:49 PM
Unknown Object (File)
Mon, Nov 11, 12:29 AM
Unknown Object (File)
Nov 4 2024, 3:01 AM
Unknown Object (File)
Nov 1 2024, 1:29 PM
Unknown Object (File)
Oct 5 2024, 6:43 AM
Unknown Object (File)
Oct 5 2024, 6:43 AM
Unknown Object (File)
Oct 5 2024, 6:43 AM
Unknown Object (File)
Oct 5 2024, 6:43 AM
Subscribers

Details

Summary

call the versionSupported identity client method to check if the client code version is supported. if it's not supported by identity and the client is logged in, log out. regardless of whether or not client is logged in, display modal instructing user to reload/refresh.

Depends on D12406

Test Plan
  • bumped min version supported on staging identity to 1000, confirmed that modal was displayed and i was logged out on web
  • modified function returned by useVersionSupportedByIdentity to always throw, confirmed that log appeared in console but user was not logged out and modal was not displayed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 12 2024, 12:22 PM
Harbormaster failed remote builds in B29629: Diff 41250!
ashoat requested changes to this revision.Jun 12 2024, 12:50 PM
ashoat added inline comments.
web/components/version-handler.react.js
28 ↗(On Diff #41250)

Nit: can we name this isClientVersionUnsupportedByAnyKeyserver? (added "any")

66 ↗(On Diff #41250)

We're going to call this ping endpoint a ton, largely due to the dependency on callLogOut, which will get recalculated every time the keyserver <> client socket gets reset (happens a lot on prod, generally a couple times every 10s)

I'd like to suggest a different approach:

  1. Separate effect that calls callVersionSupportedByIdentity and sets some state to true
  2. This effect just checks that state, instead of calling identity directly
This revision now requires changes to proceed.Jun 12 2024, 12:50 PM
This revision is now accepted and ready to land.Jun 14 2024, 2:38 PM