File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22
33import type { Settings } from '@gravity-ui/react-data-table' ;
44import { isEqual } from 'lodash' ;
5+ import { StringParam , useQueryParams } from 'use-query-params' ;
56import { v4 as uuidv4 } from 'uuid' ;
67
78import SplitPane from '../../../../components/SplitPane' ;
@@ -94,10 +95,15 @@ export default function QueryEditor(props: QueryEditorProps) {
9495 const [ lastExecutedQueryText , setLastExecutedQueryText ] = React . useState < string > ( '' ) ;
9596 const [ isQueryStreamingEnabled ] = useSetting < boolean > ( ENABLE_QUERY_STREAMING ) ;
9697
98+ // Temporary check: disable streaming if backend parameter contains "oidc"
99+ const [ { backend} ] = useQueryParams ( { backend : StringParam } ) ;
100+ const isOidcBackend = backend && backend . includes ( 'oidc' ) ;
101+
97102 const isStreamingEnabled =
98103 useStreamingAvailable ( ) &&
99104 isQueryStreamingEnabled &&
100- querySettings . queryMode === QUERY_MODES . query ;
105+ querySettings . queryMode === QUERY_MODES . query &&
106+ ! isOidcBackend ;
101107
102108 const [ sendQuery ] = queryApi . useUseSendQueryMutation ( ) ;
103109 const [ streamQuery ] = queryApi . useUseStreamQueryMutation ( ) ;
Original file line number Diff line number Diff line change 11import { HelpMark , Switch } from '@gravity-ui/uikit' ;
2+ import { StringParam , useQueryParams } from 'use-query-params' ;
23
34import { cn } from '../../../../utils/cn' ;
45import { ENABLE_QUERY_STREAMING } from '../../../../utils/constants' ;
@@ -20,7 +21,13 @@ interface TimeoutLabelProps {
2021export function TimeoutLabel ( { isDisabled, isChecked, onToggle} : TimeoutLabelProps ) {
2122 const [ isQueryStreamingEnabled ] = useSetting < boolean > ( ENABLE_QUERY_STREAMING ) ;
2223
23- if ( isQueryStreamingEnabled ) {
24+ // Temporary check: disable streaming UI if backend parameter contains "oidc"
25+ const [ { backend} ] = useQueryParams ( { backend : StringParam } ) ;
26+ const isOidcBackend = backend && backend . includes ( 'oidc' ) ;
27+
28+ const shouldShowStreamingUI = isQueryStreamingEnabled && ! isOidcBackend ;
29+
30+ if ( shouldShowStreamingUI ) {
2431 return (
2532 < div className = { b ( 'switch-title' ) } >
2633 < Switch
Original file line number Diff line number Diff line change 11import React from 'react' ;
22
3+ import { StringParam , useQueryParams } from 'use-query-params' ;
4+
35import { useTracingLevelOptionAvailable } from '../../store/reducers/capabilities/hooks' ;
46import type { QuerySettings } from '../../types/store/query' ;
57import {
@@ -24,6 +26,12 @@ export const useQueryExecutionSettings = () => {
2426 const [ useShowPlanToSvg ] = useSetting < boolean > ( USE_SHOW_PLAN_SVG_KEY ) ;
2527 const [ enableQueryStreaming ] = useSetting < boolean > ( ENABLE_QUERY_STREAMING ) ;
2628
29+ // Temporary check: disable streaming behavior if backend parameter contains "oidc"
30+ const [ { backend} ] = useQueryParams ( { backend : StringParam } ) ;
31+ const isOidcBackend = backend && backend . includes ( 'oidc' ) ;
32+
33+ const effectiveStreamingEnabled = enableQueryStreaming && ! isOidcBackend ;
34+
2735 const setQueryExecutionSettings = React . useCallback (
2836 ( settings : QuerySettings ) => {
2937 setSettings ( {
@@ -39,7 +47,7 @@ export const useQueryExecutionSettings = () => {
3947 const settings : QuerySettings = {
4048 ...validatedSettings ,
4149 timeout :
42- enableQueryStreaming && validatedSettings . queryMode === QUERY_MODES . query
50+ effectiveStreamingEnabled && validatedSettings . queryMode === QUERY_MODES . query
4351 ? validatedSettings . timeout || null
4452 : validatedSettings . timeout || undefined ,
4553 statisticsMode : useShowPlanToSvg ? STATISTICS_MODES . full : validatedSettings . statisticsMode ,
You can’t perform that action at this time.
0 commit comments