Skip to content

Fix external-cluster search IT failures (external-mode + shared-cluster)#30091

Merged
mohityadav766 merged 2 commits into
mainfrom
fix/external-cluster-search-it
Jul 16, 2026
Merged

Fix external-cluster search IT failures (external-mode + shared-cluster)#30091
mohityadav766 merged 2 commits into
mainfrom
fix/external-cluster-search-it

Conversation

@mohityadav766

@mohityadav766 mohityadav766 commented Jul 15, 2026

Copy link
Copy Markdown
Member

Describe your changes:

Fixes the four failing suites in the nightly Java Integration Tests (External Cluster) workflow, which runs the search/UI integration tests against an already-running cluster (no in-JVM server).

  • ServiceDeleteSearchCleanupScaleIT NPE'd at index-name resolution because it used the in-JVM Entity.getSearchRepository(), which is null in external mode. It now resolves indexes via IndexAliasInspector.indexNameFor(Entity.TABLE / Entity.TABLE_COLUMN) (the external-safe passthrough every sibling test uses) and deletes the service through the UI's async endpoint (DELETE /databaseServices/async/{id}) instead of the blocking synchronous delete, which can exceed a proxied cluster's gateway timeout at 100k tables.
  • SearchRelevancyPreviewIT and SelectiveFieldReindexUIIT asserted exact global hit counts (hasSize(4), filter-count == 1). On the shared cluster a concurrent run's table shares the same RUN_ID ngram prefix and fuzzy-matches the marker, inflating the count. They now assert the seeded entities are present (containsAll(ids) / firstResultByName), which still catches the real regression while ignoring foreign fuzzy hits.
  • IncidentManagerPage.selectPageSize50 now settle-and-retries the page-size dropdown, which the post-reindex list refetch can unmount mid-click (Ant panel collapse → "html intercepts pointer events").

Not addressed here: NoDuplicatesDuringReindexIT is failing on a genuine product bug (reindex swaps the read alias to a staged index before _refreshing it), tracked separately.

Type of change:

  • Bug fix

Tests:

Use cases covered

  • External-cluster runs (no in-JVM SearchRepository) of the search + UI integration suites, and shared-cluster isolation for the fuzzy-search assertions.

Backend integration tests

  • Updated: ServiceDeleteSearchCleanupScaleIT, SearchRelevancyPreviewIT

Playwright (UI) tests

  • Updated: SelectiveFieldReindexUIIT, IncidentManagerPage (page object)

Manual testing performed

  1. mvn -o -pl openmetadata-integration-tests test-compile — the four changed files compile (only pre-existing stale-local-~/.m2 errors in unrelated files remain).
  2. mvn spotless:apply — clean, no formatting diff.

UI screen recording / screenshots:

Not applicable — test-only changes.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests (integration / Playwright as applicable) and listed them above.

🤖 Generated with Claude Code

Greptile Summary

This PR fixes external-cluster and shared-cluster integration test failures. The main changes are:

  • Uses external-safe index resolution and asynchronous service deletion.
  • Checks seeded search entities instead of exact global fuzzy-match counts.
  • Retries page-size selection when the incident list refresh unmounts the dropdown.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the updated code.

Important Files Changed

Filename Overview
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/search/SearchRelevancyPreviewIT.java Tracks seeded table IDs and checks that the wide preview contains the seeded cohort.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/search/scale/ServiceDeleteSearchCleanupScaleIT.java Resolves external-cluster index aliases and uses asynchronous recursive service deletion.
openmetadata-integration-tests/src/test/java/org/openmetadata/playwright/scenarios/search/reindex/SelectiveFieldReindexUIIT.java Checks seeded table and worksheet presence without requiring exact shared-cluster result counts.
openmetadata-integration-tests/src/test/java/org/openmetadata/playwright/ui/pages/IncidentManagerPage.java Retries the page-size selection until the incident list reloads with a limit of 50.

Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/external-cl..." | Re-trigger Greptile

Context used (3)

  • Context used - CLAUDE.md (source)
  • Context used - openmetadata-ui-core-components/CLAUDE.md (source)
  • Context used - AGENTS.md (source)

…shared-cluster assertions, page-size flake)

- ServiceDeleteSearchCleanupScaleIT: resolve indexes via IndexAliasInspector —
  Entity.getSearchRepository() is null in external mode — and delete the service
  through the UI's async endpoint instead of the blocking synchronous delete.
- SearchRelevancyPreviewIT: assert the seeded ids are present rather than an exact
  hit count that a concurrent run's ngram-colliding table inflates.
