Polykey icon indicating copy to clipboard operation
Polykey copied to clipboard

Add lazy WebSocketConnection creation to PolykeyClient

Open amydevs opened this issue 1 year ago • 1 comments

Description

Adds lazy WebSocketConnection creation to PolykeyClient

Issues Fixed

  • Fixes #771

Tasks

  • [x] 1. Add lazy parameter to PolykeyClient

Final checklist

  • [ ] Domain specific tests
  • [ ] Full tests
  • [ ] Updated inline-comment documentation
  • [ ] Lint fixed
  • [ ] Squash and rebased
  • [ ] Sanity check the final build

amydevs avatar Jul 12 '24 05:07 amydevs

Looks fine, two things stand out though.

  1. Before it was expected that parameters like ports and addresses would be define while the client is running. This isn't true anymore so it may brake some things making that assumptions. Usually testing if that?
  2. You don't have any tests for the new behaviour. You'll need a few to demostrate the lazy feature along with making sure it works as expected and for catching future regressions.

tegefaulkes avatar Jul 16 '24 01:07 tegefaulkes

Need to be redone in the future, more considerations must be made as the API will actually change if the PolykeyClient is lazy. We should probably just make 2 separate classes instead for lazy + non-lazy respectively.

amydevs avatar Sep 09 '24 05:09 amydevs