Advanced Query Processing Architecture#4
Conversation
…7534) * Loki query splitting: interpolate queries before execution * Update tests * Prettier * shardQuerySplitting: remove unnecessary call
WalkthroughThe changes update the query preparation logic in Loki's query splitting and sharding modules. Queries now have template variables interpolated using Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Datasource
participant QuerySplitter
User->>Datasource: Submit request with targets (may include template variables)
Datasource->>QuerySplitter: Call runSplitQuery/runShardSplitQuery with request
loop For each target in request.targets
QuerySplitter->>Datasource: applyTemplateVariables(target, scopedVars, filters)
Datasource-->>QuerySplitter: Interpolated target
end
QuerySplitter->>QuerySplitter: Split/interpolate queries as needed
QuerySplitter-->>Datasource: Prepared queries
Datasource-->>User: Query results
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
yarn install v1.22.22 Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Graph Analysis (1)public/app/plugins/datasource/loki/querySplitting.test.ts (1)
🔇 Additional comments (6)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions! |
|
This pull request has been automatically closed because it has not had any further activity in the last 2 weeks. Thank you for your contributions! |
Test 4
Summary by CodeRabbit
Bug Fixes
Tests