-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Remove escaping numeric value in agent template #114123
[Fleet] Remove escaping numeric value in agent template #114123
Conversation
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, since we're mostly just removing code and allowing for the !!str
escape hatch. 🚀
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: cc @nchaulet |
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Summary
Resolve #112896
Context
To go from a package policy to the agent policy as it's going to be send to the agent we used YAML handlebar template defined in the package where we inject variables configured by the user, to be able to handle most of the case we have some custom logic on how we populate this template.
Description
We introduced escaping the text variable, if it's a numerical value when we compile the agent template, this seems to be problematic as it does not allow string interpolation.
That PR remove that, for the integration that really need the yaml to be string, I think the best solution will be to use the
!!str
keyword in the agent template.@elastic/integrations I would love to have your thoughts on that as it is a breaking change, from what I know the only integration impacted by that will be
osquery
but they already stopped to use agent template for 7.16.0.