Closed
Description
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
- Use a stream life cycle to be maintained while the editor is there, it shouldn't expire on the keep alive timeout.
- Test that secrets edit can work for a long running edit.
- Test that while the editor is open it doesn't cause blocked concurrent secrets operations.