-
Notifications
You must be signed in to change notification settings - Fork 15
fix: disable streaming by default for some clusters #2566
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
bugbot run |
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.
Pull Request Overview
This PR customizes the default query streaming setting based on cluster backend, disabling streaming for legacy clusters.
- Introduced
useQueryStreamingSetting
hook to pick the right toggle key per cluster - Updated settings, services, and components (QueryExecution, TimeoutLabel, QueryEditor) to use the new hook
- Added constants, default values, and UI logic (
applyClusterSpecificQueryStreamingSetting
,NavigationWrapper
) for cluster-specific behavior
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/utils/hooks/useQueryStreamingSetting.ts | New hook that chooses streaming setting key based on cluster name |
src/utils/hooks/useQueryExecutionSettings.ts | Switched to use useQueryStreamingSetting instead of raw useSetting |
src/utils/hooks/index.ts | Exported newly created useQueryStreamingSetting |
src/utils/constants.ts | Added SETTING_KEYS , OLD_BACKEND_CLUSTER_NAMES , and key mappings |
src/services/settings.ts | Set default streaming disabled for old-backend clusters |
src/containers/UserSettings/settings.tsx | Added UI definition and applyClusterSpecificQueryStreamingSetting |
src/containers/Tenant/Query/QuerySettingsDialog/TimeoutLabel.tsx | Updated to use useQueryStreamingSetting |
src/containers/Tenant/Query/QueryEditor/QueryEditor.tsx | Updated to use useQueryStreamingSetting |
src/containers/App/NavigationWrapper.tsx | New wrapper applying cluster-specific settings |
src/containers/App/App.tsx | Replaced Navigation with NavigationWrapper |
Comments suppressed due to low confidence (4)
src/containers/UserSettings/settings.tsx:154
- [nitpick] Accessing the experiments section by a hard-coded index is brittle. Consider finding the section by its
id
(e.g.,section.id === SECTION_IDS.EXPERIMENTS
) to guard against future reordering.
const isOldBackendCluster = clusterName && OLD_BACKEND_CLUSTER_NAMES.includes(clusterName);
src/utils/hooks/useQueryStreamingSetting.ts:10
- This new hook isn’t covered by unit tests. Add tests to verify it selects the correct setting key and default value for both old-backend and standard clusters.
export const useQueryStreamingSetting = (): [boolean, (value: boolean) => void] => {
src/containers/UserSettings/settings.tsx:150
- The
applyClusterSpecificQueryStreamingSetting
function is new and lacks tests. Consider adding unit tests to ensure settings are correctly overridden based onclusterName
.
export function applyClusterSpecificQueryStreamingSetting(
src/utils/hooks/useQueryStreamingSetting.ts:1
- [nitpick] Add a JSDoc comment above
useQueryStreamingSetting
to describe its behavior, return values, and how it chooses keys based on cluster names.
import {
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.
✅ BugBot reviewed your changes and found no bugs!
BugBot free trial expires on July 22, 2025
Learn more in the Cursor dashboard.
Was this report helpful? Give feedback by reacting with 👍 or 👎
Closes #2565
Stand
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: 🔺
Current: 85.12 MB | Main: 85.11 MB
Diff: +0.01 MB (0.02%)
ℹ️ CI Information