Skip to content
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

[alerts] investigate usage of handlebars instead of mustache #84218

Closed
pmuellr opened this issue Nov 24, 2020 · 3 comments
Closed

[alerts] investigate usage of handlebars instead of mustache #84218

pmuellr opened this issue Nov 24, 2020 · 3 comments
Labels
discuss estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Alerting/RuleActions Issues related to the Actions attached to Rules on the Alerting Framework Feature:Alerting R&D Research and development ticket (not meant to produce code, but to make a decision) Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@pmuellr
Copy link
Member

pmuellr commented Nov 24, 2020

For alerting, we currently use mustache as our templating library to render strings with variables from the alert execution. We've wondered about switching to handlebars instead, and this issue is to discuss/research that.

Handlebars is basically mustache++. One significant issue we'd have to deal with is whether all our existing customer's templates would still work.

Beyond that, I did just a bit of peeking at handlebars for issue #79371 (comment) , and noted both the complexity issues (on the customer's end) and security concerns. I remember coming away from the investigation feeling that handlebars is very much aimed at providing developers a richer experience than mustache, which it certainly does. But we're not targetting developers - ideally it would be nice to have something in-between mustache and handlebars - a little more function, but not so much that the result is a new programming language.

What led us looking at handlebars again is being able to provide ease-of-use functions for use in a template. And the fact that Dashboard URL templating uses handlebars.

@pmuellr pmuellr added discuss Feature:Alerting R&D Research and development ticket (not meant to produce code, but to make a decision) Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Nov 24, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@mikecote
Copy link
Contributor

Here is the link to a prior conversation about using mustache instead of handlebars: #37043 (comment).

@gmmorris gmmorris added Feature:Actions Feature:Actions/Framework Issues related to the Actions Framework Feature:Alerting Feature:Alerting/RuleActions Issues related to the Actions attached to Rules on the Alerting Framework and removed Feature:Alerting Feature:Actions Feature:Actions/Framework Issues related to the Actions Framework labels Jul 1, 2021
@gmmorris gmmorris added the loe:needs-research This issue requires some research before it can be worked on or estimated label Jul 14, 2021
@gmmorris gmmorris added the estimate:needs-research Estimated as too large and requires research to break down into workable issues label Aug 18, 2021
@gmmorris gmmorris removed the loe:needs-research This issue requires some research before it can be worked on or estimated label Sep 2, 2021
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
@pmuellr
Copy link
Member Author

pmuellr commented Oct 12, 2023

Some work was done in this PR to investigate: #146487

Handlebars didn't make it that much easier to add extension functions, and has two big downsides:

  • users would have to opt-in to use it instead of Mustache
  • the templating can actually get more complex with more error possibilities when using the "piping" capabilities

So, for now, this doesn't look like it's going to add useful value to customers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Alerting/RuleActions Issues related to the Actions attached to Rules on the Alerting Framework Feature:Alerting R&D Research and development ticket (not meant to produce code, but to make a decision) Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

No branches or pull requests

5 participants