-
Notifications
You must be signed in to change notification settings - Fork 12
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
Skip retry on bad requests #66
Conversation
When querying Consul OSS with the namespace query param, it results in a 400. And when retry is configured, it attempts to retry a bad request. Changes now return on first 400 instead of waiting through all the retries. on the client side, it is preceived as hanging and blocks waiting on expected behavior.
Ideally it would be nice for hashicat to consume new changes that structure the Consul API status errors hashicorp/consul#11054. But it would require waiting on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me!
I noticed when discovering this issue that catalog-services didn't do a retry whereas consul-kv did the retry. Is it something on the CTS-side (vs. hcat) that causes the two to have different behavior? If you're answering on the CTS-side PR, feel free to disregard.
Yeah! CTS has Consul retry configured. The retry was only attempting for consul-kv and not catalog-services because that cs is custom on the CTS side which was missing the |
Ah interesting. When an issue with catalog-services (this is me!) causes "correct" behavior elsewhere. Thanks for sharing! |
Improving this way of determining the retry function is part of the work on standardizing the external dependency's modules interface that is on the roadmap for hashicat (a bit out at 0.5.0 though). I've created a ticket in hashicat to track thoughts on what would be needed for the module abstraction. |
Example response for various endpoints with namespace query param against Consul OSS
Client example of requests returning 400s and hcat retrying. This client has 8 retry attempts with total wait of 12mins.
Fixes
kv.exists.get
string method to have delimiters (?
between name and params,&
between params)