[Ingest] Remove meta processor and expose templates in other processors#15415
Conversation
|
why can't this plugin use mustache via the scriptengine service? Sorry: I don't think we should have secret embedded script engines inside other plugins. I have found this before and it seriously pisses me off, we can't do this. |
|
@rmuir That is the plan. The ingest framework has been directly using mustache, because it can't directly depend on the script service. It needs to be ES agnostic. In a follow up PR, I plan to add a |
This makes no sense.
This makes no sense. Please, lets just use the scriptengineservice, and lookup "mustache", it is really just that simple. |
why? The processors themselves cannot depend on ES specific codebase. The reason for this is that we want to reuse the processors in LS. So in order to have processors use templates, we need to have some sort of a Template abstraction (I think that's what @martijnvg refers to with |
|
This does not justify forking scripting engines, sorry. It needs to go thru the script engine service. |
I wonder if that is a good excuse to yank the some of the ES code base into a library you can share. |
|
our script engine support is not something that needs to become a library, its out of the question. We do everything possible to contain their craziness. |
|
@rmuir @uboness I've updated the PR. Ingest no longer has a mustache compile time dependency and indirectly depends on the lang-mustache module. I've added a
@nik9000 Indirectly using the script service in ingest avoids granting permissions in ingest that a template engine may need. Also it has already been granted in the lang-moustache module, so no need to grant twice. |
docs/plugins/ingest.asciidoc
Outdated
There was a problem hiding this comment.
straightforward is a single word ;)
3204db4 to
26357cd
Compare
|
@javanna I've updated this PR. |
setandremoveprocessor to be able to use templates via the new infrastructure. Thefieldandvaluesettings are now templateble.metaprocessor, since any processor can now access and modify meta fields.PR for #14990