Skip to content

Fixes: Add Metric entity type to Data Insights description coverage chart - #26260

Merged
aniketkatkar97 merged 12 commits into
mainfrom
copilot/add-metrics-description-chart
Mar 13, 2026
Merged

aniketkatkar97 merged 12 commits into
mainfrom
copilot/add-metrics-description-chart

Conversation

Copilot AI commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

metric was absent from the Data Insights "Percentage of Data Asset with Description" chart because the entity type was never enrolled in the data insights processing pipeline — despite the backend chart query already excluding only tag and glossaryTerm.

Changes

  • DataInsightsApp.java — Added "metric" to dataAssetTypes. This set drives which entity types get indexed into the data insights data streams that power all data asset charts.

  • dataInsights/config.json — Added "metric" field mapping entry so the data stream index captures metric-specific fields (metricType, unitOfMeasurement, granularity, relatedMetrics, expression) alongside the common fields. Note: metric has no service/serviceType fields (it is a standalone entity), so those are intentionally omitted.

// DataInsightsApp.java — before
public final Set<String> dataAssetTypes = Set.of(
    "table", "storedProcedure", "databaseSchema", "database",
    "chart", "dashboard", "dashboardDataModel", "pipeline",
    "topic", "container", "searchIndex", "mlmodel",
    "dataProduct", "glossaryTerm", "tag");  // metric missing

// after
    ..., "tag", "metric");

Type of change:

  • Bug fix

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.
Original prompt

This section details on the original issue you should resolve

<issue_title>Missing Metrics data asset Percentage of Data Asset with Description chart</issue_title>
<issue_description>I can't seem to monitor the % of completion of the description field for the data asset of type metrics.

Similar to other data asset types existing in the chart called: Percentage of Data Asset with Description, I'd excpect to have metrics also available and displayed in the chart.

Image

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add metrics data asset percentage of data asset with description chart Fixes: Add Metric entity type to Data Insights description coverage chart Mar 5, 2026
@sonika-shah sonika-shah added the safe to test Add this label to run secure Github workflows on PRs label Mar 6, 2026
@sonika-shah
sonika-shah marked this pull request as ready for review March 6, 2026 12:39
@aniketkatkar97 aniketkatkar97 added the To release Will cherry-pick this PR into the release branch label Mar 13, 2026
@github-actions

github-actions Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (27 flaky)

