-
Notifications
You must be signed in to change notification settings - Fork 17
feat: mark UI-generated queries with internal_call=true parameter #2731
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
Conversation
Co-authored-by: adameat <[email protected]>
Co-authored-by: adameat <[email protected]>
|
@copilot good job! let's remove this internal_call parameter for preview - it doesn't sound like an internal call to me. |
Co-authored-by: adameat <[email protected]>
Done! Removed the |
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 PR adds the
internal_call=trueparameter to/viewer/queryrequests for UI-generated queries to distinguish them from user-executed queries.Problem
The backend needed a way to identify which query requests were generated internally by the UI (for fetching system data, statistics, etc.) versus queries executed by users through the query editor. This distinction is important for monitoring, logging, and resource management purposes.
Solution
Added an optional
internal_callboolean parameter to theSendQueryParamsinterface and updated all appropriate UI-generated query calls to includeinternal_call: true.Changes
Type System
internal_call?: booleantoSendQueryParams<Action>interfaceStreamQueryParamsthrough extensionUI-Generated Queries (with
internal_call: true)Updated 8 internal query locations across the codebase:
executeTopQueries.ts) - System query monitoringcancelQuery.ts) - Administrative operationscluster.ts) - System metrics collectionshardsWorkload.ts) - Performance monitoringexecuteTopTables.ts) - Dashboard datatenantOverviewTopShards.ts) - System analyticsviewSchema.ts) - Metadata queriesUser-Initiated Queries (without
internal_call)The following queries do not include the
internal_callparameter as they are user-initiated:sendQueryand streamingstreamQuery)preview.ts) - User-initiated table data viewingValidation
Fixes #2730.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 85.37 MB | Main: 85.37 MB
Diff: +0.68 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information