-
Notifications
You must be signed in to change notification settings - Fork 188
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
[BUG] Heathcheck timeout parameter not parsable #387
Comments
I can see that the 'request_timeout' parameter can be used to get around this issue. I'm not sure if that's recommended practice or if this bug needs fixing. |
This problem emerges from where the client encodes URL parameters as strings, which causes a validation error for the timeout parameter further down the stack. I will open a PR that resolves the problem. I'll write a test too. I hope you will consider merging it. |
When the "timeout" parameter is escaped and turned into a string, it does not pass validation checks. This PR ensures that timeout is passed through as-is, just like "request_timeout". There's no explicit test for this parameter, but I included it on some existing tests just to ensure that the code is exercised. Without the fix in place, one of the tests as modified will not pass. Signed-off-by: Charles Greer <cgreer@lexmachina.com>
* [#387] Do not escape the "timeout" parameter. When the "timeout" parameter is escaped and turned into a string, it does not pass validation checks. This PR ensures that timeout is passed through as-is, just like "request_timeout". There's no explicit test for this parameter, but I included it on some existing tests just to ensure that the code is exercised. Without the fix in place, one of the tests as modified will not pass. Signed-off-by: Charles Greer <cgreer@lexmachina.com> * Unit test for timeout parameter Revert original test modifications. Signed-off-by: Charles Greer <cgreer@lexmachina.com> * Extend test and linter Signed-off-by: Charles Greer <cgreer@lexmachina.com> --------- Signed-off-by: Charles Greer <cgreer@lexmachina.com>
What is the bug?
the OpenSearch client cannot change the default timeout for health checks.
The cluster endpoint for healthcheck requires a string representing time units:
It fails if you supply an integer or float.
However, the client call requires a numeric value and fails with a time unit string
How can one reproduce the bug?
Steps to reproduce the behavior.
What is the expected behavior?
As with previous versions of elasticsearch client, I expect "timeout="4s" to work properly
What is your host/environment?
Operating system, version.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: