Page MenuHomePhabricator

[Tunnelbroker] Refactor connection lifetimes into session object
ClosedPublic

Authored by jon on May 12 2023, 2:32 PM.
Tags
None
Referenced Files
F1599452: D7800.diff
Fri, Apr 19, 11:38 PM
Unknown Object (File)
Thu, Apr 18, 3:19 AM
Unknown Object (File)
Thu, Apr 18, 3:19 AM
Unknown Object (File)
Thu, Apr 18, 3:19 AM
Unknown Object (File)
Thu, Apr 18, 3:18 AM
Unknown Object (File)
Thu, Apr 18, 3:10 AM
Unknown Object (File)
Fri, Apr 12, 8:59 AM
Unknown Object (File)
Tue, Apr 9, 5:59 AM
Subscribers

Details

Summary

For better encapsulation around connection events
(e.g. device being authenticated and identified), moved
more of the connection logic into the session object.

Also, refine how connections are handled so they are properly
deregistered once a client closes a connection.

Depends on D7799

Test Plan
nix develop

# init localstack and run terraform
comm-dev services start
(cd services/terraform && ./run.sh)

(cd services/tunnelbroker && cargo run &)
(cd services/commtest && cargo test --test tunnelbroker_integration_test)
# Previously, running the suite twice would fail
(cd services/commtest && cargo test --test tunnelbroker_integration_test)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

services/tunnelbroker/src/websockets/session.rs
108 ↗(On Diff #26422)

These unwraps get handled in the next diff.

Just a lot of boilerplate to handle this nicely.

This revision is now accepted and ready to land.May 30 2023, 6:30 AM

Rebase on previous changes