-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced Query Processing Architecture #2
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: query-splitting-baseline
Are you sure you want to change the base?
Conversation
…7534) * Loki query splitting: interpolate queries before execution * Update tests * Prettier * shardQuerySplitting: remove unnecessary call
Codoki PR ReviewSummary: Fix interpolation-filter order, prevent empty expr leaks Issues (Critical & High only)
Showing top 2 issues. Critical: 0, High: 2. See inline suggestions for more. Key Feedback (click to expand)
Confidence: 3/5 — Needs work before merge (2 high · status: Requires changes) React with 👍 or 👎 if you found this review useful. |
| options: QuerySplittingOptions = {} | ||
| ) { | ||
| const queries = request.targets.filter((query) => !query.hide).filter((query) => query.expr); | ||
| const queries = request.targets |
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.
| const queries = request.targets | |
| ```suggestion | |
| const queries = request.targets | |
| .filter((query) => !query.hide) | |
| .map((query) => datasource.applyTemplateVariables(query, request.scopedVars, request.filters)) | |
| .filter((query) => query.expr); |
| .filter((query) => query.expr) | ||
| .filter((query) => !query.hide); | ||
| .filter((query) => !query.hide) | ||
| .map((query) => datasource.applyTemplateVariables(query, request.scopedVars, request.filters)); |
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.
| .map((query) => datasource.applyTemplateVariables(query, request.scopedVars, request.filters)); | |
| ```suggestion | |
| const queries = request.targets | |
| .filter((query) => !query.hide) | |
| .map((query) => datasource.applyTemplateVariables(query, request.scopedVars, request.filters)) | |
| .filter((query) => query.expr); |
This PR refactors the query splitting architecture in Grafana’s Loki datasource, standardizing how template variables are interpolated and processed.
Key changes: