Skip to content

Show testSuite field in the CheckCondition to evaluate the presence of Test Suite#28918

Open
anuj-kumary wants to merge 8 commits into
mainfrom
issue-#4491
Open

Show testSuite field in the CheckCondition to evaluate the presence of Test Suite#28918
anuj-kumary wants to merge 8 commits into
mainfrom
issue-#4491

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Jun 10, 2026

Copy link
Copy Markdown
Member

Describe your changes:

Fixes https://github.com/open-metadata/openmetadata-collate/issues/4491

Screenshot 2026-06-10 at 4 22 37 PM

Summary by Gitar

  • UI Enhancements:
    • Added TEST_SUITE field to CheckCondition to enable filtering by test suite.
    • Registered TEST_SUITE in EntityReferenceFields and TABLE_ENTITY_FIELDS_KEYS to support search integration.

This will update automatically on new commits.

@anuj-kumary anuj-kumary self-assigned this Jun 10, 2026
@anuj-kumary anuj-kumary requested a review from a team as a code owner June 10, 2026 10:50
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

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

  • Linked issue open-metadata/openmetadata-collate#4491 does not exist or is not accessible.

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

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Jun 10, 2026
Comment thread openmetadata-ui/src/main/resources/ui/src/utils/JSONLogicSearchClassBase.ts Outdated
@gitar-bot

gitar-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 2 resolved / 2 findings

Exposes the testSuite field in CheckCondition to enable presence checks for test suites. The implementation currently incorrectly matches displayName against entity names and includes redundant asyncFetch settings for a field that only supports nullability operators.

✅ 2 resolved
Bug: TEST_SUITE filter value will be displayName but matched against name

📄 openmetadata-ui/src/main/resources/ui/src/utils/JSONLogicSearchClassBase.ts:455-467 📄 openmetadata-ui/src/main/resources/ui/src/enums/AdvancedSearch.enum.ts:126
The new TEST_SUITE field key is testSuite.name (EntityReferenceFields.TEST_SUITE = 'testSuite.name'), but its autocomplete is configured with entityField: EntityFields.DISPLAY_NAME_KEYWORD and no sourceFields.

In parseBucketsData (SearchPureUtils.ts:94-105), when sourceFields is not provided the option value defaults to bucket.key, i.e. the value of the aggregation entityField. With DISPLAY_NAME_KEYWORD the bucket key is the test suite's displayName, while the condition is evaluated against the name field (testSuite.name). When a test suite's displayName differs from its name (the common case), the generated filter testSuite.name = <displayName> will not match anything, so the CheckCondition silently fails to detect the test suite.

This differs from the established pattern for similar reference fields: DATABASE (line 400-407) uses entityField: DATABASE_NAME with sourceFields: 'database.name', and DATABASE_SCHEMA (line 416-419) uses entityField: DATABASE_SCHEMA_NAME with sourceFields: 'databaseSchema.name', so the stored option value always corresponds to the queried *.name field.

Fix: aggregate/return the actual name. Either use a name-keyword aggregation field (e.g. EntityFields.NAME_KEYWORD) or add sourceFields: 'name' so the selected option's value matches testSuite.name.

Quality: Unused asyncFetch fieldSettings on presence-only TEST_SUITE field

📄 openmetadata-ui/src/main/resources/ui/src/utils/JSONLogicSearchClassBase.ts:459-466
The TEST_SUITE field operators were changed to ['is_null', 'is_not_null'], which evaluate only presence/absence and require no value input. The fieldSettings.asyncFetch (autocomplete against SearchIndex.TEST_SUITE with useAsyncSearch: true) is now dead configuration — the value widget will never be rendered for these operators. This correctly resolves the prior bug where the displayName-based filter value mismatched the matched entity. Consider removing the now-unused fieldSettings block to avoid confusion. This is a cleanup-only suggestion; functionally the field works.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.77% (67241/107121) 44.01% (37098/84289) 46.34% (11414/24626)

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (11 flaky)

✅ 4273 passed · ❌ 0 failed · 🟡 11 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 301 0 0 4
✅ Shard 2 806 0 0 9
🟡 Shard 3 804 0 4 8
🟡 Shard 4 841 0 2 12
🟡 Shard 5 720 0 1 47
🟡 Shard 6 801 0 4 8
🟡 11 flaky test(s) (passed on retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/Tasks/DomainFiltering.spec.ts › selecting All Domains removes domain filter from feed API call (shard 3, 1 retry)
  • Features/Tasks/TaskNavigation.spec.ts › navigating to /table/TASK-XXXXX should show 404 (invalid URL pattern) (shard 3, 1 retry)
  • Flow/ExploreAggregationCountsMatching.spec.ts › should verify left panel counts and tab search results for normal search (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Entity Reference List (shard 4, 1 retry)
  • Pages/DomainUIInteractions.spec.ts › Add owner to domain via UI (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage service filter selection (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/Lineage/PlatformLineage.spec.ts › Verify domain platform view (shard 6, 1 retry)

📦 Download artifacts

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

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 skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant