Page MenuHomePhabricator

[Tunnelbroker][lib] add `BadDeviceToken` message type
ClosedPublic

Authored by kamil on Jul 29 2024, 2:17 AM.
Tags
None
Referenced Files
F3544071: D12910.id42955.diff
Thu, Dec 26, 11:53 AM
F3543958: D12910.id42862.diff
Thu, Dec 26, 11:42 AM
Unknown Object (File)
Wed, Dec 25, 11:18 PM
Unknown Object (File)
Thu, Dec 19, 10:39 AM
Unknown Object (File)
Thu, Dec 19, 10:39 AM
Unknown Object (File)
Thu, Dec 19, 10:39 AM
Unknown Object (File)
Thu, Dec 19, 10:39 AM
Unknown Object (File)
Thu, Dec 12, 5:05 AM
Subscribers

Details

Summary

ENG-8498.

Similar to keyserver one but for Tunnelbroker.

Depends on D12909

Test Plan

Tested later in the stack.

Diff Detail

Repository
rCOMM Comm
Branch
publish-device-token
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jul 29 2024, 6:25 AM
kamil edited the summary of this revision. (Show Details)
kamil edited the test plan for this revision. (Show Details)
bartek added inline comments.
lib/types/tunnelbroker/peer-to-peer-message-types.js
115

Just curious - why do we need the invalid token value?

This revision is now accepted and ready to land.Jul 29 2024, 8:15 AM
lib/types/tunnelbroker/peer-to-peer-message-types.js
115

To handle some race conditions and messages delivered with delay:

  1. Tunnelbroker discovers token is invalid and queue message
  2. Device uploads a new device token (handlers trying to do it on each app load)
  3. BadDeviceToken is delivered.

In case 3 we just ignore the message because we're invalidating a different token (implemented in D12912).

lib/types/tunnelbroker/peer-to-peer-message-types.js
115

Okay, this makes perfect sense to me, thanks for explaining