-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
polykey identities authenticate
Timeout Upped to 2 Minutes
#49
Conversation
blocked on PK CI passing |
Just link it for now until @tegefaulkes fixes it up. And then prepare it for merging? Unless you're saying it works? |
I looked into the problem in I'm getting the following error pretty consistently.
I don't think all the |
This is blocked by #53 due to introduction of MDNS in polykey alpha-20 |
df77ace
to
d3ea32b
Compare
d3ea32b
to
8d2b8e6
Compare
This is working as intended. However, it is important to note, that it is not actually the RPC timing out, but the method on GithubProvider that is timing out. This is because of changes implemented in MatrixAI/js-rpc#53. Because the server streaming call sends the client a message at the start for the Authentication code, the timeout is cancelled on both the server and the client. This should be fine for our usecase right now. BUT it will mean that we can't have the client dictate a shorter timeout. There are a few ways to solve this:
btw, this PR in the current state, will not change anything. As the changes in Polykey (upping the timeout) and js-rpc (making timeout timers be cancelled after the first server-sent message) have made it so that this PR is not needed UNLESS the changes I've suggested above are going to be implemented |
The authenticate needs to be refactored to use the ctx now. It should be a The lifetime of the authentication will now depend on the lifetime of the SS call. If the client then closes the stream, or the stream is closed for some other reason, then you want to abort the authentication process. |
So the server side handler has already defaulted to 120000 so this PR is no longer required. |
Description
The
polykey identities authenticate
command currently follows the default timeout ofRPCClient
(15 seconds). Since RPC changes have been made so that the call-sitectx
can override the global timeout, it can be upped to 2 minutes without affecting the timeouts of other handlers.Issues Related
Tasks
Polykey
version{ timer: 120000 }
toctx
ofpolykey identities authenticate
to extend timeoutFinal checklist