Skip to content

fix(compass-aggregations): remove static whitelist for search stage errors COMPASS-10449#8241

Open
pavithrachidambaram-afk wants to merge 1 commit into
mainfrom
COMPASS-10449
Open

fix(compass-aggregations): remove static whitelist for search stage errors COMPASS-10449#8241
pavithrachidambaram-afk wants to merge 1 commit into
mainfrom
COMPASS-10449

Conversation

@pavithrachidambaram-afk

@pavithrachidambaram-afk pavithrachidambaram-afk commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Description

Changes how the $search server error banner (ServerErrorBanner) decides between showing an "Edit Search Index" link and a "Debug" button — an error categorized as an index definition issue could show the link in normal view but only the Debug button in fullscreen/focus mode. Ties to the Phase 3 TODO in COMPASS-10449 to replace the whitelist with assistant-based categorization.

  • Phase 1: unchanged — still relies on the static whitelist (isSearchIndexDefinitionError) to decide between the "Edit Search Index" link and the Debug button, including the existing mode-dependent quirk
  • Phase 2: always shows the Debug button — showEditSearchIndexLink is now additionally gated on !enableSearchActivationProgramP2, so no whitelist reliance and no mode-dependent link
  • This is part 1 of the COMPASS-10449 TODO; a follow-up will evaluate how to handle Phase 1 once that experiment retires
  • Test infra: generalized the shared wrapWithExperimentProvider test helper to accept a per-experiment variant map, so a test can assign a user to multiple experiments (e.g. both Phase 1 and Phase 2) at once instead of only a single shared variant

Before:

Screenshot 2026-07-15 at 4 44 57 PM

Now (only for Phase 2, Phase 1 will be unchanged):
Screenshot 2026-07-15 at 4 46 19 PM

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

Open Questions

None.

Dependents

None.

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)

@github-actions github-actions Bot added the fix label Jul 15, 2026
@pavithrachidambaram-afk pavithrachidambaram-afk added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label Jul 15, 2026
@pavithrachidambaram-afk
pavithrachidambaram-afk marked this pull request as ready for review July 15, 2026 20:48
@pavithrachidambaram-afk
pavithrachidambaram-afk requested a review from a team as a code owner July 15, 2026 20:48
…hase 2 search stage errors COMPASS-10449

Phase 1 keeps its existing whitelist-driven "Edit Search Index" link
unchanged. For Phase 2, bypass the static regex whitelist entirely and
always show the "Debug" button instead, so the assistant handles
diagnosis rather than depending on an unsustainable list of error
patterns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants