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)
Wed, Sep 4, 9:27 PM
Unknown Object (File)
Thu, Aug 29, 3:16 PM
Unknown Object (File)
Aug 28 2024, 2:56 PM
Unknown Object (File)
Aug 27 2024, 6:42 AM
Unknown Object (File)
Aug 8 2024, 4:22 PM
Unknown Object (File)
Aug 8 2024, 11:24 AM
Unknown Object (File)
Aug 8 2024, 11:24 AM
Unknown Object (File)
Aug 8 2024, 11:24 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