Skip to content

Conversation

@addaleax
Copy link
Collaborator

Instead of fetching regular indexes twice, fetch regular and search indexes once each, as was most likely the intention here.

Description

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

Instead of fetching regular indexes twice, fetch regular and search indexes
once each, as was most likely the intention here.
Copilot AI review requested due to automatic review settings August 13, 2025 19:54
@addaleax addaleax requested a review from a team as a code owner August 13, 2025 19:54
@github-actions github-actions bot added the fix label Aug 13, 2025
Copy link
Contributor

Copilot AI left a 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 to fetchSearchIndexes() 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.

void store.dispatch(fetchRegularIndexes());
if (options.isSearchIndexesSupported) {
void store.dispatch(fetchRegularIndexes());
void store.dispatch(fetchSearchIndexes());
Copy link

Copilot AI Aug 13, 2025

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.
Copy link
Contributor

@lerouxb lerouxb left a 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.

@gribnoysup gribnoysup added no release notes Fix or feature not for release notes no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) and removed no release notes Fix or feature not for release notes labels Aug 15, 2025
@gribnoysup
Copy link
Collaborator

Sorry, I think enabling required checks did something weird to some of the PRs, pushed an empty commit to retrigger the CI

@gribnoysup gribnoysup merged commit 3989d67 into main Aug 18, 2025
54 of 58 checks passed
@gribnoysup gribnoysup deleted the fetch-search-indexes-on-refresh branch August 18, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants