Page MenuHomePhabricator

[services] Tunnelbroker - Update `SessionItem` database entity with the `IsOnline` field
ClosedPublic

Authored by max on Sep 16 2022, 11:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 9, 5:25 PM
Unknown Object (File)
Thu, May 9, 5:25 PM
Unknown Object (File)
Thu, May 9, 5:25 PM
Unknown Object (File)
Thu, May 9, 5:24 PM
Unknown Object (File)
Thu, May 9, 5:24 PM
Unknown Object (File)
Thu, May 9, 5:24 PM
Unknown Object (File)
Sat, May 4, 1:35 AM
Unknown Object (File)
Sat, Apr 27, 12:26 AM

Details

Summary

This diff introduces adding of IsOnline field to the DynamoDB database in the DeviceSessionItem entity.
To send notifications if the device is offline we need to distinguish the device state. To do this we will ping the device and change the device status (online/offline) in this database in this field.

This diff is a part of the stack.
More context is available in the Linear task description.

Related Linear task: ENG-1766

Test Plan
  1. Successfully built.
  2. Run yarn run-unit-tests and yarn run-integration-tests.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.
max edited the test plan for this revision. (Show Details)
max added reviewers: varun, tomek.
jon requested changes to this revision.Sep 16 2022, 1:21 PM

Passed a unit test in D5166.

Unfortunately, DatabaseManager tests are being filtered out because there's a requirement on external services. I don't have integration tests yet added.

This revision now requires changes to proceed.Sep 16 2022, 1:21 PM
max edited the test plan for this revision. (Show Details)
In D5164#151290, @jon wrote:

Passed a unit test in D5166.

Unfortunately, DatabaseManager tests are being filtered out because there's a requirement on external services. I don't have integration tests yet added.

It makes sense to change the test description to use a Docker. I've changed it. Thanks, @jon !

This revision is now accepted and ready to land.Sep 19 2022, 11:08 AM

Rebased on changes. Default false value was added for an online status on a new session insert.

Rebase on a master changes.

Tunnelbroker unit tests seem to be failing?

Tunnelbroker unit tests seem to be failing?

It was unrelated to these changes:

'flake.nix', searching up
do you want to allow configuration setting 'extra-substituters' to be set to 'https://comm.cachix.org' (y/N)? # Received cancellation signal,

The prompt issue was fixed with https://phab.comm.dev/D5194. For CI we need to "give permission" ahead of time to receive the comm binary cache. The default behavior is to prompt a user, but for CI, there is no user.