-
Notifications
You must be signed in to change notification settings - Fork 59
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
[BUG] Updated cache for the sub tree in Workbench #2351
Conversation
Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: sumukhswamy <[email protected]>
const getMappings = ( | ||
index: string, | ||
dataSourceMDSId?: string | ||
): Promise<OpenSearchDashboardsResponse> | undefined => { |
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.
return Promise or undefined? is it supposed to be Promise<OpenSearchDashboardsResponse | undefined>?
does query workbench depend on this change? Why query workbench changes need to modify Observability? Could you elaborate more in description? |
so the workbench side tree in case of flint depends on the caching mechanism from observability thats why this PR has been added to update a few conditions in the caching |
may need to update snapshots: 19 snapshots failed. |
Signed-off-by: sumukhswamy <[email protected]>
@@ -28,9 +28,9 @@ export default class DSLService { | |||
.catch((error) => console.error(error)); | |||
}; | |||
|
|||
fetchIndices = async (index: string = '') => { | |||
fetchIndices = async (index: string = '', dataSourceMDSId?: string) => { |
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.
not sure how this is handled when MDS is diabled. should we have a default value here?
dataSourceMDSId = ''
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.
have tested it, works when is the id is empty as well
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.
will update it to '' when MDS is disabled
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.
is there a place that when mds is disabled we set mds id to ''
? Or we should just handle the undefined
instead?
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.
expect(coreRefsModule.coreRefs.dslService!.fetchIndices).toHaveBeenCalledWith('testIndex'); | ||
expect(coreRefsModule.coreRefs.dslService!.fetchFields).toHaveBeenCalledWith('testIndex', ''); | ||
expect(coreRefsModule.coreRefs.dslService!.fetchSettings).toHaveBeenCalledWith('testIndex', ''); | ||
expect(coreRefsModule.coreRefs.dslService!.fetchIndices).toHaveBeenCalledWith('testIndex', ''); |
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.
May be add test cases with MDS enabled as well?
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.
okay sure
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.
test added
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.
Hi @sumukhswamy , thanks for putting this together, and here are some comments/questions.
@@ -28,9 +28,9 @@ export default class DSLService { | |||
.catch((error) => console.error(error)); | |||
}; | |||
|
|||
fetchIndices = async (index: string = '') => { | |||
fetchIndices = async (index: string = '', dataSourceMDSId?: string) => { |
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.
is there a place that when mds is disabled we set mds id to ''
? Or we should just handle the undefined
instead?
Signed-off-by: sumukhswamy <[email protected]>
* updated the flyout fix Signed-off-by: sumukhswamy <[email protected]> * updated the flyout fix Signed-off-by: sumukhswamy <[email protected]> * updated snapshots Signed-off-by: sumukhswamy <[email protected]> * Added test for accleration details flyout with MDSId Signed-off-by: sumukhswamy <[email protected]> --------- Signed-off-by: sumukhswamy <[email protected]> (cherry picked from commit 535fa86) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* updated the flyout fix * updated the flyout fix * updated snapshots * Added test for accleration details flyout with MDSId --------- (cherry picked from commit 535fa86) Signed-off-by: sumukhswamy <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Side tree flyout fix for the caching mechanism
Screen.Recording.2025-02-12.at.3.04.25.PM.mov
Issues Resolved
opensearch-project/dashboards-query-workbench#445
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.