Backport of Fix KVSGet method to handle QueryOptions properly into release/1.12.x #13348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #13344 to be assessed for backporting due to the inclusion of the label backport/1.12.
The below text is copied from the body of the original PR.
Fixes #13303
Description
Originally reported by @wjordan here, I requested the bugfix be removed from #11500 assuming it was a separate issue. Unfortunately it turns out that broke KVS.Get RPC operations in 1.12.1.
Cause
The KV.Get endpoint was being passed
**structs.KeyRequest
, which when handled by a client's RPC method, was not fulfilling this assertion:consul/agent/pool/pool.go
Lines 632 to 635 in c48120d
causing the ReadTimeout to be set to the default value of
rpc_hold_timeout
(source).Testing & Reproduction steps
Set up a cluster with server and client using vagrant.