Requests do not always propagate headers/context when retrieving indexed scripts #12891
Labels
:Analytics/Aggregations
Aggregations
blocker
>bug
:Core/Infra/Scripting
Scripting abstractions, Painless, and Mustache
:Search/Search
Search-related issues that do not fall into other categories
v2.0.0-beta2
In #11060 (issue #10979), the request headers and context of the originating request were copied to all sub-requests. In doing some testing on master, I noticed that in the
ScriptService#getScriptFromIndex
the headers and context were not being copied due to the lack of aSearchContext
. To see what calls were affected, I added an assert to check if the context was null. When doing so the following tests trip the assertion:There were also two rest test failures for the Render Search Template API. For the render search template api, we need a way to pass in the headers/context in a way that isn't a search context because it is not a search request.
For the other failures, it appears that the subsequent requests happen after the SearchContext has been cleared/released.
The text was updated successfully, but these errors were encountered: