Add templating support to pipeline processor.#49030
Add templating support to pipeline processor.#49030martijnvg merged 8 commits intoelastic:masterfrom
Conversation
This commit adds templating support to the pipeline processor's `name` option. Closes elastic#39955
|
Pinging @elastic/es-core-features (:Core/Features/Ingest) |
andreidan
left a comment
There was a problem hiding this comment.
This is great @martijnvg
Left a few minor suggestions and a question on the docs
| |====== | ||
| | Name | Required | Default | Description | ||
| | `name` | yes | - | The name of the pipeline to execute | ||
| | `name` | yes | - | The name of the pipeline to execute. Supports <<accessing-template-fields,template snippets>>. |
There was a problem hiding this comment.
have these links changed? accessing-template-fields points to common-options and template snippets to the accessing template fields paragraph on the pipeline.asciidoc page but there isn't such a paragraph
There was a problem hiding this comment.
I did a direct copy from the set processor docs page and that links correctly. So I think it is good?
There was a problem hiding this comment.
Ah right, might be the github navigation that's not able to follow the links correctly.
|
|
||
| private final String pipelineName; | ||
|
|
||
| private final TemplateScript.Factory pipelineName; |
There was a problem hiding this comment.
would it make sense to rename this to something that points it to the templating aspect? (eg. pipelineTemplate ?) it's a bit confusing otherwise below when we render the template and yield a pipelineName from another pipelineName
| } | ||
|
|
||
| String getPipelineName() { | ||
| TemplateScript.Factory getPipelineName() { |
There was a problem hiding this comment.
I think it would avoid a bit of confusion if the getter is renamed to getPipelineNameTemplate or something along those lines (it took me a while to understand we are not instantiating a name here 91d8ada#diff-579dffc1e22e3db13c41f685046b2891R443)
andreidan
left a comment
There was a problem hiding this comment.
LGTM nicely done @martijnvg
This commit adds templating support to the pipeline processor's `name` option. Closes elastic#39955
This commit adds templating support to the pipeline processor's
nameoption.Closes #39955