OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

Domain detail page always shows a count of 0

Open AuTyi opened this issue 5 months ago • 0 comments

Affected module

UI

Describe the bug

The "Sub Domains" tab on an individual Domain detail page always shows a count of 0, even when the domain has correctly configured child domains (sub-domains). This occurs despite the parent-child relationship being correctly stored and queryable via the REST API in both directions, and despite the OpenSearch/Elasticsearch index being fully healthy after a recreate-index reindex.

This appears to be the same root cause as the field-trimming pattern introduced for ContainerResource in 1.12.8 (#27894 follow-up: "children is no longer returned by default on GET /v1/containers list responses; clients that depended on the implicit inclusion must request it explicitly via the fields query parameter"). The Domain detail page frontend does not appear to pass fields=children when fetching the domain for the detail view, so the Sub Domains tab renders a count of 0 regardless of actual data.

Image

To Reproduce

  1. Create a top-level Domain (e.g. ParentDomain)
  2. Create 1+ Sub Domains under it via the UI ("Add Sub Domain") or API (setting parent)
  3. Navigate to Domains → ParentDomain in the UI
  4. Observe the Sub Domains tab shows count 0
  5. Confirm via API that the data is actually correct:

GET /api/v1/domains/name/ParentDomain?fields=children

-> returns correct children array GET /api/v1/domains/name/ParentDomain.ChildDomain?fields=parent

-> returns correct parent reference GET /api/v1/domains/name/ParentDomain (no fields param)

-> children field is absent entirely

  1. The Domains list page (left-nav tree) correctly shows the subdomain hierarchy and counts — only the individual domain detail page's Sub Domains tab is affected.

Expected behavior

The Sub Domains tab should display the correct count and list of child domains, matching what the API returns when fields=children is explicitly requested, and matching what the Domains list page tree already displays correctly. Verification performed (ruling out data/index causes)

  • Confirmed parent→child relationship via GET /domains/name/{parent}?fields=children — correct, full children array returned
  • Confirmed child→parent relationship via GET /domains/name/{child}?fields=parent — correct, parent reference returned
  • Triggered SearchIndexingApplication full sync (entities:["all"]) — completed successfully, no failed records
  • Triggered SearchIndexingApplication scoped recreate (entities:["domain"], recreateIndex:true) — completed successfully, 130/130 domain records indexed, no failed records
  • UI Sub Domains tab count remained 0 after both reindex operations
  • Confirmed domainType is not a gating factor (enum is only Source-aligned, Consumer-aligned, Aggregate — no Sub-Domain value exists per schema)
  • Domains list page tree (left nav) renders correct hierarchy and counts throughout

OS

Windows 11

Python version

3

OpenMetadata version

1.13.0

OpenMetadata Ingestion package version

1.13.0

Additional context

This was independently reported by another user in the OpenMetadata Slack support channel (GKE deployment, 42 sub-domains across 10 top-level domains, same symptom — DB relationships and Elasticsearch index confirmed healthy, UI tab still showing 0). Support's response there reached the same conclusion: the documentation confirms that the children field is only returned when explicitly requested, with no documented fix or workaround for the 1.13.0 UI behavior.

Reference: OpenMetadata Domains API documentation confirms parent/children are relationship fields not returned by default.

Suggested fix: the Domain detail page frontend component should request fields=children (or fields=children,parent) when fetching the domain entity for the detail view, consistent with how the Domains list page already does.

Pre-submission checklist

  • [x] I searched for duplicate issues.
  • [x] I removed credentials, hostnames, emails, and other sensitive data from logs and config.

AuTyi avatar Jun 17 '26 07:06 AuTyi