Skip to content

fix(ui): match Tier/Certification tag FQNs by prefix, not substring#27700

Open
siddhant1 wants to merge 4 commits intomainfrom
fix/ui/tag-assets-query-filter-suffix-match
Open

fix(ui): match Tier/Certification tag FQNs by prefix, not substring#27700
siddhant1 wants to merge 4 commits intomainfrom
fix/ui/tag-assets-query-filter-suffix-match

Conversation

@siddhant1
Copy link
Copy Markdown
Member

@siddhant1 siddhant1 commented Apr 24, 2026

Summary

  • getTagAssetsQueryFilter used fqn.includes('Tier.') / .includes('Certification.') to pick which index field to query, so any classification whose name ended with Tier or Certification (e.g. DataTier.Bronze, DataCertification.Gold) was routed to tier.tagFQN / certification.tagLabel.tagFQN and returned no assets.
  • Anchors the check to the start of the FQN using FQN_SEPARATOR_CHAR, so only the built-in Tier and Certification classifications hit the special fields; all others fall back to tags.tagFQN.
  • Adds two regression tests in TagsUtils.test.tsx covering DataTier.Bronze and DataCertification.Gold.

Closes #27689

Test plan

  • yarn test src/utils/TagsUtils.test.tsx — 10/10 pass, including two new cases
  • Manually verify in the UI: create a classification named DataTier, tag an asset with DataTier.Bronze, open the tag page and confirm the asset appears
  • Manually verify the built-in Tier/Certification tag pages still list their assets (no regression)

🤖 Generated with Claude Code

…27689)

Closes #27689

`getTagAssetsQueryFilter` used `fqn.includes('Tier.')` / `.includes('Certification.')`
to pick which index field to query, so any tag whose classification name *ended*
with "Tier" or "Certification" (e.g. `DataTier.Bronze`) was routed to the
`tier.tagFQN` / `certification.tagLabel.tagFQN` fields and returned no assets.
Anchor the check to the start of the FQN using `FQN_SEPARATOR_CHAR` so only the
built-in Tier and Certification classifications hit the special fields.
Copilot AI review requested due to automatic review settings April 24, 2026 10:13
@siddhant1 siddhant1 requested a review from a team as a code owner April 24, 2026 10:13
@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!

@siddhant1 siddhant1 added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch labels Apr 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes incorrect routing in getTagAssetsQueryFilter where classifications whose names merely contained Tier. / Certification. were treated as the built-in Tier/Certification classifications, causing asset lookups to return empty results.

Changes:

  • Switch Tier/Certification detection from substring matching to prefix matching using FQN_SEPARATOR_CHAR.
  • Ensure non-built-in classifications (e.g., DataTier.*, DataCertification.*) fall back to tags.tagFQN.
  • Add regression tests covering the two failing cases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
openmetadata-ui/src/main/resources/ui/src/utils/TagsUtils.tsx Anchors Tier/Certification detection to the start of the FQN to select the correct ES field.
openmetadata-ui/src/main/resources/ui/src/utils/TagsUtils.test.tsx Adds regression tests ensuring custom classifications ending with Tier/Certification use the common tag field.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 61%
61.94% (61763/99708) 42.06% (33022/78508) 45.09% (9763/21648)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

🔴 Playwright Results — 10 failure(s), 27 flaky

✅ 3936 passed · ❌ 10 failed · 🟡 27 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 293 0 6 4
🔴 Shard 2 749 5 5 8
🔴 Shard 3 725 2 5 7
🟡 Shard 4 756 0 3 18
🔴 Shard 5 682 3 2 41
🟡 Shard 6 731 0 6 8

Genuine Failures (failed on all attempts)

Features/DataProductPersonaCustomization.spec.ts › Data Product - customize tab label should only render if it's customized by user (shard 2)
�[31mTest timeout of 60000ms exceeded while setting up "adminPage".�[39m
Features/DataQuality/AddTestCaseNewFlow.spec.ts › Add Column Test Case (shard 2)
�[31mTest timeout of 60000ms exceeded.�[39m
Features/DataQuality/AddTestCaseNewFlow.spec.ts › Non-owner user should not able to add test case (shard 2)
�[31mTest timeout of 60000ms exceeded.�[39m
Features/DataQuality/BundleSuiteBulkOperations.spec.ts › Create new Bundle Suite with bulk selected test cases (shard 2)
Error: Timeout 15000ms exceeded while waiting on the predicate
Features/DataQuality/BundleSuiteBulkOperations.spec.ts › Add test case to existing Bundle Suite (shard 2)
Error: Timeout 15000ms exceeded while waiting on the predicate
Features/Tasks/TaskAllEntities.spec.ts › DomainUpdate task for SearchIndex (shard 3)
�[31m"beforeAll" hook timeout of 60000ms exceeded.�[39m
Features/Tasks/TaskAllEntities.spec.ts › DescriptionUpdate task for DataProduct (shard 3)
�[31mTest timeout of 60000ms exceeded.�[39m
Pages/EntityDataConsumer.spec.ts › Update description (shard 5)
�[31m"beforeAll" hook timeout of 60000ms exceeded.�[39m
Pages/EntityDataConsumer.spec.ts › Follow & Un-follow entity (shard 5)
�[31m"beforeAll" hook timeout of 60000ms exceeded.�[39m
Pages/EntityDataConsumer.spec.ts › Tag Add, Update and Remove (shard 5)
�[31mTest timeout of 60000ms exceeded while running "beforeEach" hook.�[39m
🟡 27 flaky test(s) (passed on retry)
  • Features/DataAssetRulesDisabled.spec.ts › Verify the Messaging Service entity item action after rules disabled (shard 1, 2 retries)
  • Features/DataAssetRulesDisabled.spec.ts › Verify the MlModel Service entity item action after rules disabled (shard 1, 2 retries)
  • Features/DataAssetRulesDisabled.spec.ts › should allow multiple domain selection for glossary term when entity rules are disabled (shard 1, 2 retries)
  • Features/CustomizeDetailPage.spec.ts › Glossary Term - customization should work (shard 1, 1 retry)
  • Pages/AuditLogs.spec.ts › should create audit log entry when glossary is updated (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event is created when description is updated (shard 2, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/DomainFilterQueryFilter.spec.ts › Assets from selected domain should be visible in explore page (shard 2, 1 retry)
  • Features/DomainFilterQueryFilter.spec.ts › Search suggestions should be filtered by selected domain (shard 2, 1 retry)
  • Features/IncidentManager.spec.ts › Complete Incident lifecycle with table owner (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/Tasks/ActivityFeed.spec.ts › updating entity should create activity in feed (shard 3, 1 retry)
  • Features/Tasks/TaskAllEntities.spec.ts › OwnershipUpdate task for Dashboard (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Should verify property name is visible for storedProcedure in right panel (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Should display custom properties for dashboardDataModel in right panel (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Should verify property name is visible for metric in right panel (shard 4, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Glossary Term Add, Update and Remove (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column selection and visibility for Glossary Terms table (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Pipeline (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Domains filter for Lineage (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Owners filter for Lineage (shard 6, 2 retries)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Delete Storage Service (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

Copilot AI review requested due to automatic review settings April 25, 2026 07:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 26, 2026

Code Review ✅ Approved

Updates the UI logic to match Tier and Certification tag FQNs using a prefix-based comparison instead of substrings. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assets not retrieved when tag names end with "Tier" or "Certifications"

3 participants