Page MenuHomePhabricator

[Keyserver] Open websocket connection with tunnelbroker
AcceptedPublic

Authored by jon on Apr 30 2023, 10:58 PM.
Tags
None
Referenced Files
F567186: D7691.diff
Thu, Jun 1, 12:19 AM
Unknown Object (File)
Wed, May 17, 3:33 AM
Unknown Object (File)
Tue, May 16, 2:13 PM
Unknown Object (File)
Fri, May 12, 9:52 PM
Unknown Object (File)
Fri, May 12, 1:55 PM
Unknown Object (File)
Fri, May 12, 4:50 AM
Unknown Object (File)
Thu, May 11, 10:46 PM
Unknown Object (File)
Thu, May 11, 12:12 PM
Subscribers

Details

Reviewers
ashoat
Summary

Attempt to connect to tunnelbroker if available.
This is meant to be a "hello world" for establishing
a tunnelbroker connection.

https://linear.app/comm/issue/ENG-3766

Test Plan
(cd services/tunnelbroker && cargo run &)
# should see message about db migration, then tunnelbroker message
(cd keyserver && yarn dev)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Apr 30 2023, 11:14 PM
Harbormaster failed remote builds in B18950: Diff 25959!
Harbormaster returned this revision to the author for changes because remote builds failed.May 1 2023, 11:23 AM
Harbormaster failed remote builds in B18958: Diff 25969!

Include parens for lambda

Remove type annotation, add back in later diff

Harbormaster returned this revision to the author for changes because remote builds failed.May 1 2023, 2:48 PM
Harbormaster failed remote builds in B18966: Diff 25981!
Harbormaster failed remote builds in B18967: Diff 25982!
Harbormaster returned this revision to the author for changes because remote builds failed.May 1 2023, 4:12 PM
Harbormaster failed remote builds in B18971: Diff 25986!
jon requested review of this revision.May 2 2023, 5:45 PM
ashoat requested changes to this revision.Wed, May 3, 6:29 AM

Generally looks good, but requesting changes because I don't think we should land this "Hello world" example

keyserver/package.json
86 ↗(On Diff #26029)

Realizing this will change the version of ws that is imported here. In fact we're already importing a newer version (7.5.9) than our version of express-ws uses (5.2.3), but it looks like we only use it for Flow types so it's okay

keyserver/src/socket/tunnelbroker.js
1 ↗(On Diff #26029)

Nit: add a newline after // @flow. In general, try to match conventions

5–30 ↗(On Diff #26029)

I don't think we should land this stuff, but it's a good proof-of-concept. Should we update this diff to actually include changes we want to land now?

This revision now requires changes to proceed.Wed, May 3, 6:29 AM
jon marked 3 inline comments as done.

Address feedback

jon planned changes to this revision.Thu, May 4, 8:50 AM
jon added inline comments.
keyserver/src/keyserver.js
67 ↗(On Diff #26076)

Do you mind if I just remove this call, and just build up the tunnelbroker support in the related tunnelbroker.js and types file?

Would like to make some forward momentum, as constantly squashing the work will make for one large singular diff.

keyserver/src/socket/tunnelbroker.js
5–30 ↗(On Diff #26029)

Was mostly looking to get good JS feedback, as that's still a big unknown for me.

I can amend the other "finished" work once I'm able to do that.

ashoat requested changes to this revision.Thu, May 4, 9:50 AM
ashoat added inline comments.
keyserver/src/keyserver.js
67 ↗(On Diff #26076)

Following our chat on Comm, is this still the plan? Let me know if so, otherwise passing back to you

This revision now requires changes to proceed.Thu, May 4, 9:50 AM
jon requested review of this revision.Tue, May 30, 7:09 AM
jon marked an inline comment as done.
jon added inline comments.
keyserver/src/keyserver.js
67 ↗(On Diff #26076)

Refactored out the blocking tunnelbroker work to avoid iterating through the JS commits as much.

For clarity, the plan is now to progress is to land the whole stack once it's in a good spot.

ashoat added inline comments.
keyserver/src/socket/tunnelbroker.js
9–19 ↗(On Diff #26076)

Not a fan of accepting diffs with junk values, but I guess this is sort of like a "hello world"

This revision is now accepted and ready to land.Tue, May 30, 7:15 AM
jon marked an inline comment as done.

Rebase on master