✅ 3311 passed · ❌ 0 failed · 🟡 27 flaky · ⏭️ 183 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 452 0 3 2
🟡 Shard 2 303 0 2 1
🟡 Shard 3 647 0 10 33
🟡 Shard 4 721 0 6 47
🟡 Shard 5 589 0 2 67
🟡 Shard 6 599 0 4 33
🟡 27 flaky test(s) (passed on retry)
  • Features/CustomizeDetailPage.spec.ts › Glossary Term - customization should work (shard 1, 1 retry)
  • Pages/Customproperties-part1.spec.ts › sqlQuery shows scrollable CodeMirror container and no expand toggle (shard 1, 1 retry)
  • Pages/CustomThemeConfig.spec.ts › Update Hover and selected Color (shard 1, 1 retry)
  • Flow/ServiceForm.spec.ts › Verify SSL cert upload with long filename and UI overflow handling (shard 2, 1 retry)
  • Pages/ExploreTree.spec.ts › Verify Database and Database schema after rename (shard 2, 1 retry)
  • Features/AdvanceSearchCustomProperty.spec.ts › Create, Assign and Test Advance Search for Duration (shard 3, 1 retry)
  • Features/BulkImport.spec.ts › Database (shard 3, 1 retry)
  • Features/DataProductRename.spec.ts › should handle multiple consecutive renames and preserve assets (shard 3, 1 retry)
  • Features/DataQuality/IncidentManagerDateFilter.spec.ts › Date filter persists on page reload (shard 3, 1 retry)
  • Features/Glossary/GlossaryAssets.spec.ts › should remove glossary term tag from entity page (shard 3, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should move term with children to different glossary (shard 3, 1 retry)
  • Features/ImpactAnalysis.spec.ts › Verify Downstream connections (shard 3, 1 retry)
  • Features/ImpactAnalysis.spec.ts › Verify entity popover card appears on asset hover in lineage-card-table (shard 3, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Features/Permissions/ServiceEntityPermissions.spec.ts › SearchIndex Service allow common operations permissions (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 4, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Comprehensive domain rename with ALL relationships preserved (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Multiple consecutive domain renames preserve all associations (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Tag Add, Update and Remove for child entities (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Tag Add, Update and Remove (shard 4, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Follow & Un-follow entity (shard 5, 1 retry)
  • Pages/EntityDataSteward.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/HyperlinkCustomProperty.spec.ts › should show No Data placeholder when hyperlink has no value (shard 6, 1 retry)
  • Pages/Tag.spec.ts › Add and Remove Assets and Check Restricted Entity (shard 6, 1 retry)
  • Pages/Teams.spec.ts › Add and Remove User for Team (shard 6, 1 retry)
  • Pages/Teams.spec.ts › Should not have edit access on team page with no data available (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

@gitar-bot

gitar-bot Bot commented Mar 13, 2026 •

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

Adds Metric entity type to Data Insights description coverage chart, addressing missing trailing newline in config.json, duplicated test patterns, metric config schema mismatch, and test cleanup for metric entities.

✅ 4 resolved
✅ Quality: Missing trailing newline in config.json

📄 openmetadata-service/src/main/resources/dataInsights/config.json:129
The diff introduces a missing trailing newline at the end of config.json. POSIX text files should end with a newline to avoid noisy diffs when future lines are appended.

✅ Quality: Duplicated response-wait-then-navigate pattern across tests

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts:56 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts:72 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts:105 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts:192 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts:241 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts:262 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts:289
The same 5-line pattern of setting up waitForResponse for percentage_of_service_with_description then calling sidebarClick is repeated verbatim in nearly every test case. This adds noise and makes maintenance harder — if the URL or navigation logic changes, every test must be updated.

Consider extracting this into a shared helper or moving the navigation + wait into beforeEach (which currently only calls redirectToHomePage).

✅ Bug: Metric config uses 'expression' but schema defines 'metricExpression'

📄 openmetadata-service/src/main/resources/dataInsights/config.json:126
In config.json, the metric mapping fields list "expression" as one of the fields to fetch for the Metric entity type. However, the Metric entity JSON schema defines this property as "metricExpression", not "expression". This mismatch means the Data Insights pipeline will attempt to fetch a field that doesn't exist on the Metric entity, and the actual metricExpression data will not be included in the data asset snapshot. While this may not cause a runtime error (unrecognized fields are likely silently ignored), it means metric expression data is missing from the Data Insights index.

✅ Bug: Test-created metric entities are never cleaned up

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts:38 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts:48
Three MetricClass instances are created in beforeAll but never deleted. The variables are local to the callback so they can't be referenced later, and there's no afterAll hook. afterAction() only disposes the API context and closes the page — it does not delete entities. This leaks test data across runs, which can cause flaky tests (e.g., unexpected metric counts) and pollutes the test environment.

Other spec files (e.g., EntityDataConsumer.spec.ts) follow the pattern of storing entities in outer-scope variables and cleaning them up in test.afterAll.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@aniketkatkar97
aniketkatkar97 merged commit 6470e6b into main Mar 13, 2026
51 of 52 checks passed
@aniketkatkar97
aniketkatkar97 deleted the copilot/add-metrics-description-chart branch March 13, 2026 08:55
@github-actions

Copy link
Copy Markdown
Contributor

Changes have been cherry-picked to the 1.12.2 branch.

This branch was previously deployed

1 inactive deployment
test — 7cf37ce7 Deployed Mar 13, 2026 by aniketkatkar97 via playwright-ci-postgresql (5, 6) #37225
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 To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Metrics data asset Percentage of Data Asset with Description chart

5 participants