- SelectiveFieldReindexUIIT: assert the seeded entity surfaces by name instead of
  an == 1 global Explore filter-count.
- IncidentManagerPage: settle-and-retry the page-size dropdown, which the
  post-reindex list refetch can unmount mid-click.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 15, 2026 12:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (33 flaky)

✅ 4542 passed · ❌ 0 failed · 🟡 33 flaky · ⏭️ 95 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 439 0 5 16
✅ Shard 2 11 0 0 0
🟡 Shard 3 819 0 13 8
🟡 Shard 4 819 0 3 18
🟡 Shard 5 838 0 4 5
🟡 Shard 6 787 0 1 46
🟡 Shard 7 829 0 7 2
🟡 33 flaky test(s) (passed on retry)
  • Features/Glossary/GlossaryPagination.spec.ts › should check for nested glossary term search (shard 1, 1 retry)
  • Flow/TestConnectionModal.spec.ts › Edit Connection click dismisses the modal (shard 1, 1 retry)
  • Pages/AISettings.spec.ts › persists MCP Chat configuration after save (shard 1, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: metric (shard 1, 1 retry)
  • Pages/SearchSettings.spec.ts › Latest preview config wins when a superseded request resolves late (shard 1, 1 retry)
  • Features/BulkEditOperationBadges.spec.ts › Database service bulk edit search filters rows and clear restores them (shard 3, 1 retry)
  • Features/BulkImportWithDotInName.spec.ts › Full import cycle with dot in service name (shard 3, 1 retry)
  • Features/BulkImportWithDotInName.spec.ts › Bulk edit existing entity with dot in service name (shard 3, 1 retry)
  • Features/ContextCenterArchive.spec.ts › archive page lazy-loads more rows on scroll within its own scroll container (shard 3, 1 retry)
  • Features/ContextCenterArticles.spec.ts › Article listing search filters, clears, and shows empty state (shard 3, 1 retry)
  • Features/ContextCenterArticles.spec.ts › Article list cards, recently viewed widget, and pagination work (shard 3, 1 retry)
  • Features/ContextCenterArticles.spec.ts › description: switching articles does not bleed unsaved content into next article (shard 3, 1 retry)
  • Features/ContextCenterMemories.spec.ts › editing memory content updates the memory (shard 3, 1 retry)
  • Features/ContextCenterMemories.spec.ts › Shared memory shows the shared-with-specific-people description (shard 3, 1 retry)
  • Features/ContextCenterMemories.spec.ts › ArrowDown + Enter keyboard navigation selects the linked table result (shard 3, 1 retry)
  • Features/ContextCenterPermission.spec.ts › user with view-only permission cannot see restore or delete actions on an archived document (shard 3, 1 retry)
  • Features/ContextCenterPermission.spec.ts › a document archived by a different user can be permanently deleted, via the UI, by a user with Delete permission (shard 3, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should cancel drag and drop operation (shard 3, 1 retry)
  • Features/Glossary/GlossaryTermRelationsGraphNested.spec.ts › viewing a child term: parent appears as a 1-hop neighbour via parentOf edge (shard 4, 1 retry)
  • Features/SearchExport.spec.ts › Export queues a background job and downloads from the jobs tray (shard 4, 1 retry)
  • Features/Table.spec.ts › should persist page size (shard 4, 1 retry)
  • Flow/CustomizeWidgets.spec.ts › Data Products Widget (shard 5, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 5, 1 retry)
  • Pages/CustomProperties.spec.ts › Set table-cp custom property on column and verify in UI (shard 5, 2 retries)
  • Pages/CustomProperties.spec.ts › Set enum custom property on column and verify in UI (shard 5, 2 retries)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 6, 1 retry)
  • Features/AutoPilot.spec.ts › Create Service and check the AutoPilot status (shard 7, 1 retry)
  • Pages/GlossaryFormValidation.spec.ts › should show error when glossary name is empty (shard 7, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Import partial success - some terms pass, some fail (shard 7, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service filter selection (shard 7, 1 retry)
  • ... and 3 more

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@mohityadav766
mohityadav766 merged commit 810c9d9 into main Jul 16, 2026
53 of 60 checks passed
@mohityadav766
mohityadav766 deleted the fix/external-cluster-search-it branch July 16, 2026 10:50
@gitar-bot

gitar-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Updates search and UI integration tests to prevent failures in external shared-cluster environments. Fixes include resolving search indexes via the inspector, replacing exact size assertions with existence checks, and stabilizing dropdown interactions.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

mohityadav766 added a commit that referenced this pull request Jul 16, 2026
… resolution, shared-cluster assertions, page-size flake) (#30091)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants