-
Notifications
You must be signed in to change notification settings - Fork 58
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] Unconsumed params error message hides Extension REST request timeouts #587
Comments
Hi @dbwiddis , I would like to take this up next once i merge my current one Thanks |
Great, @varuntumbe ... assigning it to you. |
Hi @dbwiddis , I will start working on this from tomorrow. I was busy for a couple of days Thanks |
Hi @dbwiddis , Apologies for the delay, I was busy last week as well. I started looking at the issue, so far what I have understood is
Can you once confirm whether I am on the right track or not ? I will try to repro this.. this is what I could understand by looking at the code briefly Thanks and Regards |
Correct. Even if we have consumed all the params, in the case of a timeout SDK never gives that information to OpenSearch. There is code to process those consumed params from the extension and "consume" them on the OpenSearch side to match, but in the case of an exception, it doesn't run. So the fix is in the exception branch, just consume all the params. |
Hi @varuntumbe are you still working on this? |
Hi @dbwiddis , Sorry for the delayed reply. I could not complete this one, I could not spent time on it as i got extremely busy at office work. Please reassign it to someone else. I will reach out to if I get some free time. Thanks and Regards |
What is the bug?
When an extension REST request times out or otherwise fails in transport, the error returned to the user is blocked by unconsumed parameters, hiding the timeout failure.
How can one reproduce the bug?
What is the expected behavior?
The actual exception causing the failure; in this case a timeout.
Do you have any additional context?
Parameters are normally consumed via
param()
on the request. In an extension environment, we relay back the consumed parameters as a list and manuallyparam()
them again in theonResponse()
portion of RestSendToExtensionAction, see here:https://github.com/opensearch-project/OpenSearch/blob/5f8193021215cd6979fde66474ec8d74d32ac91a/server/src/main/java/org/opensearch/extensions/rest/RestSendToExtensionAction.java#L145
However in the case of an exception, this is not done (because we don't have access to the request) and we don't really know the truth about it.
We could probably just consume all the params in the original request anyway.
For background, this is the commit that put this check in, it was intended to provide a "did you mean" helpful result to users who made typos: opensearch-project/OpenSearch@9a83ded
The text was updated successfully, but these errors were encountered: