-
Notifications
You must be signed in to change notification settings - Fork 21
238 fix interpolation of multi variables #412
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
base: main
Are you sure you want to change the base?
238 fix interpolation of multi variables #412
Conversation
…ation and disallowed regexp variable interpolation
/build |
|
✅ Preview Build Completed!Version: 📦 Build Artifacts
|
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.
LGTM! Left a couple of minor style suggestions.
Also, I might have missed it, but please double-check that quotes are properly escaped - for example, the value ["10.71.31.18"]
should be inserted as "[\"10.71.31.18\"]"
.
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.
Overall looks good! Remove console please
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.
LGTM!
|
||
* BUGFIX: fix an issue with parsings of the logs lines when in the logs line empty `_stream` and missed `_msg` fields. See [#330](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/330) | ||
* BUGFIX: fix an issue with parsings of the logs lines when in the logs line empty `_stream` and missed `_msg` fields. See [#330](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/330). | ||
* BUGFIX: fix interpolation of multi-value query variables by mapping `filerName:$filterVar` and `filerName:$filterVar` to the `filerName:in("v1", ..., "vN")`, also supports negative operators and stream tags(`{tag = $var}` to `{tag in($var)}`). Disallow interpolation in regexp with variables (e.g., `field:~$var`). See [#238](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/238). |
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.
* BUGFIX: fix interpolation of multi-value query variables by mapping `filerName:$filterVar` and `filerName:$filterVar` to the `filerName:in("v1", ..., "vN")`, also supports negative operators and stream tags(`{tag = $var}` to `{tag in($var)}`). Disallow interpolation in regexp with variables (e.g., `field:~$var`). See [#238](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/238). | |
* BUGFIX: fix interpolation of multi-value query variables by mapping `filterName:$filterVar` and `filterName:=$filterVar` to the `filerName:in("v1", ..., "vN")`. Support negative operators and stream tags(`{tag = $var}` to `{tag in($var)}`). Disallow interpolation in regexp with variables (e.g., `field:~$var`). See [#238](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/238). |
Related issue: #238
Interpolated:
• field:$var -> field:in("v1", ..., "vN")
• field:=$var -> field:in("v1", ..., "vN")
• Values are quoted and escaped via JSON.stringify()
• "All" values expand to in(*)
• in($var) and contains_any($var) expand to quoted lists
• Values maintain proper quoting within function calls
• field:!$var -> !field in("v1", ..., "vN")
• field:!=$var -> !field in("v1", ..., "vN")
• {tag=$var} -> {tag in(...)}
• {field!=$var} -> {tag not_in(...)}
• Interpolation is NOT allowed in regexp (e.g., field:~$var)
• Invalid usage will show an error message
Added these rules to the tooltip near the query input: