Skip to content

secrets edit should maintain the websocket as long as the editor session is alive #315

Description

@CMCDragonkai

Specification

When using secrets edit, it will timeout if the editor session isn't finished fast enough. I opened up the secrets edit and waited for a while, after trying to save, it failed:

cmcdragonkai ➜ matrix-framework-13-ryzen-7040  ➜ ~/Projects/Polykey-CLI
 $ ./dist/polykey.js secrets ed nix:/nix.conf
ERROR:polykey.PolykeyClient.WebSocketClient:ErrorWebSocketConnectionKeepAliveTimeOut: WebSocket Connection reached keep-alive timeout - 
ERROR:polykey.PolykeyClient.WebSocketClient.WebSocketConnection 0:ErrorWebSocketConnectionKeepAliveTimeOut: WebSocket Connection reached keep-alive timeout - 
ErrorWebSocketConnectionNotRunning

We need to make the websocket connection alive for as long as the editor session is alive, it shouldn't fail.

That being said it's also important not to start a vault commit transaction until the editor has in fact finished writing. We don't want this to block other secret operations. Concurrent testing needs to be checked too.

Tasks

  1. Use a stream life cycle to be maintained while the editor is there, it shouldn't expire on the keep alive timeout.
  2. Test that secrets edit can work for a long running edit.
  3. Test that while the editor is open it doesn't cause blocked concurrent secrets operations.

@tegefaulkes @aryanjassal

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions