Skip to content

fix(e2e): fix flaky SearchExport filter on MySQL by normalizing sample_data displayName#27631

Merged
harsh-vador merged 3 commits intomainfrom
export-spec-fix-flaky
Apr 22, 2026
Merged

fix(e2e): fix flaky SearchExport filter on MySQL by normalizing sample_data displayName#27631
harsh-vador merged 3 commits intomainfrom
export-spec-fix-flaky

Conversation

@harsh-vador
Copy link
Copy Markdown
Contributor

@harsh-vador harsh-vador commented Apr 22, 2026

Describe your changes:

Summary

  • Use the shared redirectToExplorePage Playwright utility in SearchExport.spec.ts instead of maintaining a local navigation helper.
  • MySQL test environments seed the sample_data DatabaseService with displayName = "Sample Data" (spaces), while PostgreSQL leaves it unset. This caused the Service filter search for "sample_data" to return no
    results on MySQL, failing the filtered-export test.
  • Add test.beforeAll that PATCHes sample_data service displayName to "sample_data" (matching the service name) before any test runs, normalizing both DB environments.

Changes

  • replace the local navigateToExplorePage helper with redirectToExplorePage
  • remove the unused Page import
  • keep the Search Export test behavior unchanged
Screenshot 2026-04-22 at 7 31 26 PM

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@github-actions
Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 61%
62.02% (60342/97290) 42.02% (31636/75281) 45.04% (9502/21095)

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 22, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Refactors the SearchExport spec to reuse shared explore navigation helpers, while resolving a JSON Patch 'replace' failure occurring when displayName is unset.

✅ 1 resolved
Bug: JSON Patch 'replace' fails when displayName is unset (PostgreSQL)

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SearchExport.spec.ts:35-38
The PR description states that PostgreSQL environments leave displayName unset on the sample_data service. However, the beforeAll hook uses op: 'replace' which, per RFC 6902, requires the target path to already exist. When displayName is absent, the PATCH request will return an error, and the test setup will silently fail (no status check on the response), leaving the flaky behavior unfixed on PostgreSQL.

Additionally, there is no error handling on the serviceRes or the patch response — if either call fails, the tests will proceed with stale state and produce confusing failures.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@harsh-vador harsh-vador changed the title refactor(playwright): reuse shared explore navigation helper in SearchExport spec fix(e2e): fix flaky SearchExport filter on MySQL by normalizing sample_data displayName Apr 22, 2026
@sonarqubecloud
Copy link
Copy Markdown

@harsh-vador harsh-vador enabled auto-merge (squash) April 22, 2026 17:11
@harsh-vador harsh-vador merged commit 39e5cc0 into main Apr 22, 2026
47 checks passed
@harsh-vador harsh-vador deleted the export-spec-fix-flaky branch April 22, 2026 17:28
@github-actions
Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (19 flaky)

✅ 3692 passed · ❌ 0 failed · 🟡 19 flaky · ⏭️ 89 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 481 0 0 4
🟡 Shard 2 653 0 3 7
🟡 Shard 3 662 0 4 1
🟡 Shard 4 645 0 3 27
🟡 Shard 5 609 0 2 42
🟡 Shard 6 642 0 7 8
🟡 19 flaky test(s) (passed on retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should cancel drag and drop operation (shard 2, 1 retry)
  • Features/Glossary/GlossaryTermDetails.spec.ts › should add and remove references from glossary term (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/SSOConfiguration.spec.ts › should not display role mapping widget for non-LDAP providers (shard 3, 1 retry)
  • Features/Workflows/WorkflowOssRestrictions.spec.ts › include-fields-select is enabled in OSS (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for MlModel (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Semantic with Not_Contains Operator should work for Tier, Tag and Glossary (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel.spec.ts › Should verify deleted user not visible in owner selection for table (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Add and Remove Assets (shard 5, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for dashboardDataModel -> dashboardDataModel (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)
  • Pages/Users.spec.ts › Check permissions for Data Steward (shard 6, 1 retry)
  • Pages/Users.spec.ts › Should navigate to user profile from feed card avatar click (shard 6, 2 retries)

📦 Download artifacts

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

harsh-vador added a commit that referenced this pull request Apr 23, 2026
harsh-vador added a commit that referenced this pull request Apr 23, 2026
jatinmasaram pushed a commit to jatinmasaram/OpenMetadata that referenced this pull request May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants