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

No way to escape variables in transpiler parsing #2177

Closed
blakerouse opened this issue Jan 25, 2023 · 3 comments · Fixed by #5035 or elastic/ingest-docs#1151
Closed

No way to escape variables in transpiler parsing #2177

blakerouse opened this issue Jan 25, 2023 · 3 comments · Fixed by #5035 or elastic/ingest-docs#1151
Assignees
Labels
8.8-candidate bug Something isn't working Team:Elastic-Agent Label for the Agent team

Comments

@blakerouse
Copy link
Contributor

There is no easy way to provide a raw ${var} to a computed unit configuration. At the moment the transpiler will determine that to be a variable and try to replace it, which could be something that the unit configuration would not want.

We should support the usage of $${var}, where the transpiler just ignores it and removes the initial $ resulting in the unit configuration get the constant value of ${var}.

At the moment the workaround is to use the pipe | to work around this and provide a default.

${vars|'$vars'}

This is not a great user experience and also has an issue where vars must also not exist or it will do the wrong thing.

For confirmed bugs, please report:

  • Version: 8.6.0
  • Operating System: All
@cmacknz cmacknz reopened this Jul 3, 2024
@ycombinator
Copy link
Contributor

@blakerouse
Copy link
Contributor Author

PR for docs is here - elastic/ingest-docs#1151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.8-candidate bug Something isn't working Team:Elastic-Agent Label for the Agent team
Projects
None yet
4 participants