-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: query streaming only for queryService #2015
Conversation
@@ -90,30 +90,28 @@ export const QueryEditorControls = ({ | |||
const [cancelQueryError, setCancelQueryError] = React.useState<boolean>(false); | |||
|
|||
const onStopButtonClick = React.useCallback(async () => { | |||
if (queryId) { |
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.
already have check for sendCancelQuery
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 restricts query streaming functionality to occur only when using the queryService.
- In Graph.tsx, a type guard (isValidGraphData) is introduced and memoization is used for graph data.
- In QueryEditorControls.tsx, the conditional check for queryId is removed in the stop query function.
- In QueryEditor.tsx, the streaming enabled condition is updated to also check that the query mode is set to query.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/containers/Tenant/Query/QueryResult/components/Graph/Graph.tsx | Adds a type guard and useMemo call to validate and memoize graph data. |
src/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.tsx | Removes the queryId check in the stop query callback. |
src/containers/Tenant/Query/QueryEditor/QueryEditor.tsx | Enhances streaming enablement logic to only allow streaming in query mode. |
Comments suppressed due to low confidence (1)
src/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.tsx:92
- The removal of the queryId check may lead to calling abortQuery even when queryId is not present. Please verify that the absence of queryId will not cause unintended behavior.
if (queryId) {
return <StubMessage message={i18n('description.graph-is-not-supported')} />; | ||
} | ||
|
||
return ( | ||
<div className={b('canvas-container')}> | ||
<YDBGraph key={theme} data={{links, nodes}} /> |
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.
double useEffect call in YDBGraph that was leading to clearRect error on client (caught in tests)
Closes #2011
CI Results
Test Status: ✅ PASSED
📊 Full Report
Test Changes Summary ⏭️1
⏭️ Skipped Tests (1)
Bundle Size: ✅
Current: 83.21 MB | Main: 83.21 MB
Diff: +0.43 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information