-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Referencing stored scripts by id does not work inside watcher actions #40212
Labels
Comments
Pinging @elastic/es-core-features |
spinscale
added a commit
to spinscale/elasticsearch
that referenced
this issue
Mar 12, 2020
The watcher TextTemplateEngine uses a fast path mechanism where it checks for the existence of `{{` to decide if a mustache scripts required compilation. This does not work for stored script, as the field that is checked contains the id of the script, which means, the name of the script is returned as its value. This commit checks for the script type and does not involve this fast path check if a stored script is used. Closes elastic#40212
spinscale
added a commit
that referenced
this issue
Mar 16, 2020
The watcher TextTemplateEngine uses a fast path mechanism where it checks for the existence of `{{` to decide if a mustache script required compilation. This does not work for stored script, as the field that is checked contains the id of the script, which means, the name of the script is returned as its value. This commit checks for the script type and does not involve this fast path check if a stored script is used. Closes #40212
spinscale
added a commit
that referenced
this issue
Mar 16, 2020
The watcher TextTemplateEngine uses a fast path mechanism where it checks for the existence of `{{` to decide if a mustache script required compilation. This does not work for stored script, as the field that is checked contains the id of the script, which means, the name of the script is returned as its value. This commit checks for the script type and does not involve this fast path check if a stored script is used. Closes #40212
spinscale
added a commit
that referenced
this issue
Mar 16, 2020
The watcher TextTemplateEngine uses a fast path mechanism where it checks for the existence of `{{` to decide if a mustache script required compilation. This does not work for stored script, as the field that is checked contains the id of the script, which means, the name of the script is returned as its value. This commit checks for the script type and does not involve this fast path check if a stored script is used. Closes #40212
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Elasticsearch version (
bin/elasticsearch --version
): 6.5.0Plugins installed: none
JVM version (
java -version
):java version "11" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11+28)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)
Description of the problem including expected versus actual behavior:
Referencing stored scripts by id does not work inside watcher actions.
Steps to reproduce:
In logs you will see:
instead of:
This is also reproducible for other actions, such as e-mail.
The issue is not repoducible in Elasticsearch version 6.4.
The cause of the issue is most likely the following PR #33978.
In particular, this fast path triggers
which treats
log-action
as a template.The text was updated successfully, but these errors were encountered: