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
F3556306: D5164.id16898.diff
Thu, Dec 26, 11:38 PM
F3555943: D5164.id16904.diff
Thu, Dec 26, 11:29 PM
F3542750: D5164.diff
Thu, Dec 26, 9:09 AM
Unknown Object (File)
Thu, Dec 19, 2:08 AM
Unknown Object (File)
Mon, Dec 16, 12:06 AM
Unknown Object (File)
Sun, Dec 15, 10:16 AM
Unknown Object (File)
Sun, Dec 15, 10:16 AM
Unknown Object (File)
Sun, Dec 15, 10:16 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
Branch
update-session-with-online
Lint
No Lint Coverage
Unit
No Test Coverage

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.