Skip to content

feat(compass-indexes): Running $listSearchIndexes on views requires mongodb 8.1+ COMPASS-10601#7985

Merged
JimmyChoiMDB merged 5 commits intomainfrom
COMPASS-10601
Apr 16, 2026
Merged

feat(compass-indexes): Running $listSearchIndexes on views requires mongodb 8.1+ COMPASS-10601#7985
JimmyChoiMDB merged 5 commits intomainfrom
COMPASS-10601

Conversation

@JimmyChoiMDB
Copy link
Copy Markdown
Collaborator

@JimmyChoiMDB JimmyChoiMDB commented Apr 15, 2026

Description

  • Previously, for search compatibility for views we were checking 8.1+ for Compass and 8.0+ for DE
  • But $listSearchIndexes which is required to fetch search indexes requires 8.1+
  • So we remove the Compass/DE distinction and instead check for 8.1+ always

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
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

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)

@JimmyChoiMDB JimmyChoiMDB added feature flagged PRs labeled with this label will not be included in the release notes of the next release feat labels Apr 15, 2026
Copilot AI review requested due to automatic review settings April 15, 2026 23:01
Copy link
Copy Markdown
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

Aligns view search-index compatibility checks with the server requirement that $listSearchIndexes on views needs MongoDB 8.1+, removing the prior Atlas/Data Explorer vs Compass version split.

Changes:

  • Removes isAtlas branching from view-search compatibility selectors and read/write access logic, enforcing 8.1+ consistently.
  • Updates UI call sites and banners to reflect the unified minimum version requirement.
  • Adjusts and simplifies related test coverage across compass-indexes and compass-aggregations.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/compass-indexes/src/utils/is-view-search-compatible.ts Drops isAtlas input and uses a single compatibility check.
packages/compass-indexes/src/utils/is-view-search-compatible.spec.ts Updates tests to reflect unified 8.1+ requirement.
packages/compass-indexes/src/utils/indexes-read-write-access.ts Removes isAtlas from selector inputs and downstream compatibility evaluation.
packages/compass-indexes/src/utils/indexes-read-write-access.spec.ts Updates tests for unified 8.1+ behavior and removes Atlas-specific setup.
packages/compass-indexes/src/modules/search-indexes.ts Stops deriving/passing isAtlas into read/write access gating for search indexes.
packages/compass-indexes/src/modules/regular-indexes.ts Stops deriving/passing isAtlas into read/write access gating for regular indexes.
packages/compass-indexes/src/components/view-incompatible-components/view-version-incompatible-banner.tsx Updates banner copy to state 8.1+ minimum.
packages/compass-indexes/src/components/search-indexes-table/search-indexes-table.tsx Removes isAtlas plumbing; uses unified selectors.
packages/compass-indexes/src/components/search-indexes-table/search-indexes-drawer-table.tsx Removes Atlas connection dependency from access gating.
packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.tsx Removes Atlas connection dependency from access gating.
packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-drawer-table.tsx Removes Atlas connection dependency from access gating.
packages/compass-indexes/src/components/indexes/indexes.tsx Uses unified view-search compatibility selector and updated access selector.
packages/compass-indexes/src/components/indexes/indexes.spec.tsx Updates expectations/cases to match 8.1+ minimum.
packages/compass-indexes/src/components/indexes-toolbar/indexes-toolbar.spec.tsx Updates test wording to reflect unified behavior.
packages/compass-indexes/src/components/drawer-views/indexes-list-drawer-view.tsx Removes isAtlas plumbing; uses unified selectors.
packages/compass-indexes/src/components/drawer-views/edit-search-index-drawer-view.tsx Removes Atlas-specific isAtlas usage in access gating.
packages/compass-indexes/src/components/drawer-views/create-search-index-drawer-view.tsx Removes Atlas-specific isAtlas usage in access gating.
packages/compass-aggregations/src/components/pipeline/pipeline.tsx Aligns view-search compatibility gating in pipeline polling to 8.1+ check.
packages/compass-aggregations/src/components/pipeline/pipeline.spec.tsx Simplifies tests by removing Atlas vs non-Atlas distinction.
Comments suppressed due to low confidence (1)

packages/compass-indexes/src/components/view-incompatible-components/view-version-incompatible-banner.tsx:33

  • This inline comment appears outdated after removing the Compass/Atlas version distinction (there is no longer a separate min version for Data Explorer). Please update or remove the comment so it doesn’t refer to the old DE/Compass compatibility logic.
  // if compass version matches min compatibility for DE, we recommend Atlas UI as well
  const recommendedCta = isAtlas
    ? 'Upgrade your cluster or manage search indexes on views in the Atlas UI.'
    : 'Upgrade your cluster to create search indexes on views.';

Comment thread packages/compass-aggregations/src/components/pipeline/pipeline.tsx
Comment thread packages/compass-indexes/src/utils/is-view-search-compatible.ts Outdated
Comment thread packages/compass-indexes/src/utils/indexes-read-write-access.ts
Copy link
Copy Markdown
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

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

packages/compass-indexes/src/modules/search-indexes.ts:653

  • atlasMetadata is referenced later in this thunk (passed to showSearchIndexStatusChangeToasts) but the local destructuring from connectionInfoRef.current was removed, leaving atlasMetadata undefined and causing a compile/runtime error. Reintroduce atlasMetadata (or pass connectionInfoRef.current.atlasMetadata directly).
    const {
      readOnly,
      readWrite,
      enableAtlasSearchIndexes,
      enableSearchActivationProgramP1,
    } = preferences.getPreferences();
    const { isSearchIndexesReadable } = selectReadWriteAccess({
      readOnly,
      readWrite,
      enableAtlasSearchIndexes,
    })(getState());

packages/compass-indexes/src/components/view-incompatible-components/view-version-incompatible-banner.tsx:33

  • The inline comment about Compass vs Data Explorer min compatibility is now outdated (the code/message has been unified to 8.1+). Please update or remove this comment so it doesn’t suggest a distinction that no longer exists.
  // if compass version matches min compatibility for DE, we recommend Atlas UI as well
  const recommendedCta = isAtlas
    ? 'Upgrade your cluster or manage search indexes on views in the Atlas UI.'
    : 'Upgrade your cluster to create search indexes on views.';

@JimmyChoiMDB JimmyChoiMDB marked this pull request as ready for review April 16, 2026 17:04
@JimmyChoiMDB JimmyChoiMDB requested a review from a team as a code owner April 16, 2026 17:04
@JimmyChoiMDB JimmyChoiMDB merged commit 627a4ac into main Apr 16, 2026
29 of 32 checks passed
@JimmyChoiMDB JimmyChoiMDB deleted the COMPASS-10601 branch April 16, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat feature flagged PRs labeled with this label will not be included in the release notes of the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants