cli icon indicating copy to clipboard operation
cli copied to clipboard

Add global `context-rpc-timeout` option

Open yuandrew opened this issue 1 year ago • 4 comments

What was changed

Added a new global RPC timeout for within a context.

Why?

A slow remote codec can cause timeouts

Checklist

  1. Closes #648

  2. How was this tested:

  1. Any docs updates needed?

yuandrew avatar Sep 23 '24 17:09 yuandrew

This needs to be a general context timeout for the whole system IMO (left unset defaults to per-call of 10s). This is not specific to workflow show. Not sure we want to call it a context-timeout, unsure of a better name though.

Note the timeout being set in this PR is a context one that spans many RPC calls. We may be able to call it RPC timeout if we want, but we need to explain that it's not necessarily per RPC, and IMO it should be a top-level option.

cretz avatar Sep 23 '24 18:09 cretz

hmm, is context-rpc-timeout too long? That would let folks know it's the rpc timeout from within a context?

yuandrew avatar Sep 23 '24 20:09 yuandrew

That would let folks know it's the rpc timeout from within a context?

The problem is that "context" is a Go thing and people using the CLI don't care what language it is written in. I think we can probably have a "rpc timeout" though and document that it spans all RPCs on the CLI. Would be open to any other naming too that represents Go context timeout for life of the command without expecting people to even know we're using Go (but a bit afraid of generic "timeout" because it's only for things using the context). Maybe "client timeout"?

cretz avatar Sep 23 '24 20:09 cretz

we need to explain that it's not necessarily per RPC

Can you explain what this means? Or does this no longer apply now that I moved this to be a global option, and it applies to all RPC calls for the CLI?

yuandrew avatar Sep 23 '24 21:09 yuandrew