feat(compass-indexes): Running $listSearchIndexes on views requires mongodb 8.1+ COMPASS-10601#7985
Merged
JimmyChoiMDB merged 5 commits intomainfrom Apr 16, 2026
Merged
feat(compass-indexes): Running $listSearchIndexes on views requires mongodb 8.1+ COMPASS-10601#7985JimmyChoiMDB merged 5 commits intomainfrom
JimmyChoiMDB merged 5 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
isAtlasbranching 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-indexesandcompass-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.';
Contributor
There was a problem hiding this comment.
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
atlasMetadatais referenced later in this thunk (passed toshowSearchIndexStatusChangeToasts) but the local destructuring fromconnectionInfoRef.currentwas removed, leavingatlasMetadataundefined and causing a compile/runtime error. ReintroduceatlasMetadata(or passconnectionInfoRef.current.atlasMetadatadirectly).
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.';
Anemy
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
Motivation and Context
Types of changes