cli
cli copied to clipboard
Add global `context-rpc-timeout` option
What was changed
Added a new global RPC timeout for within a context.
Why?
A slow remote codec can cause timeouts
Checklist
-
Closes #648
-
How was this tested:
- Any docs updates needed?
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.
hmm, is context-rpc-timeout too long? That would let folks know it's the rpc timeout from within a context?
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"?
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?