-
Notifications
You must be signed in to change notification settings - Fork 228
fix(compass-indexes): fetch search indexes on refresh #7196
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
base: main
Are you sure you want to change the base?
Conversation
Instead of fetching regular indexes twice, fetch regular and search indexes once each, as was most likely the intention here.
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 fixes a bug in the compass-indexes plugin where the refresh functionality was incorrectly fetching regular indexes twice instead of fetching both regular and search indexes once each.
- Corrects duplicate
fetchRegularIndexes()
call tofetchSearchIndexes()
in the refresh handler - Ensures search indexes are properly refreshed when search indexes are supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@@ -143,7 +143,7 @@ export function activateIndexesPlugin( | |||
on(globalAppRegistry, 'refresh-data', () => { | |||
void store.dispatch(fetchRegularIndexes()); | |||
if (options.isSearchIndexesSupported) { | |||
void store.dispatch(fetchRegularIndexes()); | |||
void store.dispatch(fetchSearchIndexes()); |
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.
The fix correctly addresses the bug where regular indexes were being fetched twice instead of fetching search indexes. This ensures both regular and search indexes are properly refreshed when supported.
Copilot uses AI. Check for mistakes.
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.
Oops. That must have been my fault.
Sorry, I think enabling required checks did something weird to some of the PRs, pushed an empty commit to retrigger the CI |
Instead of fetching regular indexes twice, fetch regular and search indexes once each, as was most likely the intention here.
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes