Page MenuHomePhabricator

[Tunnelbroker] Refactor connection lifetimes into session object
ClosedPublic

Authored by jon on May 12 2023, 2:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 15, 10:52 AM
Unknown Object (File)
Nov 1 2024, 5:48 AM
Unknown Object (File)
Nov 1 2024, 5:48 AM
Unknown Object (File)
Nov 1 2024, 5:48 AM
Unknown Object (File)
Nov 1 2024, 5:48 AM
Unknown Object (File)
Nov 1 2024, 5:40 AM
Unknown Object (File)
Nov 1 2024, 1:29 AM
Unknown Object (File)
Oct 31 2024, 5:09 PM
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